mirror of
https://github.com/swissmakers/fail2ban-ui.git
synced 2026-03-26 11:03:24 +01:00
3.6 KiB
3.6 KiB
Configuration reference
This document describes common runtime settings and related operational behavior. Most runtime options are configured in the UI and stored in the database. Environment variables override behavior where applicable.
Network and listener settings
PORT
HTTP listen port. Default:8080.BIND_ADDRESS
Listen address. Default:0.0.0.0.
Recommended with local reverse proxy:127.0.0.1.
Example:
-e PORT=3080 -e BIND_ADDRESS=127.0.0.1
For production reverse proxy patterns, see docs/reverse-proxy.md.
Callback URL and secret (Fail2Ban -> UI)
Fail2Ban UI receives ban/unban callbacks at:
POST /api/banPOST /api/unban
Required environment variables:
CALLBACK_URL
URL reachable from managed Fail2Ban hosts.CALLBACK_SECRET
Shared secret validated viaX-Callback-Secretheader.
If not set, Fail2Ban UI generates a secret on first start.
Example:
-e CALLBACK_URL=http://10.88.0.1:3080 \
-e CALLBACK_SECRET='replace-with-a-random-secret'
Privacy and telemetry controls
DISABLE_EXTERNAL_IP_LOOKUP=true
Disables external public-IP lookup used in UI display.UPDATE_CHECK=false
Disables GitHub release update checks.
UI behavior flags
AUTODARK=false(default)
Enables automatic dark mode based on browser/OS preference only whentrue.
Default behavior remains light mode.
Fail2Ban configuration migration
JAIL_AUTOMIGRATION=true
EXPERIMENTAL migration from monolithicjail.localtojail.d/*.local.
Recommended: migrage manually on production systems.
Alert settings (UI-managed)
Configure in Settings -> Alert Settings:
- Provider:
email|webhook|elasticsearch - Enable alerts for bans/unbans
- Alert country filters
- GeoIP provider and log-line limits
Detailed provider behavior and payloads:
Threat intelligence settings (UI-managed)
Configure in Settings -> Alert Settings:
threatIntel.provider:none|alienvault|abuseipdbthreatIntel.alienVaultApiKey(foralienvault)threatIntel.abuseIpDbApiKey(forabuseipdb)
Runtime notes:
- Queries are executed server-side via
GET /api/threat-intel/:ip - Successful responses are cached for 30 minutes (provider+IP)
- Upstream
429triggers retry-window/backoff with stale-cache fallback
See docs/threat-intel.md for full details.
OIDC authentication
Required when enabled:
OIDC_ENABLED=trueOIDC_PROVIDER=keycloak|authentik|pocketidOIDC_ISSUER_URL=...OIDC_CLIENT_ID=...OIDC_CLIENT_SECRET=...OIDC_REDIRECT_URL=https://<ui-host>/auth/callback
Common optional variables:
OIDC_SCOPES=openid,profile,emailOIDC_SESSION_SECRET=<32+ bytes recommended>OIDC_SESSION_MAX_AGE=3600OIDC_USERNAME_CLAIM=preferred_usernameOIDC_SKIP_VERIFY=false(development only)OIDC_SKIP_LOGINPAGE=false
Provider notes:
- Keycloak: allow redirect URI
/auth/callbackand post-logout redirect/auth/login - Authentik/Pocket-ID: redirect URI must match exactly
Related:
- OIDC dev stack:
development/oidc/README.md
Email template style
emailStyle=classic
Uses the classic email template instead of the default modern template (Email provider only).