Deploy to Digital Ocean
OpenReplay stack can be installed on a single machine (droplet) and Digital Ocean is an ideal candidate. Here's how to do it.
Create a droplet
- Create a new project (if you haven't done so) then navigate to it and click on 'Create' droplet
- Choose the Ubuntu Server 20.04 LTS image
- Go for the 'Shared CPU' and pick the
Regular Intel | 4 CPUs | 8GBplan. These are the minimum specs, otherwise OpenReplay backend services won't simply start. They're enough for a moderate volume, but if you're expecting high traffic, you should scale from here.
- Click 'New SSH key' in 'Authentication' and follow the instructions to generate a key
- Give your machine a name then hit 'Create droplet'
- Make sure your droplet is
activethen connect to it:
## From your terminalSSH_KEY=~/Downloads/openreplay-key.pem ## wherever you've saved the SSH keyINSTANCE_IP=REPLACE_WITH_DROPLET_PUBLIC_IPchmod 400 $SSH_KEYssh -i $SSH_KEY root@$INSTANCE_IP
- Install OpenReplay:
git clone https://github.com/openreplay/openreplay.gitcd openreplay/scripts/helm && bash install.sh
Note: You'll be prompted to provide the domain on which OpenReplay will be running (e.g. openreplay.mycompany.com). This is required to continue the installation.
OpenReplay deals with sensitive user data and therefore requires HTTPS to run. This is mandatory, otherwise the tracker simply wouldn't start recording. Same thing for the dashboard, without HTTPS you won't be able to replay user sessions.
You must therefore generate (or bring) your own SSL certificate.
First, go to 'Manage' > 'Networking' > 'Domains' (or your other DNS service provider) and create an
A Record. Use the domain you previously provided during the installation step and point it to the droplet using its public IP (can be found in Droplets tab).
vars.yaml file with the command
vi openreplay/scripts/helm/vars.yaml then substitute:
domain_name: this is where OpenReplay will be accessible (i.e. openreplay.mycompany.com)
nginx_ssl_cert_file_path: the path to you .cert file (i.e. /root/openreplay/my-cert.crt)
nginx_ssl_key_file_path: the path to your .pem file (i.e. /root/openreplay/my-key.pem)
Note: If you don't have a certificate, generate one for your subdomain (the one provided during installation) using Let's Encrypt. Connect to OpenReplay droplet, run
helm uninstall -n nginx-ingress nginx-ingressthen execute
bash openreplay/scripts/certbot.shand follow the steps.
Restart OpenReplay NGINX (and choose whether to enable the default HTTP to HTTPS redirection using the
cd openreplay/scripts/helmNGINX_REDIRECT_HTTPS=1 ./install.sh --app nginx
You're all set now, OpenReplay should be accessible on your subdomain. You can create an account by visiting the
/signup page (i.e. openreplay.mycompany.com/signup).
Note: You can also run OpenReplay behind an existing load balancer. If that's the case, then configure your SSL at the LB level:
- In Forwarding rules (Load Balancer): Select HTTPS (443) in Load Balancer section then click on 'Certificate' > 'Add a new certificate. If your domain is managed by Digital Ocean then you can follow the instructions in the Let's Encrypt option. Otherwise you must import your own certificate.
- In Forwarding rules (Droplet): Select HTTP (80) in Droplet section.
If you encounter any issues, connect to our Slack and get help from our community.