VPS or Docker relay

Run the relay as one binary or a Docker image on a server you control.

Fits when you already have a server with a public address, or you want the relay on hardware you control. Does not fit when you would rather not maintain a server (use the Workers relay).

droidline-relay does what the Workers relay does: the PC and the phones connect out to it, and it forwards encrypted lines between them by ID.

Run it

Pick a secret:

export RELAY_TOKEN=$(openssl rand -hex 24)

With a domain pointing at the server and ports 80 and 443 free, the relay gets its own Let's Encrypt certificate:

droidline-relay --domain relay.example.com

Behind a reverse proxy that already handles TLS (Caddy, nginx, Traefik), listen on a local port and proxy WebSocket traffic to it:

droidline-relay --listen 127.0.0.1:8443

With Docker:

docker run -d --restart unless-stopped \
  -e RELAY_TOKEN=$RELAY_TOKEN -p 8443:8443 \
  ghcr.io/knifelemon/droidline-relay

GET /healthz answers ok.

Connect the PC

droidline relay set https://relay.example.com <RELAY_TOKEN>

Restart droidline serve. Phones pick the relay up as described in the overview.