Gideon resource library

Self-hosted identity on Docker Compose and Kubernetes

Separate web SSO from directory and domain-controller requirements, then choose a deployment model that matches the workload and operating team.

Start with the identity problem, not the orchestrator

Putting SSO in front of web applications requires an OIDC, OAuth 2.0, or SAML identity provider. Joining Windows devices to a domain and issuing Kerberos tickets requires directory and domain-controller capabilities. These are different workloads even when both are called self-hosted identity.

Keycloak and Authentik are application identity providers. Authelia is commonly used with a reverse proxy to protect web applications. Samba Active Directory Domain Controller and FreeIPA address directory, Kerberos, DNS, and host-integration needs. Select the category first, then choose Compose or Kubernetes.

Docker Compose options

OptionBest fitOperational boundary
Keycloak with PostgreSQLStandards-based SSO, enterprise federation, realms, and extensibilityOperate the database, TLS, backups, upgrades, and any providers or extensions
Authentik with PostgreSQLVisual authentication flows, proxy outposts, and Blueprint-driven configurationOperate server and worker services, database, outposts, email, backups, and upgrades
Authelia with a reverse proxyAdding an authentication gate to reverse-proxied servicesIt is not a drop-in replacement for every full identity-provider or directory requirement
FreeIPA or Samba AD DCHost and directory identity rather than only web SSOStateful networking, DNS, Kerberos, storage, and recovery require specialized design

Kubernetes options

  • Keycloak. The official Operator manages Keycloak deployments, but the database remains an external prerequisite. The KeycloakRealmImport custom resource creates new realms; it does not continuously update or delete existing realms.
  • Authentik. The official Helm chart packages the application for Kubernetes. Blueprints can define identity objects, while database durability, ingress, secrets, outposts, backup, and upgrade testing remain operator responsibilities.
  • Directory services. Samba AD DC and FreeIPA are stateful, hostname- and network-sensitive services. A container image does not make DNS, Kerberos, persistent storage, replication, or disaster recovery stateless.

Production readiness checklist

  • Use an external or highly available database design with explicit backup, restore, encryption, and credential-rotation procedures.
  • Define stable hostnames, TLS issuance and renewal, trusted proxy ranges, ingress behavior, email dependencies, and outbound network requirements.
  • Test login, logout, token refresh, user lifecycle, directory synchronization, passkey recovery, and administrative break-glass access during dependency failures.
  • Pin versions, read release notes, test upgrades with production-like configuration, and keep a documented rollback or recovery path.
  • Monitor user-facing authentication, administrative events, queues or workers, database health, certificates, sync jobs, and backup completion.

Primary references

Related resources

Back to topic hub