Skip to content

Digital Ocean Setup

Andrew edited this page May 14, 2022 · 13 revisions

Prerequisites

  • Domain name (required for HTTPS traffic with the relay server API)

Nomenclature

  • Anywhere that you see example.com, you would replace this with your own domain name.

VPS Setup

  1. Create a new Digital Ocean droplet with Docker preinstalled.
  2. Recommended: Assign a floating IP to the newly created droplet.
  3. Visit your domain name registrar (e.g. GoDaddy, Google Domains), and add a new DNS record which resolves to the IP address of the droplet.
Host name Type TTL Data
relay A 3600 <DROPLET_IP_HERE>

Relay Setup

  1. Clone this repository.

  2. Obtain a PFX certificate (instructions).

    • WARNING: If you have created the droplet using the Docker marketplace app, you may need to allow port 80 during the certbot steps.
  3. Move cert.json and cert.pfx to the same directory as docker-compose.yml.

  4. Update the environment variables in docker-compose.yaml.

  5. Update the environment variables in .env.

  6. Start the server with docker-compose up.

Reverse Proxy

As of v0.3.1, you will need to setup your own reverse proxy.

Caddy

  1. Install Caddy.
  2. Create the Caddyfile. An example can be found below.
  3. Apply the Caddyfile to the web server.
  4. Verify the setup by visiting https://example.com/api/servers. If the page responds with [], then your server is up and running.
relay.example.com {

	handle /api/* {
		reverse_proxy localhost:8080
	}
}

Conclusion

  • Remember to set LRM Auth Key on your Light Reflective Mirror Transport component. This value should match the AUTH_KEY environment variable from .env.
Clone this wiki locally