Reverse proxies

Configure NGINX (and similar proxies) for CrossWatch with correct webhook and WebSocket settings.

Use a reverse proxy for TLS and clean URLs.

Keep CrossWatch on HTTP behind the proxy.

circle-exclamation

Proxy requirements

CrossWatch 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 CrossWatch is behind a reverse proxy, configure Trusted reverse proxies in Settings → Security.

This makes CrossWatch trust the forwarded client headers (X-Forwarded-*).

It improves secure cookie behavior and rate limiting accuracy.

circle-exclamation
circle-exclamation

NGINX example

Typical setup:

  • Public: https://crosswatch.example.com

  • Upstream: http://127.0.0.1:8787

circle-info

Use a subdomain.

Avoid hosting under a sub-path like /crosswatch/.

If CrossWatch runs in Docker

Point proxy_pass to the container on a user-defined Docker network.

Example:

  • NGINX container: nginx

  • CrossWatch container: crosswatch

  • Network: proxy

Use:

  • proxy_pass http://crosswatch:8787;

Webhooks and Watcher (important)

CrossWatch exposes inbound webhook endpoints.

See:

Webhooks (inbound)

Your proxy must:

  • Allow POST to /webhook/*.

  • Not rewrite the path.

  • Not block unknown content types.

    • Plex can send form-style payloads.

    • Jellyfin/Emby plugins usually send JSON.

circle-exclamation

If you put CrossWatch behind login, do one of these:

  1. Exempt /webhook/* from auth.

  2. IP-allowlist your media server's IP for /webhook/*.

  3. Keep webhooks LAN-only. Do not proxy them.

circle-exclamation

Watcher (outbound)

Watcher mostly makes outbound calls to Plex/Jellyfin/Emby.

Reverse proxying CrossWatch is not required for Watcher itself.

One exception:

  • 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

circle-info

If you’re behind an upstream proxy/CDN (Cloudflare, etc.), it may have its own hard timeout.

In that case, bypass the CDN for your CrossWatch hostname.

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, CrossWatch should still behave as HTTPS to clients.

  • HTTPS/TLS (TLS options and why the proxy approach is recommended)

  • Docker setup (ports, volumes, restart policy)

Last updated

Was this helpful?