OSI-licensed only · self-hostable

Open-Source Keycloak Alternatives (2026)

Keycloak is itself open source (Apache-2.0), an identity and access management server offering user federation, strong authentication, user management and fine-grained authorisation. Teams look at alternatives when they want a lighter footprint, a friendlier admin experience, a headless API-first design, or a tighter fit for a reverse proxy or Kubernetes.

Every tool below is under an OSI-approved licence (MIT, Apache-2.0, AGPL-3.0 or MPL-2.0), checked against its repository. Several are open-core, so enterprise-only parts are called out in each entry.

Licences checked against each repository on November 7, 2026.

What you're replacing

  • •Single sign-on with OIDC, OAuth 2.0 and SAML
  • •User registration, login and account recovery
  • •Multi-factor authentication and passkeys
  • •Roles, organisations and federation with other identity providers

At a glance

ToolBest forLicenceRuns as
authentikFriendly all-round identity providerMITDocker
ZITADELMulti-tenant identity for SaaS productsAGPL-3.0Docker
Ory KratosHeadless, API-first user managementApache-2.0Docker
AutheliaSSO and 2FA in front of a reverse proxyApache-2.0Docker
CasdoorLightweight SSO server with a web consoleApache-2.0Docker
LogtoAuth for SaaS apps with ready-made sign-inMPL-2.0Docker
SuperTokensEmbedding login and sessions in your own appApache-2.0Docker
DexOIDC federation, especially for KubernetesApache-2.0Docker

1. authentik

MIT

Best for: Friendly all-round identity provider

An open-source identity provider for modern SSO, designed for self-hosting from small labs to large production clusters. Supports SAML, OAuth2/OIDC, LDAP and RADIUS, and deploys with Docker Compose, Helm on Kubernetes, AWS CloudFormation or DigitalOcean.

Strengths

  • + Broad protocol support including SAML, OIDC, LDAP and RADIUS
  • + Docker Compose and Helm deployments
  • + Proxy-style authentication for apps

Trade-offs

  • − The authentik/enterprise directory is under a separate licence
  • − Runs as several services

2. ZITADEL

AGPL-3.0

Best for: Multi-tenant identity for SaaS products

An open-source identity and access management platform for teams that need more than basic auth. Offers certified OpenID Connect, SAML 2.0, SCIM 2.0, passkeys and MFA, multi-tenancy with organisations, and gRPC and REST APIs. Needs PostgreSQL 14 or later.

Strengths

  • + Multi-tenant model of instances, organisations and projects
  • + Audit event stream and SIEM integration
  • + Docker Compose and Kubernetes deployment

Trade-offs

  • − AGPL-3.0 with some Apache-2.0 and MIT directories; see LICENSING.md
  • − Requires PostgreSQL

3. Ory Kratos

Apache-2.0

Best for: Headless, API-first user management

Headless cloud-native authentication and identity management written in Go. Provides self-service login, registration, verification and recovery, MFA and passkeys, driven through APIs. Works with PostgreSQL, MySQL or CockroachDB.

Strengths

  • + API-first design you build your own UI on
  • + Passkeys, social sign-in, OIDC, magic links and TOTP
  • + Runs on Linux, macOS, Windows or Docker

Trade-offs

  • − No ready-made admin UI; you build the front end
  • − SCIM, SAML and organisation SSO need the Ory Enterprise License

4. Authelia

Apache-2.0

Best for: SSO and 2FA in front of a reverse proxy

An open-source authentication and authorisation server providing two-factor authentication and SSO through a web portal. Works with reverse proxies such as nginx, Traefik, Caddy, Envoy and HAProxy, and is OpenID Certified.

Strengths

  • + Fine-grained access rules by user, group, URI and network
  • + OpenID Connect and WebAuthn passkeys
  • + Docker, Kubernetes and static binary installs

Trade-offs

  • − Built around protecting apps behind a proxy, not full user lifecycle management
  • − Lite bundle uses file-based user storage

5. Casdoor

Apache-2.0

Best for: Lightweight SSO server with a web console

