Skip to main content
Version: v7

Configure HTTPS and a reverse proxy

Forward the public HTTPS origin to Chibisafe's frontend on port 24424. The API listens on container loopback and is reached through the frontend.

files.example.com {
reverse_proxy 127.0.0.1:24424
}

This example assumes the proxy runs on the Docker host. If the proxy runs in another container, use an upstream it can reach, such as the Chibisafe service name on a shared network. Restrict direct access to that upstream.

  • Preserve the public Host and forward each path unchanged, including /api/*, OAuth discovery under /.well-known/, and direct media links.
  • Support streaming upload bodies and responses. Set request size limits and timeouts so they accommodate uploads, ZIP downloads, and the persistent server event stream.
  • Set PUBLIC_ORIGIN to the same HTTPS origin users open. Sessions and passkeys depend on the configured origin.
  • Set FRONTEND_TRUST_PROXY_HOPS to the number of trusted external proxies. The edge must set or append the actual client address to X-Forwarded-For. Use zero to ignore external forwarding.

Both the clean media paths, such as /thumbnails/<filename>, and older /api/media/* paths go to the same upstream. Keep range requests and cache validators intact. Media caches must respect revalidation so that quarantine and deletion take effect.

After setup, check HTTPS login, /api/ready, a small upload, and its copied link from a different browser session. For failed uploads or disconnects, see troubleshooting.