Fireshare ships with a production-grade Nginx server inside the container that already handles static file serving, video streaming with byte-range support, auth-gated content, and routing to the Python backend. For most home-lab deployments, however, you will want a front-end reverse proxy to terminate SSL, serve your instance on port 443 with a real domain, and potentially share one IP across several services. This page covers the required settings for Nginx, Traefik, and Caddy so that large video uploads, streaming, and the real-time SSE event stream all work correctly.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ShaneIsrael/fireshare/llms.txt
Use this file to discover all available pages before exploring further.
Do not include
http:// or https:// in the DOMAIN environment variable. Set it to the bare domain only, for example DOMAIN=v.example.com. The scheme is added by Fireshare internally when building Open Graph URLs and webhook payloads.Why a Reverse Proxy
| Concern | Benefit |
|---|---|
| SSL/TLS termination | Serve Fireshare over HTTPS without modifying the container |
| Custom domain | Map v.example.com to the container on any port |
| Port 80/443 | No need to expose Fireshare directly on a privileged port |
| Multiple services | Share one IP and one SSL certificate across many containers |
| Request logging | Centralise access logs with real client IPs via X-Forwarded-For |
Nginx
The example below assumes Fireshare is reachable atfireshare:80 (Docker network alias). Replace the upstream address with your container’s IP or hostname as needed.
Key directives explained
| Directive | Value | Reason |
|---|---|---|
client_max_body_size | 0 | Removes the upload size cap at the proxy layer |
proxy_read_timeout | 999999s | Prevents proxy from killing long-running uploads |
proxy_buffering | off | Streams video bytes and SSE events without accumulating them in proxy memory |
X-Forwarded-For | $proxy_add_x_forwarded_for | Propagates the real client IP so Fireshare logs correctly |
X-Forwarded-Proto | $scheme | Lets Fireshare know whether the original request was HTTP or HTTPS |
Traefik
Traefik requires two adjustments: increasing the server transport read timeout, and removing the default body size restriction. The labels below are for Docker Compose with the Traefik Docker provider.Traefik’s default
responseHeaderTimeout of 0s already disables the timeout in recent versions, but the readTimeout on the entrypoint may still apply. Check your Traefik version’s documentation if uploads are still timing out.Caddy
Caddy handles HTTPS automatically via Let’s Encrypt. The key additions arerequest_body to allow unlimited upload sizes and ensuring the proxy directive does not add buffering overhead.
The SSE Event Stream
The/api/admin/stream endpoint delivers real-time transcoding and game-scan status using Server-Sent Events. The internal Nginx already configures this location with proxy_buffering off and a 24-hour read timeout. If you add a front proxy, apply the same treatment to that path:
Common Issues
413 Request Entity Too Large
413 Request Entity Too Large
This error is returned by your front Nginx (not the Fireshare-internal Nginx) when Add this line inside your
client_max_body_size is not set or is set too low. The fix is:server {} block. A value of 0 means unlimited.502 Bad Gateway
502 Bad Gateway
A 502 typically means the proxy can reach the container’s port but the backend process (gunicorn) is not yet ready. This often happens within the first few seconds of container startup while Fireshare initialises the database and scans for existing videos.Wait 10–15 seconds and refresh. If the 502 persists, check container logs:Also verify your upstream address is correct and the container is running:
Uploads time out mid-transfer
Uploads time out mid-transfer
Large uploads over slow connections can take several minutes. If the proxy kills the connection before the upload finishes, set:For Traefik, set
responseHeaderTimeout and readTimeout in your static configuration. For Caddy, the default transport has no hard timeout, but confirm no middleware is imposing one.Video playback stutters or buffers
Video playback stutters or buffers
Buffering proxies accumulate the entire video before forwarding it, which adds latency and can exhaust proxy memory. Set
proxy_buffering off at the front proxy to let bytes flow directly from the container to the client. The internal Nginx in Fireshare uses sendfile and directio for efficient disk-to-network transfer.Open Graph previews show wrong domain
Open Graph previews show wrong domain
If shared links on Discord or Slack show an incorrect or empty preview image URL, the Not
DOMAIN environment variable is either unset or includes a scheme prefix. Set it to the bare domain used by your proxy:https://v.example.com. See Environment Variables for the full reference.