OIDC Authentication
Integrate with OpenID Connect providers for single sign-on.
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.
OIDC callback URL: FileBrowser does not use http.externalUrl for OIDC. Register your provider callback from the URL you actually use to log in (for example https://files.example.com/files/api/auth/oidc/callback). See Callback URL below.
Basic Setup
If you need group claims, add them to scopes (for example groups) per your provider.
Configuration Options
| Option | Description |
|---|---|
enabled | Enable OIDC authentication |
clientId | OIDC client ID |
clientSecret | OIDC client secret (use env var) |
issuerUrl | OIDC provider URL |
scopes | Requested scopes |
userIdentifier | User field (preferred_username, email, username, phone) |
adminGroup | OIDC group name for admin rights |
userGroups | List of allowed groups (empty = allow all) |
groupsClaim | JSON field for groups (default: groups) |
disableVerifyTLS | Disable TLS verification (testing only!) |
logoutRedirectUrl | Provider logout URL |
Defaults (when omitted): groupsClaim is groups, userIdentifier is preferred_username, and scopes defaults to openid email profile.
Deprecated: createUser in this block is deprecated — omit it; new users are created automatically when OIDC login succeeds.
Issuer URL Examples
Authentik:
| |
Pocket ID/Authelia:
| |
Callback URL
Append /api/auth/oidc/callback to the end of your base URL to get FileBrowser’s OIDC callback URL.
Configure in your OIDC provider:
| |
If you use a custom baseURL in your config.yaml:
| |
Reverse proxy
When FileBrowser sits behind HTTPS nginx, Traefik, or Caddy, the incoming request often arrives as http:// with the proxy’s internal host. Configure forwarded headers so the request-derived callback uses the browser-facing scheme and host.
v2.0.0+ — single boolean (replaces the v1.4.x–v1.5.x trustedHeaders list):
v1.4.x–v1.5.x — list the forwarding headers your proxy sets:
Your proxy must send at least X-Forwarded-Proto: https and X-Forwarded-Host matching the browser URL. Without header trust enabled, the callback may register as http:// or the wrong host and your OIDC provider will reject login.
On v2.0.0+, FileBrowser logs a warning when OIDC is enabled but trustProxyHeaders is false.
See Running behind a reverse proxy and HTTP reverse-proxy headers.
Auto-Redirect
When OIDC is the only auth method, users are automatically redirected to the OIDC provider.
Provider Examples
Authentik
Typical settings when Authentik exposes groups and an optional admin group mapping:
Authelia
Minimal Authelia client configuration:
Group-Based Access Control
On successful OIDC login, groups from groupsClaim are synced into FileBrowser’s access-control GroupMap (write-through to the database) so group allow/deny rules apply. For path-level group isolation, use denyByDefault on the source.
Admin Group
Grant admin privileges to users in a specific OIDC group:
Restrict login to Specific Groups
Only allow users in specific OIDC groups to access FileBrowser:
Users not in these groups will be denied access even with valid OIDC authentication.