Reverse proxy setup
Put CW behind NGINX or another proxy with correct TLS, webhook, and WebSocket handling.
Use a reverse proxy for TLS and clean URLs.
Keep CW on HTTP behind the proxy.
Proxy requirements
CW runs on FastAPI + Uvicorn.
Your proxy must:
Forward client headers (
X-Forwarded-*).Support WebSocket upgrades.
Pass
/webhook/*requests through unchanged.Use longer timeouts for long-lived connections.
If you add proxy auth, keep /webhook/* reachable.
Trusted reverse proxies (important)
If CW is behind a reverse proxy, configure Trusted reverse proxies in Settings → UI Settings → Security.
This makes CW trust the forwarded client headers (X-Forwarded-*).
It improves secure cookie behavior and rate limiting accuracy.
NGINX example
Typical setup:
Public:
https://crosswatch.example.comUpstream:
http://127.0.0.1:8787
If CW runs in Docker
Point proxy_pass to the container on a user-defined Docker network.
Example:
NGINX container:
nginxCW container:
crosswatchNetwork:
proxy
Use:
proxy_pass http://crosswatch:8787;
Webhooks and Watcher (important)
CW exposes inbound webhook endpoints.
See:
Webhooks (inbound)
Your proxy must:
Allow
POSTto/webhook/*.Not rewrite the path.
Not block unknown content types.
Plex can send form-style payloads.
Jellyfin/Emby plugins usually send JSON.
If you put CW behind login, do one of these:
Exempt
/webhook/*from auth.IP-allowlist your media server's IP for
/webhook/*.Keep webhooks LAN-only. Do not proxy them.
Watcher
Polling watchers make outbound calls from CW to the configured source.
A reverse proxy is optional when CW and the source can reach each other directly. Kodi and Stremio add-ons must also reach CW to report playback; use the URLs shown in their setup guides.
Another inbound endpoint:
Plex "ratings" helper uses:
POST /webhook/plexwatcher?uniqueID
If you enable Plex ratings, your proxy must allow that endpoint. It must also preserve the query string (the ?uniqueID token).
Common proxy problems
413 Request Entity Too Large
Increase client_max_body_size.
502 / 504 / random disconnects
This happens most often when running:
Captures (create/restore/compare)
Analyzer / Exporter on large state
Fix: increase timeouts to 10 minutes (600s) or more.
On NGINX, set:
NGINX:
proxy_read_timeout/proxy_send_timeout
WebSocket errors (UI features not updating)
Forward upgrade headers:
proxy_set_header Upgrade $http_upgrade;proxy_set_header Connection "upgrade";
Wrong scheme (HTTP/HTTPS) in callbacks or redirects
Send:
X-Forwarded-Proto $scheme
If you terminate TLS at the proxy, CW should still behave as HTTPS to clients.
Related topics
HTTPS/TLS (TLS options and why the proxy approach is recommended)
Installation (ports, volumes, restart policy)
Last updated
Was this helpful?