View .md

Web server and reverse proxy

Put nginx, Apache, Caddy or a Cloudflare Tunnel in front of FeatherPanel. What the proxy must forward, and which setups the installer writes for you.

On this page

In a Docker install the frontendv2 container answers on host port 4831 (or the port you set) and serves the whole panel: the Next.js pages and, through its own nginx, /api, /attachments, /addons, /pma and /webmail from the backend. A reverse proxy on the host therefore needs one upstream: http://127.0.0.1:4831.

What the proxy has to do

  • Forward Host, X-Forwarded-For, X-Forwarded-Proto and X-Real-IP. The backend runs with TRUST_PROXY_HEADERS=true and takes the client address from these headers.
  • Pass WebSocket upgrades (Upgrade and Connection headers) and keep long connections open.
  • Accept large request bodies. The shipped nginx template allows 250 MB.
  • Allow large response headers. Next.js sends long Link preload headers; nginx’s default 4k/8k proxy buffers answer them with a 502.

Pick a setup

SetupWritten by the installerPage
nginxYes, from .github/docker/{plaintext,ssl}/nginx.confnginx
ApacheYes, from .github/docker/{plaintext,ssl}/apache2.confApache
CaddyNo template in the repositoryCaddy
Cloudflare TunnelYes, cloudflared from Cloudflare’s APT repositoryCloudflare Tunnel
Direct accessNothing to write: http://YOUR_IP:4831For a home lab or tests only

Re-applying the installer templates

The installer’s Panel > Web Server menu (Docker mode) has three actions:

  • Reapply Nginx Config: downloads the latest template, keeps your domain, uses the SSL template when a certificate exists, and overwrites /etc/nginx/sites-available/featherpanel after taking a backup.
  • Reapply Apache Config: the same for /etc/apache2/sites-available/featherpanel.conf.
  • Patch Nginx Proxy Buffers Only: adds the larger proxy buffers to your existing site without replacing it. Use it when the panel returns 502 or “upstream sent too big header” after an update.