Running behind a reverse proxy
Complete guide for running FileBrowser Quantum behind reverse proxies including nginx, Traefik, and Caddy with authentication, SSL, and performance optimizations.
FileBrowser Quantum is designed to work seamlessly behind reverse proxies with proper configuration. This guide covers all major proxy types with complete examples.
Overview
FileBrowser Quantum separates public and private endpoints to work efficiently with reverse proxies:
- Public endpoints (
/public) - Designed for share access without reverse proxy authentication. - Cookie-based authentication - Requires proper Host header forwarding
- Real-time features - SSE support with proper proxy configuration
Public Route Structure
FileBrowser Quantum includes a dedicated /public route that contains:
/public/api/- Public API endpoints for share access (hash-based authentication)/public/share/- Share pages (can work with or without user authentication)/public/static/- Static assets (CSS, JavaScript, images)
The /public routes are designed to allow shares to function fully without requiring authentication at the reverse proxy level. This enables share links to work even when the reverse proxy requires authentication for other routes. Public routes also use stricter logging to prevent sensitive information leakage.
Route Authentication Requirements
| |
When configuring your reverse proxy, you can:
- Require authentication for
/api/and other private routes - Allow public access to
/public/routes for share functionality
Basic Requirements
Essential Headers
All reverse proxy configurations must include these headers:
Note: FileBrowser Quantum also supports X-Forwarded-Host as an alternative to the Host header for cookie domain scoping.
Client IP and trusted headers
This applies to version v1.4.x and later
FileBrowser uses the client IP for authentication rate limiting and failed-login lockout. When traffic passes through a reverse proxy, the connection address seen by FileBrowser is the proxy — not the end user — unless you forward the real client IP and tell FileBrowser to trust those headers.
Also, the IP that shows in logging will use the value from the proxy if these are set.
Configure your proxy to set X-Forwarded-For (recommended) or X-Real-IP, then enable the same headers in FileBrowser:
Without http.trustedHeaders, every user appears to share the proxy’s IP. Rate limits and lockouts then apply to all clients behind that proxy collectively, not per user.
Only add headers to http.trustedHeaders when FileBrowser is behind a proxy that controls these headers. If users can reach FileBrowser without going through your proxy, they can spoof X-Forwarded-For and bypass per-IP limits.
See HTTP settings: trustedHeaders and built-in authentication rate limiting for details.
FileBrowser Configuration
Configure FileBrowser to work with your reverse proxy:
nginx Configuration
Minimal nginx configuration for FileBrowser Quantum:
| |
The /public route allows shares to function without reverse proxy authentication. This means share links (/public/share/<hash>) will work even if you require authentication for other routes. The share itself may still require a password or user restrictions as configured in FileBrowser.
With Authentication Proxy
For environments using external authentication:
| |
When using external authentication, ensure your auth service sets the X-Forwarded-User header with the username. FileBrowser will use this for proxy authentication.
Traefik Configuration
Basic Traefik labels for FileBrowser Quantum:
| |
Caddy Configuration
Minimal Caddy configuration:
| |
Upload Configuration
Essential settings for file uploads:
Nginx
client_max_body_size 10G;
proxy_buffering off;Traefik
- "traefik.http.middlewares.filebrowser-buffering.buffering.maxRequestBodyBytes=0"Caddy
reverse_proxy filebrowser:80 {
header_up Connection {>Connection}
header_up Transfer-Encoding {>Transfer-Encoding}
}Server-Sent Events (SSE) Configuration
FileBrowser Quantum uses SSE for real-time features. Essential settings:
- Traefik should handle most of this automatically if is configured properly.
Authorization Header Handling
If your reverse proxy sets authorization headers, you may need to clear them for FileBrowser to avoid conflicts with its own authentication system.
Troubleshooting
Common Issues
Authentication Failures
Symptoms: Users can't log in, cookies not working.
Solution: Ensure Host header is properly forwarded:
Upload Failures
Symptoms: Large file uploads fail
Solution: Increase file size limit and disable buffering:
SSE Not Working
Symptoms: Real-time features not updating
Solution: Disable buffering
Next Steps
- HTTP Settings - Trusted headers and auth rate limiting
- Proxy Authentication - Configure header-based authentication
- Office Integration - OnlyOffice behind reverse proxy
- Traefik Setup - Filebrowser + OnlyOffice behind traefik reverse proxy.