Reverse Proxy & HTTPS
When exposing MusicOrbit beyond localhost, put it behind HTTPS so login credentials, HttpOnly session cookies, and audio uploads travel over TLS — and so mobile/desktop PWA installation works seamlessly.
Cloudflare Tunnel (cloudflared) — No Open Ports
Section titled “Cloudflare Tunnel (cloudflared) — No Open Ports”If you already use Cloudflare Zero Trust Tunnels, you do not need Nginx, Caddy, or router port-forwarding:
- In the Cloudflare Zero Trust dashboard, open Networks → Tunnels and select your tunnel.
- Add a Public Hostname (for example,
music.example.com):- Type:
HTTP - URL:
musicorbit:4410(ifcloudflaredshares the same Docker network) orlocalhost:4410(if running on the host).
- Type:
- Save the hostname — Cloudflare automatically provisions HTTPS certificates and proxies HTTP
206 Partial Contentaudio streaming and PWA assets out of the box.
Caddy (Automatic HTTPS)
Section titled “Caddy (Automatic HTTPS)”music.example.com { reverse_proxy 127.0.0.1:4410}Caddy automatically provisions and renews Let’s Encrypt certificates and streams large uploads and byte-range audio requests out of the box.
Ensure client_max_body_size is large enough for lossless FLAC uploads and disable request buffering for smooth upload streaming:
server { listen 443 ssl http2; server_name music.example.com;
# Allow large lossless audio uploads client_max_body_size 512M;
location / { proxy_pass http://127.0.0.1:4410; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;
# Stream uploads & byte-range audio without buffering proxy_request_buffering off; proxy_buffering off; }}Traefik (Docker Labels)
Section titled “Traefik (Docker Labels)”labels: - "traefik.enable=true" - "traefik.http.routers.musicorbit.rule=Host(`music.example.com`)" - "traefik.http.routers.musicorbit.entrypoints=websecure" - "traefik.http.routers.musicorbit.tls.certresolver=letsencrypt" - "traefik.http.services.musicorbit.loadbalancer.server.port=4410"Security reminders
Section titled “Security reminders”- Keep
AUTH_ENABLED=truewhenever MusicOrbit is reachable over a LAN or the public internet. - If you ever lose access to your Admin account on a remote server, you can recover it safely from the host shell via
docker exec -it musicorbit npm run reset-password -- admin(see Password Recovery & Backups).