A single sign-on and authentication server with a web console. Supports OAuth 2.0, OIDC, SAML 2.0, CAS, LDAP and SCIM 2.0, WebAuthn and MFA, and uses Casbin for access control. Install with Docker, Docker Compose or Helm.

Strengths

  • + Wide protocol coverage
  • + Web-based configuration with no redeploy
  • + SDKs and REST API with Swagger UI

Trade-offs

  • − The all-in-one Docker image is not meant for production
  • − Docker Compose builds from source, so first start is slow

6. Logto

MPL-2.0

Best for: Auth for SaaS apps with ready-made sign-in

The modern, open-source auth infrastructure for SaaS and AI apps, handling OIDC and OAuth 2.1 with pre-built, customisable sign-in flows. Offers multi-tenancy, enterprise SSO, RBAC and SDKs for 30+ frameworks. Self-host with Docker Compose or Node.js and PostgreSQL.

Strengths

  • + Pre-built sign-in flows and SDKs
  • + Multi-tenancy, enterprise SSO and RBAC
  • + Docker Compose and Node.js install options

Trade-offs

  • − MPL-2.0 is file-level copyleft
  • − Needs PostgreSQL

7. SuperTokens

Apache-2.0

Best for: Embedding login and sessions in your own app

An open-source auth provider adding secure login and session management to apps, positioned as an open-core alternative to proprietary providers. Supports passwordless, social and email/password login, MFA, multi-tenancy and a user management dashboard. Runs on-premises via Docker or binary.

Strengths

  • + Session management and multiple login methods
  • + User management dashboard
  • + You keep user data in your own database

Trade-offs

  • − Content under ee/ is covered by a separate licence
  • − Backend core is Java, so budget JVM memory

8. Dex

Apache-2.0

Best for: OIDC federation, especially for Kubernetes

An identity service that uses OpenID Connect to authenticate users for other applications, acting as a portal to upstream providers through connectors such as LDAP, GitHub, GitLab, Google, Microsoft and SAML 2.0. Runs on Kubernetes, in Docker or from source.

Strengths

  • + Connectors to many upstream identity systems
  • + Integrates with Kubernetes API-server authentication
  • + Small and focused

Trade-offs

  • − A federation layer, not a user database with admin UI
  • − Connector stability varies

New open-source tools, weekly

One email a week with the open-source projects, launches and releases added to TechLogHub. Unsubscribe in one click.

Get the TechLogHub digest

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.

How to choose

If you need…Start with
A Keycloak replacement with a more approachable admin UIauthentik
Multi-tenant identity for a SaaS productZITADEL
Headless identity APIs behind your own UIOry Kratos
SSO and 2FA for self-hosted apps behind a reverse proxyAuthelia
Drop-in sign-in and session handling in your appLogto or SuperTokens
Federating Kubernetes or other apps to existing identity providersDex

Open-source Keycloak alternatives: FAQ

Quick answers to common questions

Is Keycloak open source?

Yes. Keycloak is licensed under Apache-2.0. People move to alternatives for a different architecture, lighter footprint or different administration experience, not because Keycloak is closed.

What is the best lightweight alternative to Keycloak?

Authelia is built for protecting self-hosted apps behind a reverse proxy, and Dex is a small OIDC federation layer. Authentik and Casdoor offer more complete identity-provider features with their own web consoles.

Which Keycloak alternative supports SAML?

authentik, ZITADEL, Casdoor and Logto list SAML support. Ory Kratos lists SAML only among features available under the Ory Enterprise License, and Dex supports SAML 2.0 as an upstream connector.

Are these tools fully open source?

The cores are under OSI-approved licences, but authentik, SuperTokens and Ory keep some enterprise features under separate licences, and ZITADEL has directory-level licence exceptions. Check each repository's licence notes before relying on a specific feature.

Can I migrate users from Keycloak?

Realm exports and user data can usually be transformed and imported, but password hashes and credential types differ between products. Plan a test migration and check each project's import documentation.

Maintain an open-source Keycloak alternative?

List it on TechLogHub and we'll review it for this page.

Submit a project