forked from Derek-R-S/Light-Reflective-Mirror
-
Notifications
You must be signed in to change notification settings - Fork 0
Digital Ocean Setup
Andrew edited this page May 14, 2022
·
13 revisions
- Domain name (required for HTTPS traffic with the relay server API)
- Anywhere that you see
example.com
, you would replace this with your own domain name.
- Create a new Digital Ocean droplet with Docker preinstalled.
- Recommended: Assign a floating IP to the newly created droplet.
- 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> |
-
Clone this repository.
-
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.
- WARNING: If you have created the droplet using the Docker marketplace app, you may need to allow port 80 during the
-
Move
cert.json
andcert.pfx
to the same directory asdocker-compose.yml
. -
Update the environment variables in
docker-compose.yaml
. -
Update the environment variables in
.env
. -
Start the server with
docker-compose up
.
As of v0.3.1
, you will need to setup your own reverse proxy.
- Install Caddy.
- Create the Caddyfile. An example can be found below.
- Apply the Caddyfile to the web server.
- 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
}
}
- Remember to set
LRM Auth Key
on yourLight Reflective Mirror Transport
component. This value should match theAUTH_KEY
environment variable from.env
.