Deploy
Domains & TLS
DNS, nginx and Let’s Encrypt certificates.
DNS#
Create an A record for your LokiPay domain pointing at the server (and AAAA for IPv6 if you have it). If you use Cloudflare, set the record to DNS only (grey cloud) so Let’s Encrypt can validate and the relay app talks to your server directly.
Certificates#
deploy.sh obtains a certificate with certbot --webroot using SSL_EMAIL and installs a renewal hook that reloads nginx. Renewal is automatic.
nginx#
- Requests are proxied to the API on the loopback port.
- Request bodies are limited to 1 MB, except APK uploads at
/admin/app-releases(160 MB). - Rate limits:
/device/*60 requests/minute per IP,/admin/auth/login10/minute per IP (on top of the application limits in rate limits).
Changing the domain#
- Point the new DNS record at the server.
- Update
PUBLIC_URLin the server.envandDOMAINin yourdeploy.env, then run./deploy.sh. - Re-pair relay phones (their saved server URL changes) and update links you have shared.
