HTTPS & Reverse Proxy
Lyftr’s container serves plain HTTP on a host port. Put it behind a reverse proxy that terminates HTTPS — this is the recommended setup for every install, not just public ones. Your login token travels on every request, and on plain HTTP anyone else on the network can read it.
If Lyftr never leaves your LAN you can still have a genuine, publicly-trusted certificate with no ports open to the internet — see LAN-only below.
Caddy (easiest — automatic HTTPS)
Section titled “Caddy (easiest — automatic HTTPS)”Caddy fetches and renews Let’s Encrypt certificates for you. A one-line
Caddyfile:
lyftr.example.com { reverse_proxy localhost:8080}Then reload Caddy. That’s it — HTTPS is live and auto-renewing.
nginx + Certbot
Section titled “nginx + Certbot”server { server_name lyftr.example.com;
location / { proxy_pass http://localhost:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; }}Then issue a certificate with Certbot:
sudo certbot --nginx -d lyftr.example.comLAN-only? Get a real certificate anyway (recommended)
Section titled “LAN-only? Get a real certificate anyway (recommended)”If Lyftr never leaves your network, you can still have a genuine, publicly-trusted certificate — no ports open to the internet. Use a domain you own, point a record at a private address, and let Caddy prove ownership over DNS instead of HTTP:
lyftr.home.example.com { tls { dns cloudflare {env.CF_API_TOKEN} } reverse_proxy localhost:8080}This is the best option by a distance: every device trusts it out of the box, nothing is exposed, and renewal is automatic. It needs a domain you control and a DNS provider with an API — Caddy’s DNS provider modules cover most of them.
Private CA / self-signed certificates
Section titled “Private CA / self-signed certificates”If you have no domain and must use your own CA, the mobile app can work with it, but there are rules that trip people up:
- Install the CA on the device, not just the server. On Android: Settings → Security → Encryption & credentials → Install a certificate → CA certificate. On iOS: install the profile, then enable it under Settings → General → About → Certificate Trust Settings.
- The certificate must carry a Subject Alternative Name. A Common Name alone has not
been accepted for years. If you connect by IP, the IP must be in the SAN as an
IP Addressentry — aDNSentry will not match. - Use RSA ≥ 2048 or EC ≥ 256, SHA-256 or better, and TLS 1.2+.
- Use a current Android build. The app trusts the device’s user-installed CA store; older builds ignored it entirely and reported that they couldn’t reach the server even though the server was fine. If a private CA isn’t working, update the app first.
Your own CA is enough for the web app’s barcode scanner too — browsers grant camera access
based on the page being https://, not on who issued the certificate. You don’t need a
publicly-trusted certificate for that, though you do need the CA installed so the browser
stops warning.
Point Lyftr at your public origin
Section titled “Point Lyftr at your public origin”After the proxy is up, set CORS_ORIGIN to your HTTPS URL so browser and mobile clients are
allowed, and restart:
# in .envCORS_ORIGIN=https://lyftr.example.comdocker compose up -dSee Configuration for the full list of variables, and the Mobile App page for pointing the phone app at your new HTTPS server.