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-ProtoandX-Real-IP. The backend runs withTRUST_PROXY_HEADERS=trueand takes the client address from these headers. - Pass WebSocket upgrades (
UpgradeandConnectionheaders) and keep long connections open. - Accept large request bodies. The shipped nginx template allows 250 MB.
- Allow large response headers. Next.js sends long
Linkpreload headers; nginx’s default 4k/8k proxy buffers answer them with a 502.
Pick a setup
| Setup | Written by the installer | Page |
|---|---|---|
| nginx | Yes, from .github/docker/{plaintext,ssl}/nginx.conf | nginx |
| Apache | Yes, from .github/docker/{plaintext,ssl}/apache2.conf | Apache |
| Caddy | No template in the repository | Caddy |
| Cloudflare Tunnel | Yes, cloudflared from Cloudflare’s APT repository | Cloudflare Tunnel |
| Direct access | Nothing to write: http://YOUR_IP:4831 | For 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/featherpanelafter 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.