- Posted on
- admin
- No Comments
Zitadel vs Keycloak: Key Differences
Ask ten engineers which open-source identity provider they’d pick for a new B2B SaaS product, and you’ll get a fairly even split between two names: Keycloak and Zitadel. That split isn’t random. Keycloak has over a decade of production hardening behind it. Zitadel was built years later by people who had watched multi-tenancy get bolted onto older identity platforms as an afterthought, and decided to build it in from day one instead.
Both are open source. Both handle SSO, MFA, and token-based access. But the philosophy underneath each one is different enough that the “right” choice depends heavily on what you’re building, not just which feature list is longer.
This guide breaks down where Zitadel and Keycloak genuinely diverge: architecture, licensing, multi-tenancy models, protocol coverage, operations, and where each one clearly wins. If you’re also comparing either of these against Authentik, our Authentik vs Keycloak breakdown covers that pairing in detail, and our deeper look at what Zitadel actually is explains its event-sourced architecture if you want more background before diving into this comparison.
Zitadel vs Keycloak at a Glance
| Zitadel | Keycloak | |
|---|---|---|
| First released | 2020 | 2014 |
| Backed by | ZITADEL GmbH (Swiss startup) | Red Hat / IBM, CNCF incubating project |
| Written in | Go | Java (Quarkus) |
| License | AGPL-3.0, with Apache 2.0 and MIT exceptions for specific directories | Apache-2.0 |
| Core data model | Event-sourced, CQRS, PostgreSQL or CockroachDB | Relational, PostgreSQL (or other supported DBs) |
| Multi-tenancy | Native: Instance → Organization → Project hierarchy | Realms, plus an added Organizations feature in 26.x for B2B tenancy within a realm |
| SAML support | IdP only, issues assertions but cannot consume upstream SAML | Both IdP and SP, can broker a SAML upstream provider to an OIDC downstream client |
| GitHub stars (approx.) | ~14,700 | ~36,200 |
| Session storage | Stateless, no external session store required | Requires session state handling, typically Infinispan |
| Deployment | Self-hosted or managed cloud, same codebase | Self-hosted; commercial support via Red Hat Build of Keycloak |
| Best known for | Cloud-native multi-tenancy, API-first design | Protocol depth, federation maturity, enterprise track record |
What Is Zitadel?
Zitadel is a Go-based, API-first identity platform built around event sourcing and native multi-tenancy. It’s a cloud-native identity provider with event-sourced audit logs, built-in multi-org concepts, and automation-friendly APIs, which is a fairly accurate one-line summary of why teams reach for it.
It supports OIDC, SAML, and passkeys/WebAuthn, along with fine-grained actions and hooks for customizing the auth flow in code, and it offers both a managed cloud option and a self-hostable core. If you want the full breakdown of how its architecture works under the hood, we’ve covered that separately.
What Is Keycloak?
Keycloak is the older, more established name in this comparison. It’s a full-featured IAM server originally built by Red Hat’s security team and now a CNCF Incubating project, supporting OIDC, OAuth2, and SAML, social and enterprise identity brokering, fine-grained authorization, and a built-in admin console, and it remains the most widely deployed self-hosted alternative to Auth0 or Okta in production today.
Keycloak was initially developed by WildFly, a division of Red Hat, and was adopted into the Cloud Native Computing Foundation on April 10, 2023 as an incubating project, where it has been maintained by the CNCF community since. That institutional backing is a big part of why enterprise security teams tend to default to it without a second thought.
Architecture: Event Sourcing vs Realms
This is the single biggest structural difference between the two platforms, and it explains almost everything else on this page.
Keycloak is a mature Java-based IAM system often used in enterprise and legacy environments, built on a relational data model where state gets updated in place. Keycloak 26.x runs on Quarkus, a major improvement over the legacy WildFly base, with optional GraalVM native image support for faster startup and lower memory use. It’s still a JVM application underneath, though, with everything that implies for memory tuning and cold-start behavior.
Zitadel takes a different approach entirely. Every mutation, a password change, a role assignment, a login policy update, gets written as an immutable event first, and a relational projection gets built from that event stream for fast queries. The result is a complete, queryable audit trail as a structural side effect of how the system works, not a bolted-on logging feature.
This makes Zitadel meaningfully younger than Keycloak, with a smaller production track record at very large scale, which is the honest tradeoff for choosing the newer architecture. Keycloak has had over a decade for edge cases to surface and get fixed. Zitadel has had six years.
Licensing: A Real Practical Difference
This one gets glossed over in a lot of comparison posts, but it matters if your legal or compliance team is involved in the decision.
Keycloak is licensed under Apache-2.0, while Zitadel uses AGPL-3.0, with Apache 2.0 and MIT exceptions carved out for specific directories in the Zitadel codebase. Apache-2.0 is about as permissive as open-source licenses get: you can modify it, embed it in a commercial product, and never publish your changes. AGPL is copyleft, and its trigger condition is broader than the more common GPL: if you modify AGPL-licensed code and offer it as a network service, you generally have to make your modified source available to the users of that service too.
For most teams that are simply self-hosting Zitadel to run their own login flow, this changes nothing in practice, since you’re using the software rather than redistributing a modified version of it as a competing service. But if your business model involves reselling a modified version of Zitadel itself as a hosted product, the AGPL terms are worth a real legal review before you build on it. Keycloak’s Apache-2.0 license carries no such obligation.
Multi-Tenancy: Native Design vs a Bolted-On Layer
Multi-tenancy is where the two platforms diverge most philosophically, and it’s usually the deciding factor for B2B SaaS teams choosing between them.
Keycloak uses realms as its primary isolation boundary, where each realm is an independent namespace with its own users, clients, roles, identity providers, and auth flows. That model has worked for a decade, but realms were originally designed for environment separation (dev, staging, prod) more than for spinning up a new isolated tenant per customer. Keycloak 26.x added an Organizations feature, which layers a second tier of tenancy within a realm specifically for B2B use cases, which is Keycloak’s direct answer to the gap Zitadel was built to close from the start.
Zitadel’s hierarchy runs Instance, then Organization, then Project, with isolated data and policy scoping at each level. An Organization in Zitadel represents a single customer with its own users, roles, identity providers, and branding, and creating one is a normal day-to-day operation, not a structural change to your deployment. Keycloak’s multi-tenancy and audit features were historically not geared toward the needs of SaaS projects in quite the same way, which is the exact gap Zitadel’s design was built to close.
Zitadel does support identity brokering, B2B multi-tenancy, multi-factor and passwordless authentication, delegated access management, and an in-context audit trail as first-class features, all built around that Organization model rather than added around the edges of it.
Protocol Coverage: Where SAML Becomes the Deciding Factor
Both platforms cover the protocols most teams need for day-to-day authentication. Where they genuinely split is SAML, and it’s a split worth understanding before you commit to either one.
Keycloak supports SAML as both an identity provider and a service provider, so it can broker between a SAML upstream identity provider, like Ping, ADFS, or a legacy Okta deployment, and an OIDC downstream client. Zitadel’s SAML support, by contrast, is IdP-only: it can issue SAML assertions to downstream applications, but it cannot consume SAML from an upstream source. If SAML federation from an existing corporate identity provider is a hard requirement, Keycloak is the only choice between the two.
Everywhere else, coverage is close to even. Both tools offer comparable feature coverage overall, with Zitadel supporting 35 tracked features against Keycloak’s 30, and both fully cover session management, letting admins adjust session idle and max lifespans, keep offline sessions alive longer, view and revoke user and client sessions, and sign users out from the admin console. Both platforms support WebAuthn passkeys natively per their public documentation, so passwordless login isn’t a differentiator either way.
Keycloak’s broader out-of-the-box feature list includes machine-to-machine authentication via JWT profile, personal access tokens, role-based access control, delegated role management, self-registration with verification, and OpenID Connect certification. Zitadel matches most of that list too, just organized around its Organization model rather than realm-level configuration.
Ecosystem, Community, and Backing
If you’re weighing long-term risk, this is where the age gap between the two projects shows up most clearly.
Keycloak leads in popularity with roughly 36,200 GitHub stars against Zitadel’s 14,700, a gap that reflects a stronger, longer-established community, and Keycloak’s nearly 8,800 forks point to substantially wider developer engagement. Keycloak has also been in active development for around 13 years, compared to roughly 6 for Zitadel, a head start that suggests more mature features and more established internal processes.
That said, momentum tells a slightly different story. Zitadel is growing faster in relative terms, adding stars at a higher percentage rate than Keycloak over recent 30-day windows, meaning it’s closing the gap rather than the gap widening further.
Institutional backing differs sharply too. Keycloak is sponsored by Red Hat and IBM with institutional long-term backing inside the CNCF ecosystem, while Zitadel is backed by ZITADEL GmbH, a Swiss startup that moves faster but operates with a smaller core team. Neither is inherently the wrong answer, it’s a question of whether you value a large foundation-backed project with a slower release cadence, or a smaller, faster-moving vendor with more direct responsiveness to feature requests.
Operations and Scalability
Keycloak is the established standard, battle-tested across countless deployments, with the largest ecosystem and the most extension points, while Zitadel is newer, built cloud-native with multi-tenancy, an event-sourced core, and a managed cloud offering for teams that don’t want to operate it themselves.
Operationally, the two ask different things of your infrastructure team. Keycloak’s JVM foundation means real memory and tuning considerations at scale, along with clustering behavior that typically depends on Infinispan for distributed caching and session replication. Zitadel’s stateless design avoids an external session store entirely, which simplifies horizontal scaling but also means you’re relying on a younger project’s approach to a problem Keycloak has had over a decade to harden against real production traffic.
If a team needs fine-grained authorization beyond either identity provider’s built-in role system, a dedicated policy decision point can sit beside whichever one you choose, since neither tool should be treated as a full authorization layer for complex, resource-level permission checks. Keycloak has limited authorization features of its own, and Zitadel is primarily an identity provider rather than an authorization engine, so this limitation applies about equally to both.
Pricing
Both platforms are free to self-host, with no feature gating behind a paid tier for the open-source core in either case. Both price their managed or supported offerings on a tiered monthly-active-user model, so the actual cost comparison depends heavily on your user volume and whether you’re self-hosting or paying for a managed service.
For Zitadel specifically, self-hosting is free at any scale, while the managed cloud service has a generous free tier before paid plans kick in. Keycloak has no managed cloud offering of its own; commercial pricing comes through Red Hat Build of Keycloak support contracts rather than a hosted SaaS tier, which matters if a fully managed option is part of what you’re evaluating.
Migration Effort
If you’re already running one and considering the other, don’t underestimate the switching cost. Switching between Keycloak and Zitadel is typically a 60 to 90 day exercise in either direction once SDK rewrites and hooks or Actions migration are accounted for. If your team is hitting a genuine cost or feature ceiling on your current platform, it’s worth evaluating the alternative on the specific gaps you’re running into, but if you’re operating comfortably within your current platform’s limits, the switching cost rarely pays for itself.
That’s a useful gut check before starting any migration project: identify the specific capability you’re missing first, then confirm the other platform actually solves it, rather than switching on general reputation alone.
When to Choose Zitadel
Zitadel tends to be the better fit when:
- You’re building a B2B SaaS product where each customer needs its own isolated identity space, complete with its own branding, policies, and federated identity providers.
- You want a managed cloud option available alongside self-hosting, without switching platforms if your operational needs change.
- Your team values a clean, fully API-first design where every admin console action has a matching programmatic equivalent.
- You don’t have a hard SAML brokering requirement, since Zitadel can issue SAML assertions but not consume them from an upstream provider.
- You’re comfortable adopting a younger, faster-moving project backed by a smaller company rather than a foundation-backed one.
When to Choose Keycloak
Keycloak tends to win when:
- You need to broker between an existing SAML identity provider, like ADFS or Ping, and OIDC-based applications downstream.
- Federation with Active Directory, LDAP, or Kerberos against existing enterprise directories is a core requirement.
- Your organization values CNCF and Red Hat backing, with the option of formal commercial support contracts.
- Your infrastructure team is already comfortable operating and tuning JVM-based services at scale.
- You want the widest ecosystem of extensions, themes, and community-contributed integrations available for a self-hosted identity provider.
Frequently Asked Questions
Is Zitadel or Keycloak better for multi-tenant SaaS? Zitadel is generally the better fit for multi-tenant SaaS, since its Instance, Organization, and Project hierarchy was designed for tenant isolation from the start. Keycloak added an Organizations feature in its 26.x release to address the same use case, but its realm model was originally built for environment separation rather than per-customer tenancy.
Does Zitadel support SAML the same way Keycloak does? Not quite. Zitadel can issue SAML assertions as an identity provider but cannot consume SAML from an upstream source. Keycloak supports SAML as both an identity provider and a service provider, so it can broker between an upstream SAML provider and downstream OIDC clients, which Zitadel cannot do.
Which one has a more permissive license? Keycloak, licensed under Apache-2.0, is more permissive. Zitadel uses AGPL-3.0 for its core, with some directories carved out under Apache-2.0 and MIT. AGPL’s obligations mainly apply if you modify Zitadel and offer it as a network service to others, not to ordinary self-hosted use.
Is Zitadel as mature as Keycloak? Not yet, and Zitadel’s own comparisons don’t pretend otherwise. Keycloak has roughly a decade’s head start in production deployments and a substantially larger community, while Zitadel is growing quickly but has a smaller track record at very large scale.
Can I get commercial support for either platform? Yes, for both, though the model differs. Keycloak’s commercial support comes through Red Hat Build of Keycloak. Zitadel offers its own managed cloud service in addition to commercial support options for self-hosted deployments.
How long does it take to migrate from one to the other? Budget roughly 60 to 90 days for a migration in either direction, once you account for rewriting SDK integrations and porting custom hooks or Actions. Only start the migration if you’ve confirmed the other platform actually solves a specific limitation you’ve hit, not just because it looks appealing on a feature comparison.
Final Verdict
Neither platform is the objectively “better” identity provider, and the split among engineers who’ve used both reflects that. Zitadel is the stronger choice when native multi-tenancy, a clean API-first design, and a managed cloud option matter more to you than a decade of battle-testing. Keycloak is the stronger choice when SAML brokering, deep enterprise directory federation, and foundation-backed stability matter more than a newer architecture.
If you’re still undecided, look at the one requirement neither platform can fake its way around: do you need to broker an existing SAML identity provider to OIDC-based apps? If yes, that alone settles it in Keycloak’s favor. If your actual problem is standing up isolated identity for dozens of B2B customers without reinventing that wheel yourself, Zitadel’s architecture was built around exactly that problem. For more detail on how Zitadel’s event-sourced core actually works, check out our full guide, and Zitadel’s own engineering comparison of the two platforms is worth reading directly if you want the vendor’s own framing alongside this one.
For more identity, cloud, and DevOps comparisons like this one, keep exploring the guides on CourseDrill.
Popular Courses
