Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
upstream: github.com/goauthentik/authentik (opens in new tab) · github.com/keycloak/keycloak (opens in new tab)
Pick authentik
If you want a modern, self-hoster-friendly IdP with a visual flow builder and broad protocol support without a JVM to babysit.
Pick Keycloak
If you need the deepest SAML/LDAP standards coverage and enterprise-proven maturity, and you can feed it a JVM.
authentik and Keycloak are the two names that come up when a self-hosted stack outgrows app-by-app passwords and needs one place to handle login, MFA, and SSO across everything. Both speak the same core protocols and both are genuinely free to run. The choice between them is less about "which one works" and more about which flavor of complexity you would rather own: a newer, friendlier platform built for exactly this audience, or the identity server enterprises have trusted for a decade.
authentik is the newer entrant — a Python, Go, and TypeScript stack with a visual, flow-based login builder that lets you assemble authentication steps (password, MFA, consent, enrollment) like a flowchart instead of editing XML. It ships a proxy provider for apps that cannot speak OIDC or SAML natively, and it was built from day one with self-hosters and small teams in mind.
Keycloak is the incumbent. Built on Java and Quarkus and backed by Red Hat, it has been running production SSO for banks, governments, and large enterprises for well over a decade, and it carries a CNCF incubation status that few identity projects can claim. It is the reference implementation against which a lot of the OSS identity ecosystem measures itself.
The two do not size up the way their reputations suggest. authentik's realistic floor sits at 2 GB of RAM, rated a 3 out of 5 to deploy — reflecting its multi-service shape: a server process, a background worker, and PostgreSQL, all wired together by the official Compose file. Keycloak's quoted minimum is lower, 1 GB, but it rates a tougher 4 out of 5 to deploy — that gap is the tell. Keycloak's dev-mode quickstart (a single container, embedded database) really is that light, but getting it production-ready — an external database, sane heap sizing, clustering — is where the JVM asks more of you than authentik's docker-compose-and-go setup does. Keycloak wins on paper minimum RAM; authentik wins on how much of that RAM turns into a working deployment without extra tuning.
Measured idle at first boot fills in the number the "realistic floor" figures above are estimating toward: a fresh, empty authentik instance settles at ~968 MB — its full Compose stack (server, worker, Postgres) is already running before you've configured a single flow. Keycloak's own foreground dev-mode quickstart isn't unattended-installable the same way, so there's no equivalent measured number here; its docs describe a ~750 MB minimum container memory limit and recommend ~2 GB for smaller production-ready deployments. Those are two different kinds of number — one measured, one documented — so don't read the gap as precise, but the pattern holds: authentik's floor is mostly fixed by its three always-on services, while Keycloak's real number depends heavily on how you deploy it.
For a single-user homelab, both are arguably more machine than the job needs. If you're gating three or four self-hosted apps for yourself, authentik's 2 GB (measured ~968 MB idle) Compose stack and Keycloak's JVM tuning are both overkill compared to a lightweight forward-auth gate — see Authelia vs authentik for that lighter homelab-sized option. Reach for authentik or Keycloak specifically once you need a real identity provider apps federate with, not just a login screen in front of a proxy.
Both cover the protocol basics: OIDC, OAuth2, and SAML, plus LDAP for directory-backed logins. This is where Keycloak's decade of production hardening shows. Its SAML implementation is particularly mature — the kind of thing that matters when you are integrating a legacy enterprise app that speaks nothing else — and its LDAP/Active Directory federation is widely regarded as the most complete in the open-source identity world. Newer OAuth2/OIDC profiles like PAR and DPoP are supported as well.
authentik supports the same protocol set — OIDC, SAML, LDAP — and wraps it in a noticeably cleaner configuration surface, but it has not accumulated the same breadth of edge-case coverage. For straightforward OIDC/SAML SSO across self-hosted apps, that gap rarely matters. For federating against an existing enterprise directory or a protocol edge case a legacy vendor insists on, Keycloak's depth is the safer bet.
This is authentik's clearest advantage. The flow-based builder turns authentication logic — "require MFA for admins," "show a custom enrollment page," "chain an external IdP before password entry" — into something you configure visually rather than something you code. The admin UI is modern, and a first OIDC integration is a genuinely quick exercise.
Keycloak's admin console is comprehensive but denser: realms, clients, scopes, and mappers are all powerful primitives, but a developer configuring it for the first time should plan a couple of hours to get a basic OIDC client working correctly, and the model rewards — or requires — reading the docs before wiring in your first app.
Keycloak's production history is hard to match: it has run identity for enterprises, governments, and financial institutions for years, has a large global contributor base, and Red Hat's backing gives it an unusually strong "still around in five years" signal. authentik is younger and has less production mileage at the largest scales, but it has grown quickly and already covers what most self-hosted, small-to-mid-size deployments need.
Both cores are permissively licensed — authentik under MIT, Keycloak under Apache-2.0 — so neither locks you into a vendor's terms for the code you actually run. The difference is business model, not license text. authentik follows an open-core structure: the free edition covers SSO, MFA, LDAP, SAML, OIDC, flows, and the proxy provider — everything most self-hosters need — while an Enterprise tier layers on Google Workspace and Entra ID sync, device-trust and compliance features, and paid support (remote access over RDP/SSH/VNC moved from Enterprise into the free edition in 2025, a sign the boundary moves in the community's favor over time). Keycloak has no equivalent tier: the whole feature set lives in the Apache-2.0 project, and Red Hat's commercial offering is support, not gated functionality.
If the homelab note above describes you — a handful of self-hosted apps, one administrator, no requirement for SAML or a user directory — neither of these is the right tool. Authelia does the actual job (gate a reverse proxy with SSO and MFA) in a single Go binary at a measured ~92 MB idle, without the multi-service footprint either identity provider carries.
Reversed, the decision starts from Keycloak's side: pick it first only if you need the deepest SAML/LDAP standards coverage, are integrating a legacy enterprise app or directory that insists on it, or Red Hat's backing and a decade of production history matter to your organization specifically — and you can feed it a properly sized, externally-databased JVM. Everyone else should default to authentik: its visual flow builder, cleaner admin UX, and measured ~968 MB idle footprint cover OIDC, OAuth2, SAML, and LDAP for the vast majority of self-hosted SSO needs without Keycloak's production-tuning curve.
Both run comfortably on a single modest server, but budget RAM around what each actually needs to run well rather than the bare minimum: authentik for its full Compose stack (server, worker, Postgres), Keycloak for a production-shaped setup with an external database rather than its dev-mode quickstart. Back up the database in both cases — it holds every user, credential, and flow you have configured — and expect Keycloak's JVM to reward a bit more tuning attention as your realm grows. The step-by-step setups are linked below, and any of the VPS options here has room for either stack.
Keycloak lists a lower minimum: 1024 MB vs 2048 MB for authentik.
No. authentik is MIT, Keycloak is Apache-2.0.
Paid link — we earn a commission if you shop through it.
A login portal in front of your reverse proxy, or a full identity and access management server.
A full identity and access management server, or a small OIDC provider that only does passwordless sign-in.
A full identity platform vs. a passkey-only sign-in box.