This directory contains the Authentik Compose definition and tracked
blueprints. For the one-time deployment, break-glass administrator, MFA,
recovery, Google federation, and backup procedure, read
docs/authentik.md.
Set AUTHENTIK_SECRETS_PATH in config/docker/<host>/.env.authentik to this
directory. Do not commit the generated files.
Application SSO
For adding or migrating applications to Authentik, read
app-onboarding.md.
Authentik is an identity provider and SSO platform supporting OIDC, OAuth2,
SAML, LDAP, social login sources, and proxy authentication outposts.
The embedded proxy outpost is used, so the worker does not need access to the
Docker socket. Do not change the sso hostname after configuring OIDC clients;
it forms part of the permanent issuer URL.
Backup
backup.yaml defines nightly PostgreSQL database/role exports under
${DB_BACKUP_ROOT}/security-authentik/. Restore with Authentik’s
data, templates, certificates and original secret key; recover identity before
dependent SSO applications. See the backup guide
for export commands, B2 coverage, retention and snapshot selection.
Recovery
Recover database.dump, globals.sql and the manifest. With server/worker
stopped, restore required roles and the authentik database into a compatible
dedicated PostgreSQL destination with the original ownership.
Restore ${DOCKER_VOLUMES}/authentik/{data,certs,templates}, tracked
blueprints/Compose configuration and original ignored authentik/secret-key
and authentik/postgresql-password. Preserve signing keys, OIDC settings and
the issuer hostname; do not generate replacement setup secrets for a restore.
Start PostgreSQL, then the matching Authentik server/worker images. Recover
identity access before starting dependent SSO applications.
The DB export does not inventory every required application file automatically;
confirm these files/secrets exist in the selected recovery copies.
Post-restore check
Restore the original secret key and paired state with the PostgreSQL dump. Check
container health, sign in with the retained local administrator, and confirm one
dependent application’s OIDC login. Keep the original issuer hostname.
name: authentikservices:
postgresql:
image: postgres:16.15-alpine3.24@sha256:721873c34ceb9f8d8fc265984940dc982404c105f19ad51be9fdc5970a6080eacontainer_name: authentik-postgresqlrestart: unless-stoppedenvironment:
POSTGRES_DB: authentikPOSTGRES_USER: authentikPOSTGRES_PASSWORD_FILE: /run/secrets/authentik-postgresql-passwordPOSTGRES_INITDB_ARGS: --data-checksumssecrets:
- authentik-postgresql-passwordvolumes:
- ${DOCKER_VOLUMES}/authentik/postgresql:/var/lib/postgresql/datanetworks:
- authentik-backendhealthcheck:
test: ["CMD-SHELL", "pg_isready -d authentik -U authentik"]
interval: 30stimeout: 5sretries: 5start_period: 20slabels:
traefik.enable: falseserver:
image: authentik/server:2026.8.5@sha256:602227a86455d6772e3d16b7d852713c4f864f40df5df894abd1285bb53979a5container_name: authentik-serverrestart: unless-stoppedcommand: servershm_size: 512mbenvironment:
AUTHENTIK_POSTGRESQL__HOST: postgresqlAUTHENTIK_POSTGRESQL__NAME: authentikAUTHENTIK_POSTGRESQL__USER: authentik# kics-scan ignore-line -- value is loaded from a mounted Compose secret.AUTHENTIK_POSTGRESQL__PASSWORD: file:///run/secrets/authentik-postgresql-password# kics-scan ignore-line -- value is loaded from a mounted Compose secret.AUTHENTIK_SECRET_KEY: file:///run/secrets/authentik-secret-keyAUTHENTIK_ERROR_REPORTING__ENABLED: "false"secrets:
- authentik-postgresql-password - authentik-secret-keyvolumes:
- ${DOCKER_VOLUMES}/authentik/data:/data - ${DOCKER_VOLUMES}/authentik/templates:/templates - ./config/blueprints:/blueprints:ronetworks:
- authentik-backend - security-authentikdepends_on:
postgresql:
condition: service_healthylabels:
traefik.enable: truetraefik.docker.network: security-authentiktraefik.http.routers.authentik.rule: Host(`sso.${MYDOMAIN}`)traefik.http.routers.authentik.middlewares: localaccess@filetraefik.http.services.authentik.loadbalancer.server.port: 9000homepage.group: Securityhomepage.name: Authentikhomepage.icon: authentik.pnghomepage.href: https://sso.${MYDOMAIN}/homepage.description: "Identity provider and SSO platform"worker:
image: authentik/server:2026.8.5@sha256:602227a86455d6772e3d16b7d852713c4f864f40df5df894abd1285bb53979a5container_name: authentik-workerrestart: unless-stoppedcommand: workershm_size: 512mbenvironment:
AUTHENTIK_POSTGRESQL__HOST: postgresqlAUTHENTIK_POSTGRESQL__NAME: authentikAUTHENTIK_POSTGRESQL__USER: authentik# kics-scan ignore-line -- value is loaded from a mounted Compose secret.AUTHENTIK_POSTGRESQL__PASSWORD: file:///run/secrets/authentik-postgresql-password# kics-scan ignore-line -- value is loaded from a mounted Compose secret.AUTHENTIK_SECRET_KEY: file:///run/secrets/authentik-secret-keyAUTHENTIK_ERROR_REPORTING__ENABLED: "false"secrets:
- authentik-postgresql-password - authentik-secret-keyvolumes:
- ${DOCKER_VOLUMES}/authentik/data:/data - ${DOCKER_VOLUMES}/authentik/certs:/certs - ${DOCKER_VOLUMES}/authentik/templates:/templates - ./config/blueprints:/blueprints:ronetworks:
- authentik-backenddepends_on:
postgresql:
condition: service_healthylabels:
traefik.enable: falsenetworks:
authentik-backend:
security-authentik:
external: truesecrets:
authentik-postgresql-password:
file: ${AUTHENTIK_SECRETS_PATH:?Authentik secrets path is required}/postgresql-passwordauthentik-secret-key:
file: ${AUTHENTIK_SECRETS_PATH:?Authentik secrets path is required}/secret-key