Why Authentik?

One login for everything. Authentik replaces per-app authentication:

  • SSO for all apps — OIDC, SAML, LDAP, proxy auth.
  • MFA/2FA — TOTP, WebAuthn/YubiKey, SMS, email.
  • User management — Groups, roles, per-app permissions.
  • Branded login pages — Custom CSS, logos, flows.
  • Self-enrollment — Users register and reset passwords.
  • Audit log — Every login and action is recorded.

Prerequisites

  • Docker with docker-compose.
  • At least 2 GB RAM.
  • Domain name with HTTPS.

Deploy with Docker Compose

# docker-compose.yml (simplified)
services:
  postgresql:
    image: postgres:16-alpine
    volumes:
      - ./database:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: authentik
      POSTGRES_USER: authentik
      POSTGRES_PASSWORD: ${PG_PASS}

  redis:
    image: redis:alpine

  server:
    image: ghcr.io/goauthentik/server:latest
    command: server
    environment:
      AUTHENTIK_REDIS__HOST: redis
      AUTHENTIK_POSTGRESQL__HOST: postgresql
      AUTHENTIK_POSTGRESQL__USER: authentik
      AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS}
      AUTHENTIK_SECRET_KEY: ${AUTHENTIK_SECRET_KEY}
    ports:
      - "9000:9000"
      - "9443:9443"

  worker:
    image: ghcr.io/goauthentik/server:latest
    command: worker
    environment:
      AUTHENTIK_REDIS__HOST: redis
      AUTHENTIK_POSTGRESQL__HOST: postgresql
      AUTHENTIK_POSTGRESQL__USER: authentik
      AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS}
      AUTHENTIK_SECRET_KEY: ${AUTHENTIK_SECRET_KEY}

Protocol Selection Guide

ProtocolBest ForExample Apps
OIDC/OAuth2Modern web appsGrafana, Portainer, Gitea, Nextcloud
SAML 2.0Enterprise appsAWS, Salesforce, Google Workspace
LDAPLegacy appspfSense, FreeNAS, older apps
Proxy/Forward AuthApps without SSOAny web app behind Nginx/Traefik

MFA Methods

MethodSecurityUser Experience
TOTP (authenticator app)GoodFamiliar, works offline
WebAuthn/FIDO2 (YubiKey)ExcellentOne-tap, phishing-resistant
SMSBasicConvenient but interceptable
Email codeBasicFallback option
Static recoveryEmergencyOne-time backup codes

Authentik vs Alternatives

FeatureAuthentikKeycloakAutheliaZitadel
ProtocolsOIDC, SAML, LDAP, ProxyOIDC, SAML, LDAPProxy/Forward auth onlyOIDC, SAML
User managementFull UI + APIFull UI + APIConfig filesFull UI + API
Branded flowsVisual editorTheme templatesLimitedTemplates
MFATOTP, WebAuthn, SMSTOTP, WebAuthnTOTP, WebAuthnTOTP, OTP
Resource usage~1 GB RAM~1.5 GB RAM~50 MB RAM~500 MB RAM
Best forFull IdP + brandingEnterprise JavaLightweight proxy authCloud-native

Troubleshooting

ProblemSolution
OIDC redirect loopVerify redirect URIs match exactly in both Authentik and the app
LDAP bind failsCheck the LDAP provider settings and the search base DN
MFA locked outUse recovery token or admin reset in Authentik dashboard
Proxy auth 401Verify forward auth headers match your reverse proxy config

Summary

  • Single sign-on for all self-hosted apps via OIDC, SAML, LDAP, or proxy auth.
  • Multi-factor authentication with TOTP, WebAuthn, and backup codes.
  • Self-hosted Auth0/Okta — your identity data stays on your server.
  • Visual flow editor for custom login experiences.