
Authelia
The Single Sign-On Multi-Factor portal for reverse proxies alternative to Okta.
Why consider Authelia?
Authelia is an open-source authentication server that adds 2FA and Single Sign-On to reverse proxies (Traefik, Nginx, Caddy). It supports TOTP, WebAuthn/Duo, and LDAP.
Learn Authelia by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide10 sections
What is Authelia?
Authelia is an open-source, high-performance authentication server and Single Sign-On (SSO) gateway written in Go. Designed to integrate seamlessly with reverse proxies like Traefik, Nginx, Caddy, Envoy, and HAProxy, Authelia protects web applications by requiring multi-factor authentication before proxying requests to downstream services.
It serves as a lightweight, on-premises alternative to proprietary enterprise identity and access management tools like Okta, Duo Security, and Cloudflare Access.
Who Is It For?
- Sysadmins & DevOps Engineers: Protecting internal infrastructure dashboards (Kibana, Proxmox, Sonarr, Grafana) behind multi-factor authentication with minimal resource overhead.
- Security Teams: Enforcing two-factor authentication policies (WebAuthn hardware tokens, TOTP apps) across distributed microservices.
- Homelabbers: Implementing seamless Single Sign-On across all private local domain subdomains (
*.home.example.com).
Key Features
- Native reverse proxy Forward Auth integration for Traefik, Nginx, Caddy, HAProxy, and Envoy.
- Built-in OpenID Connect (OIDC) identity provider server for modern applications with native SSO.
- Multiple second-factor authentication methods: FIDO2 WebAuthn (YubiKey), TOTP authenticator apps, Duo Push notifications.
- Flexible user directory backends: File-based YAML, LDAP, or Active Directory.
- Granular access control policies: Enforce 1FA, 2FA, or bypass rules based on user groups, requested resource paths, or source IP subnets.
Deploying Authelia with Docker Compose
version: '3.8'services: authelia: image: authelia/authelia:latest container_name: authelia restart: unless-stopped volumes: - ./config:/config ports: - 9091:9091 environment: - TZ=UTC depends_on: - redis redis: image: redis:7-alpine container_name: authelia_redis restart: unless-stopped volumes: - ./redis_data:/dataCreate config/configuration.yml specifying your session secrets, user database, and access control rules:
jwt_secret: a_very_secure_jwt_secret_string_32_charsdefault_redirection_url: https://auth.example.comserver: host: 0.0.0.0 port: 9091log: level: infosession: name: authelia_session domain: example.com secret: a_very_secure_session_secret_32_charsstorage: local: path: /config/db.sqlite3notifier: filesystem: filename: /config/notification.txtaccess_control: default_policy: deny rules: - domain: "secure.example.com" policy: two_factorStart the instance:
docker compose up -dPractical Use Cases
1. Forward Auth Gateway for Traefik
A DevOps team configures Traefik with an authelia middleware; all requests to *.internal.company.com verify authentication tokens with Authelia before hitting backend services.
2. YubiKey Hardware Token Enforcement
An administrator configures strict policies requiring FIDO2 WebAuthn physical security keys for accessing production deployment control panels.
3. Subnet-Based Access Policy Filtering
A homelabber configures Authelia to allow 1FA password login from the local home Wi-Fi subnet (192.168.1.0/24), but mandate 2FA WebAuthn verification when accessing from external public IPs.
Troubleshooting and Limitations
- Root Domain Cookie Scope: Ensure the session cookie domain is configured to your top-level domain (
example.com) so session authentication persists across all subdomains (app1.example.com,app2.example.com). - Notification Provider: For production two-factor onboarding, replace the filesystem notifier with an active SMTP email provider so users receive secure enrollment links.
Official Resources
- Official Website: https://www.authelia.com
- GitHub Repository: https://github.com/authelia/authelia
- Documentation: https://www.authelia.com/docs/
Related tools
More options with a similar category or technology profile.
boringproxy
Simple, self-hosted reverse proxy and tunnel manager for exposing private web services securely.
OWASP ModSecurity
Open-source Web Application Firewall (WAF) engine providing cross-platform HTTP security inspection.
OpenCTI
Open-source platform for managing cyber threat intelligence knowledge and STIX2 relationships.
Maltrail
Malicious traffic detection system utilizing public blacklists and heuristic traffic behavior analysis.