Proxy Authentication
Authenticate based on HTTP headers – strictly designed to be used behind a reverse proxy.
Configure source access for new users
Authentication alone does not grant file access. When a user is created (password signup, admin/CLI create, or first login via OIDC / LDAP / JWT / proxy), they only receive sources where config.defaultEnabled: true.
- Default is
false— without this, new users may log in but see no files - One source in config: FileBrowser auto-enables
defaultEnabledfor that source - Multiple sources: set
defaultEnabled: trueon each source new users should access
See Sources: defaultEnabled for full details and examples.
Configuration
If proxy authentication is enabled and a server is accessed without a proxy, FileBrowser will blindly accept the headers. If anyone can bypass the proxy, they can login as any proxy-based user. Take care to configure your environment securely when using this method.
| |
v2.1.0+: groupsClaim, adminGroup, and userGroups enable role-based access for proxy auth. For proxy auth, groupsClaim is the HTTP header name (for example x-cosmos-role), not a JSON claim field. Versions before v2.1.0 ignore these options; admin is only granted when the proxy username matches auth.adminUsername.
Options
| Option | Description |
|---|---|
enabled | Enable proxy authentication |
header | Required. Header whose value is trusted as the username (must sit behind a trusted proxy) |
adminGroup | v2.1.0+. Group/role header value that grants admin privileges |
userGroups | v2.1.0+. If set, only users whose group/role header value is in this list may log in |
groupsClaim | v2.1.0+. HTTP header name for the user’s group/role (required when userGroups or adminGroup is set) |
userIdentifier | Field to use as username when not using the raw header value in composite setups |
disableVerifyTLS | Disable TLS verification for any outbound calls (testing only) |
logoutRedirectUrl | Optional URL to redirect after logout |
Deprecated: createUser in this block is deprecated and ignored for new configs — user provisioning behavior is always on for supported methods.
Sources for proxy users
Proxy users are auto-created on first successful header auth. Source access follows the callout at the top of this page. From v2.1.0+, proxy auth syncs group/role header values into the access-control GroupMap (write-through to the database), same as OIDC / LDAP / JWT.
Example Use Cases
- Corporate SSO via proxy
- Kubernetes ingress authentication
- Nginx auth_request module
- Traefik ForwardAuth
- Cosmos Cloud auth proxy with role headers
Cosmos Cloud Example (v2.1.0+)
Cosmos Cloud sends a username header and a numeric role header (0 = guest, 1 = user, 2 = admin):
Expected behavior:
- Role
0(guest): login denied, user not created - Role
1(user): regular user access - Role
2(admin): regular access plus admin privileges
Traefik Example
Nginx Example
| |
FileBrowser config:
auth.methods.proxy.header names the username header. Client IP and scheme/host forwarding use http.trustProxyHeaders (v2.0.0+) or http.trustedHeaders (v1.4.x–v1.5.x) — see HTTP reverse-proxy headers.