Keycloak vs authentik for Nextcloud SSO: which one fits your setup
Choose Keycloak when your organization already runs it or needs broad SAML, OIDC, and LDAP or Active Directory federation, since one identity provider can then serve Nextcloud alongside your other applications. Choose authentik when a published Nextcloud guide covering OIDC, SAML and LDAP, plus scope mappings that pass storage quota, groups and an admin entitlement to Nextcloud, matters most to the rollout. The general comparison lives on the sibling Keycloak vs authentik page, so this section covers only the Nextcloud decision. The documentation gap is the first thing to weigh: authentik publishes a Nextcloud integration guide, while Keycloak's Nextcloud steps come from the Nextcloud user_oidc README, which names Keycloak for the JWKS URL and backchannel logout. Confirm those steps match your Keycloak version before you rely on them.
Nextcloud reaches an identity provider through three components: the user_oidc app for OpenID Connect, the user_saml app for SAML 2.0, and its LDAP and Active Directory integration for directory accounts. Keycloak covers OIDC and SAML and can federate users from LDAP or Active Directory, so it suits a setup where the directory stays the source of truth. The decision point is per-user encryption. OIDC and SAML do not give Nextcloud the user's cleartext password, so server-side encryption with per-user keys needs LDAP, as authentik's guide also notes. Confirm with your Keycloak team whether it can present an LDAP interface to Nextcloud, since federation in Keycloak runs the other way. Both OIDC and SAML require HTTPS, so check that your Nextcloud and identity endpoints serve it. Review the Nextcloud user_oidc README for the backchannel logout settings before you plan the cutover.
Provisioning and sign-in fallback should drive your pilot. authentik's guide passes storage quota, groups and the admin entitlement to Nextcloud through scope mappings, and its OIDC redirect URI is https://<nextcloud>/apps/user_oidc/code. Keycloak documents a SCIM API for provisioning users into Keycloak, but that does not show that Nextcloud will accept accounts pushed from your provider, so confirm it before you plan account lifecycle. Test the fallback as well: authentik's guide says users can reach Nextcloud's built-in login at /login?direct=1 if an OIDC or SAML problem blocks sign-in, and you should confirm an equivalent break-glass admin path with either provider. Finally, authentik's Nextcloud guide is listed with Community support, and code under its enterprise directory has a separate license, so confirm which edition and support path your scope mappings need.
Keycloak vs authentik for Nextcloud SSO, aspect by aspect
This table compares Keycloak and authentik as the identity provider for Nextcloud across protocols, setup artifacts, provisioning, fallback login, support, licensing and release lines. authentik publishes a dedicated Nextcloud guide, while the Keycloak entries rely on the Nextcloud user_oidc README, so any cell marked confirm needs checking before you commit. The main takeaway: authentik has the more complete Nextcloud-specific documentation, while Keycloak is a broader identity server whose Nextcloud path you must verify yourself.
| Aspect | Keycloak | authentik |
|---|---|---|
| Protocols with Nextcloud | OpenID Connect and SAML 2.0 clients, consumed by Nextcloud through user_oidc or user_saml. | OAuth2/OpenID Connect and SAML providers, plus LDAP. The guide covers OIDC, SAML and LDAP. |
| Documented setup artifacts | The user_oidc README names Keycloak: JWKS URL in the Keys tab and backchannel logout settings. | Nextcloud integration guide with the OIDC redirect path under /apps/user_oidc/code and scope mapping examples. |
| Provisioning options | Keycloak's SCIM API provisions users into Keycloak, not into Nextcloud. Confirm any Keycloak-to-Nextcloud path. | Optional SCIM provider as a backchannel to push users to an app. Confirm whether it applies to Nextcloud. |
| Groups, quota and admin mapping | Not documented for Nextcloud here. Confirm how group and quota attributes reach user_oidc. | Scope mappings can pass storage quota, groups and an admin entitlement to Nextcloud. |
| Fallback login | No Nextcloud fallback path is documented here. Confirm in the Nextcloud admin manual before go-live. | Users can reach built-in login at /login?direct=1 if OIDC or SAML sign-in fails. |
| HTTPS and encryption limits | Confirm HTTPS and per-user encryption requirements in the user_oidc and user_saml documentation. | OIDC and SAML need HTTPS and cannot support per-user server-side encryption, which needs LDAP. |
| Support level | Open source project. No Nextcloud-specific support tier is documented here, so confirm terms in writing. | Listed as Community for the Nextcloud guide. The pricing page ties ticket-based support to subscriptions over $1k. |
| Licensing of the integration path | Keycloak server is Apache-2.0. Confirm the license of the user_oidc and user_saml apps in their repositories. | Core is MIT. Code under authentik/enterprise needs a paid subscription for production use. |
| Current release lines | Keycloak 26.8.1, released October 13, 2026. Minor releases are planned four times a year. | authentik 2026.8.4, released October 14, 2026. The 2026.5.x and 2026.8.x lines receive security fixes. |
What Nextcloud requires for OpenID Connect, SAML and LDAP sign-in
Nextcloud has three sign-in paths, and each is configured separately. The user_oidc app is the OpenID Connect user backend, so either Keycloak or authentik can act as the provider that issues tokens Nextcloud accepts. The SSO & SAML app (user_saml) covers SAML 2.0. Its README lists SAML 2.0, OneLogin, Shibboleth, AD FS, environment-variable authentication, Kerberos and CAS as supported and tested provider types. Neither Keycloak nor authentik is named there, so test your SAML client against the generic SAML 2.0 entry before you rely on it. LDAP or Active Directory integration is the third path, configured in Nextcloud's own LDAP settings, and it reads directory accounts directly.
Both OpenID Connect and SAML need HTTPS, according to authentik's Nextcloud guide, so settle the certificate and reverse proxy before you configure either provider. The user_oidc README names Keycloak for one specific step: the JWKS URL can be set in the Keys tab of the Keycloak client settings, which is where Nextcloud gets the keys it uses to validate tokens. The same README says backchannel logout needs two settings on the OpenID client, including a backchannel logout URL under /apps/user_oidc. The authentik guide gives the OIDC redirect URI as https://<nextcloud>/apps/user_oidc/code, so register that exact URI in the Keycloak client. Record the client settings and the per-provider occ user_oidc:provider configuration in your runbook.
LDAP is the path to choose when server-side encryption with per-user keys matters. The authentik guide says that feature needs LDAP because OIDC and SAML do not give Nextcloud the user's cleartext password, so plan the directory integration early. The Nextcloud LDAP and Active Directory documentation covers that configuration. Two more checks belong in the plan. The authentik guide says its scope mappings can pass storage quota, groups and an admin entitlement to Nextcloud, so confirm the equivalent claims for your Keycloak client before assuming them. Also document /login?direct=1, which the authentik guide says reaches Nextcloud's built-in login if an OIDC or SAML problem blocks sign-in. No SCIM support for Nextcloud appears in the sources for this comparison, so confirm it with Nextcloud before you design automated provisioning. Keycloak's SCIM API answers a different question, because it provisions users into Keycloak.
How the Keycloak and authentik setups differ for Nextcloud SSO
Keycloak setup starts with an OpenID Connect client that Nextcloud uses for sign-in. The user_oidc README names Keycloak directly and describes the client settings, so follow its order and confirm each step against the current README before you build.
- OpenID client settings: Create an OpenID Connect client in your Keycloak realm for Nextcloud and enter the client settings the README lists for user_oidc. Confirm these against the current README.
- JWKS URL in the Keys tab: The README says the JWKS URL can be set in the Keys tab of the Keycloak client settings. Confirm the field location and URL format for your Keycloak version.
- Two backchannel logout settings: The README says backchannel logout needs two settings on the OpenID client, with the logout URL under
/apps/user_oidc. Confirm both setting names and the exact URL against the README. - Per-provider configuration with occ: Register the Keycloak provider on the Nextcloud server with the
occ user_oidc:providercommand. Confirm the command options for your user_oidc version.
Test sign-in and single logout with a test user before you open the integration to staff.
authentik setup uses its OAuth2/OpenID Connect provider and points it at the Nextcloud user_oidc callback. authentik's Nextcloud guide says OIDC is usually the simplest SSO method for a new deployment, and it lists Nextcloud support as Community, so plan your own testing. Confirm each step against the current guide.
- OAuth2/OpenID Connect provider: Create the provider in authentik using its OAuth2/OpenID Connect type for the Nextcloud application. Confirm the provider settings against the guide.
- Redirect URI: Set the redirect URI to
https://<nextcloud>/apps/user_oidc/code, replacing<nextcloud>with your Nextcloud host. Confirm the URI against the guide for your authentik release. - Scope mappings for quota, groups and admin: Attach scope mappings that pass storage quota, groups and an admin entitlement to Nextcloud. Confirm the mapping names and the claim names Nextcloud reads.
- The /login?direct=1 fallback: The guide says users can reach Nextcloud's built-in login at
/login?direct=1if an OIDC problem blocks sign-in. Test this path before go-live and document who can use it. Confirm the fallback behavior against the guide.
Check the redirect URI and scope mapping names against your authentik release before you assign groups or quotas to real users.
Nextcloud's side depends on the protocol you choose, not on the identity provider alone. OpenID Connect runs through the user_oidc app in either setup, while SAML and LDAP run through separate Nextcloud apps and admin settings. The identity provider changes the configuration on its own platform, so review these shared requirements once for both paths.
- OIDC through user_oidc: The user_oidc app is Nextcloud's OpenID Connect user backend, and both setups depend on it.
- SAML through user_saml: SAML 2.0 runs through the SSO & SAML (user_saml) app, a separate app with its own configuration. Use it only if your identity platform needs SAML for this integration.
- LDAP for per-user encryption: authentik's guide says server-side encryption with per-user keys needs LDAP, because OIDC and SAML do not give Nextcloud the user's cleartext password.
- HTTPS on the Nextcloud host: OIDC and SAML both require HTTPS, so plan TLS for Nextcloud before you start the integration.
Confirm the app versions and encryption options against the Nextcloud admin manual for your release before you choose the protocol.
Which authentik edition this integration needs and what Keycloak licensing means
authentik core is MIT licensed, but its enterprise directory is not. Most of the authentik LICENSE file sits under the MIT license, while code in authentik/enterprise/ falls under a separate enterprise license that needs a paid subscription for production use. authentik's pricing page lists three editions: Open Source (free, community Discord support), Enterprise at $5 per user per month billed annually plus $0.02 per external user per month, and Enterprise Plus starting at $20k annually. The enterprise-only features named there are Google Workspace and Microsoft Entra ID integrations, mTLS client certificate authentication, privileged access management, password history, enhanced audit logging, and ticket-based support for subscriptions over $1k.
The Nextcloud OIDC and SAML steps do not appear in that feature list, but that does not confirm they are free to run in production. Before you choose Enterprise or Open Source, ask authentik which features this deployment uses: the OAuth2/OpenID Connect provider, the SAML provider, any SCIM backchannel provider, and the scope mappings that pass storage quota, groups and the admin entitlement to Nextcloud. Ask whether any of these load code from the enterprise directory, and confirm the support level, since authentik's Nextcloud guide lists support as Community. If you choose Enterprise, get the subscription terms, the seat basis (users versus external users) and the support scope in writing before rollout.
Keycloak is licensed under Apache-2.0, so the license does not require a subscription for the server itself. The costs that remain are the same in either product: hosting, a supported relational database (Keycloak lists PostgreSQL 14 to 18 among its production options), and the staff time to upgrade, back up, patch and retest the Nextcloud client settings. These costs recur and tend to grow with user count, the number of clients and realms, and how often you upgrade. When you compare quotes or project plans, ask for hosting, database and staff time as separate lines, and ask authentik for a written list of the subscription items it assumes so the two totals can be compared fairly.
How the OpenID Connect login runs between Nextcloud and the provider
This illustrative sequence starts when a user opens Nextcloud and is sent to the provider's login page. After sign-in, the browser returns to /apps/user_oidc/code with an authorization code. Nextcloud exchanges that code for tokens, fetches the provider's signing keys from the JWKS endpoint, and checks the ID token before it starts a session. Confirm that the redirect URI and JWKS URL match your provider client exactly. The backchannel logout is a separate server-to-server request from the provider to the user_oidc logout URL, so it does not depend on the browser.
Illustrative OpenID Connect login flow and backchannel logout for either provider.
How users, groups and deprovisioning reach Nextcloud with each provider
Four routes and one logout path decide how users, groups and removals reach Nextcloud. Keycloak pulls identities from a directory or receives them through its provisioning API, while authentik passes values at each login and can push users to apps through an optional backchannel. The sources behind this page do not document SCIM push into Nextcloud for either provider, so confirm that path with Nextcloud before you plan leaver handling.
Keycloak LDAP or AD federation
Keycloak federates users from an LDAP or Active Directory directory, so the directory stays the source for who exists and which groups they belong to. For Nextcloud, check how often Keycloak syncs, whether a user disabled in the directory is blocked at the next sign-in, and whether Nextcloud's own LDAP connection reads the same directory. Two readers of one directory can disagree about group membership, so decide which system owns group-based access before go-live.
Nextcloud LDAP docsKeycloak SCIM API for provisioning
Keycloak's Server Administration Guide documents a SCIM API that lets external systems provision users into Keycloak, and the 26.8 release notes list it as supported. The feed ends at Keycloak. An HR or identity lifecycle system can create and disable users there, and Nextcloud sees each user when that person signs in through OpenID Connect. Confirm the endpoints, supported attributes and group handling in the documentation for your Keycloak version before you build the feed.
Keycloak admin guideScope mappings for entitlements
authentik's Nextcloud guide says scope mappings can pass storage quota, groups and an admin entitlement to Nextcloud. Values arrive at each login, so a group change or quota decision takes effect when the user next signs in. Test with one user in each group before go-live, and confirm in your Nextcloud version that the user_oidc settings read the values you map. A mapped value the app does not read has no effect on access.
authentik Nextcloud guideSCIM backchannel provider in authentik
authentik offers an optional SCIM provider that can run as a backchannel provider to push users to an app, alongside its OAuth2/OpenID Connect and SAML providers. authentik's Nextcloud guide covers OIDC, SAML and LDAP, not SCIM. Treat a pushed-user path into Nextcloud as unconfirmed until authentik or Nextcloud documents it for your version. Keep the login provider and any push provider separate in your design, and test that a deactivated user loses access.
authentik integrationsDeprovisioning through backchannel logout
The user_oidc README documents backchannel logout, which needs two settings on the OpenID client in the identity provider, including a backchannel logout URL under /apps/user_oidc. Logout signals may end sessions without removing the account. Confirm in the README and in a test whether a logout event disables the Nextcloud user or only ends the session, and what happens to existing sync clients. Test with a revoked user before you count on this path for leavers.
Documented limits of each setup and what the guides leave open
The authentik Nextcloud guide sets out two hard limits for OIDC and SAML sign-in. The first is transport: both protocols require HTTPS, so the Nextcloud host, the identity provider and every redirect URI must be served over TLS before you test anything. The second decides the directory design. OIDC and SAML cannot support server-side per-user encryption, because Nextcloud never receives the user's cleartext password. If your policy requires server-side encryption with per-user keys, those users need LDAP. Settle that requirement with your security team before you choose a protocol, because it changes the identity flow for the whole instance.
The same guide describes a fallback. If an OIDC or SAML problem blocks sign-in, users can reach Nextcloud's built-in login at /login?direct=1. That path helps administrators during an outage, but it is also a second way in. Decide who may use it, whether it stays enabled after go-live, and how those logins are logged and reviewed. The guide also carries a Community support level, so do not assume vendor-backed support for the integration. Ask authentik what Community covers, and write your own troubleshooting runbook for the sign-in path.
This comparison cannot confirm documented limits for Keycloak with Nextcloud, so treat the Keycloak column as open. The Nextcloud user_oidc README names Keycloak for the JWKS URL and backchannel logout settings, but it does not answer the encryption, fallback or support questions above. Ask the Keycloak project which client settings and versions it supports for user_oidc. Ask Nextcloud whether the encryption and direct-login constraints apply in the same way to user_oidc. Then test both setups in your own environment: confirm HTTPS on every endpoint, check per-user encryption with a test account, and force a sign-in failure to see what /login?direct=1 exposes.
What buyers ask before hiring help for Nextcloud SSO
What makes Nextcloud SSO setup take more or less effort?
The main drivers are the directory behind Nextcloud, the number of groups and their mapping rules, the protocol you choose, whether you need per-user server-side encryption, and whether HTTPS and the Nextcloud hostname are ready. A directory that already holds the attributes Nextcloud needs shortens the mapping work. Every group that maps to a storage quota, an admin role or a folder permission adds test cases. OpenID Connect through the user_oidc app and SAML through the user_saml app use different settings, including redirect URIs, scope mappings and logout configuration. Per-user encryption changes the design: authentik's Nextcloud guide says OIDC and SAML cannot be used with server-side per-user encryption, which needs LDAP. Both protocols also require HTTPS, so an unfinished hostname or certificate stalls the project before SSO work begins. Confirm each driver with your identity team at the start.
Can my team set up Nextcloud SSO without outside help?
Yes, for a small test. A team with identity and Nextcloud administration skills can work through the user_oidc README, the authentik or Keycloak setup guides and a test instance without outside help. The harder part is production hardening and upgrades. Production work includes choosing the database, securing administrator access to the identity provider, planning backups, reviewing logout and session behavior, and testing what happens when SSO fails. Keycloak needs a relational database in production, so that decision comes early. Since Keycloak 26.0, the project has planned four minor releases a year, and authentik's security policy lists the version lines that receive fixes. Each upgrade requires someone to track the changes and retest login flows. Confirm that your team has an owner for that routine after go-live, since that ownership is often the gap to close before launch.
How long does Nextcloud SSO with Keycloak or authentik take?
No timeline is documented for this work, so ask for one in the written scope before you commit. The main drivers are the number of groups and mapping rules, the directory type, whether per-user encryption and LDAP are part of the design, how many test cases you need, and whether the hostname and HTTPS are ready on day one. A fixed-scope engagement sets deliverables and timelines in writing before work starts, so the schedule should appear in that document. Ask the provider to show phases for design, build in a test environment, testing with test users, cutover and handover. Also ask which tasks depend on your team, such as admin access, approvals and decisions on encryption, because waiting on those can move the schedule as much as the configuration does.
What do we need to provide before a Nextcloud SSO project starts?
The work needs administrator access to the identity provider, a decision on whether LDAP is part of the design, agreed group mapping rules, and test users who represent each role that signs in. Administrator access should be limited to the Keycloak realm or authentik instance used for Nextcloud, with a named contact who can approve changes. The LDAP decision matters because authentik's guide says per-user server-side encryption needs LDAP, since OIDC and SAML do not give Nextcloud the user's cleartext password. Group mapping rules define which groups become Nextcloud groups, which grant admin rights, and which set a storage quota. Test users should include a standard user, a Nextcloud administrator, a user outside every group and a user whose account is disabled. Without these cases, testing stops at the successful sign-in path. Ask the provider to list its requirements from your side in writing.
What does an authentik Enterprise license add for Nextcloud SSO?
The paid license covers only code under authentik/enterprise, while the core is MIT-licensed. authentik's pricing page lists Enterprise at $5 per user per month billed annually plus $0.02 per external user per month, and Enterprise Plus starting at $20k annually. The same page lists these as enterprise-only: Google Workspace and Microsoft Entra ID integrations, mTLS client certificate authentication, privileged access management, password history, enhanced audit logging, and ticket-based support for subscriptions over $1k. A Nextcloud project that uses OIDC or SAML with a self-hosted directory may not need most of these, so compare the list against your design before you buy. Confirm with authentik which features your design uses and whether production use of the enterprise code requires a subscription.
What does a fixed-scope engagement or retainer cover for SSO?
A fixed-scope engagement covers the agreed scope, deliverables and timeline, which are set in writing before work starts. For Nextcloud SSO, the written scope should name the design decisions, the protocol configuration, the test cases and the documentation you will receive. DeployOpen does not publish a price list, and a quote follows from the written scope, so the scope document is the basis for comparing providers. A retainer covers ongoing support, upgrades and continuous testing after go-live. It suits teams that want a provider to handle identity provider and Nextcloud upgrades and retest login flows after each change. Before you sign, ask for the support hours, what is excluded, how change requests are priced, and which acceptance criteria the written scope uses.
How DeployOpen sets up Nextcloud SSO with either provider
DeployOpen treats Keycloak and authentik as two options for the same Nextcloud outcome, and the choice depends on which protocols your Nextcloud setup needs, who runs the identity server, and whether your team needs authentik's paid enterprise features. We plan and build either provider inside your own cloud accounts, data centers or air-gapped networks. Scope is agreed in writing before work starts.
How we scope
- The written scope names the Nextcloud version, the login method (OIDC, SAML or LDAP) and the provider you choose.
- Scope covers where users come from, such as an LDAP or Active Directory directory or an existing identity provider.
- Fixed-scope engagements agree deliverables and timelines in writing before work starts, and ongoing support is available as a retainer.
How we build
- Configure a production database for either provider, since Keycloak needs a relational database and authentik uses PostgreSQL.
- Register the Nextcloud redirect URI under /apps/user_oidc/code and require HTTPS for OIDC and SAML logins.
- Map groups and storage quota from the provider into Nextcloud, then test each mapping with a sample account.
How we hand over
- Handover documents the provider settings, the occ user_oidc:provider configuration and the backchannel logout settings for your team.
- Runbooks cover the /login?direct=1 fallback to built-in login, so administrators can still sign in if SSO fails.
- Each handover records documented limits, such as server-side per-user encryption, which needs LDAP and cannot run over OIDC or SAML.
How we support
- Ongoing support covers upgrades and continuous testing of the chosen provider and Nextcloud, delivered as a retainer.
- If you choose authentik, confirm which release lines its security policy currently covers before you fix a version.
- Retest sign-in, logout and group mapping after each Nextcloud or identity provider upgrade, and document the results.

