Keycloak vs Zitadel for Nextcloud SSO

Keycloak has a documented Nextcloud route through the user_oidc app. Zitadel's Nextcloud guide is a 2022 blog post that Zitadel flags as possibly outdated, so a Zitadel choice needs its own validation on current versions.

On this page

Keycloak vs Zitadel for Nextcloud SSO: which one fits your instance

Keycloak has the documented route to Nextcloud SSO, and Zitadel's route rests on an older guide. The user_oidc README names Keycloak directly, including where to set the JWKS URL in the Keys tab of the Keycloak client settings and the two settings backchannel logout needs on the OpenID client. Zitadel's Nextcloud guide is a blog post dated December 8, 2022, and Zitadel itself marks it as more than a year old and possibly outdated. Its example runs Nextcloud in Docker without HTTPS in development mode, so treat it as a starting point to verify against your own Nextcloud version.

Choose Keycloak when the Nextcloud instance serves your own workforce and you want OpenID Connect through the user_oidc app, with SAML available later through user_saml or LDAP federation for the same users. Its Server Administration Guide covers OpenID Connect and SAML 2.0 clients, and its SCIM API lets external systems provision users into Keycloak. Choose Zitadel when your team is prepared to validate an older integration itself and you want its model. Zitadel's organizations matter only if this Nextcloud instance serves several customers who each manage their own users. For one internal user base, organizations add a concept to administer without a clear Nextcloud benefit, so judge Zitadel on its other merits. Both guides describe provisioning into the identity provider, not out to Nextcloud, so confirm how Nextcloud accounts are created on first login and removed when people leave.

For licensing, multi-tenancy and operating effort, read the sibling page Keycloak vs Zitadel for customer and workforce identity. Before you commit, run three checks on your own instance: confirm that the user_oidc release you deploy supports your Keycloak version, confirm that backchannel logout works end to end, and keep Nextcloud's built-in login reachable at /login?direct=1 so administrators can still sign in if OIDC fails. Also confirm your encryption design. OIDC does not give Nextcloud the user's cleartext password, which affects server-side encryption with per-user keys, so test that path before users depend on it.

Which Nextcloud sign-in path each identity provider serves

Nextcloud offers three ways to sign users in, and each one shapes what Keycloak or Zitadel must do. The cards below separate the documented routes from the gaps you should confirm before choosing. Read each card with the Nextcloud app or admin manual it names, because the sign-in path also decides where passwords and encryption keys sit.

OpenID Connect through user_oidc

Keycloak has the documented OIDC route. The user_oidc README names Keycloak and explains how to set the JWKS URL on the Keys tab of the client settings. It also documents backchannel logout, which needs two settings on the OpenID client, including the backchannel logout URL under /apps/user_oidc. Zitadel published a Nextcloud over OpenID Connect post dated December 8, 2022. Zitadel marks that post as more than a year old and possibly outdated, and its example runs Nextcloud in Docker without HTTPS in development mode. Confirm every Zitadel step against your own Nextcloud version before you rely on it.

user_oidc README

SAML 2.0 through user_saml

Keycloak has the documented SAML route. The user_saml app lists SAML 2.0 as a supported and tested provider type, alongside OneLogin, Shibboleth, AD FS, Kerberos and CAS. Keycloak's Server Administration Guide documents SAML 2.0 clients, so the protocol is covered on that side. Zitadel documents SAML applications in general, but a Nextcloud-specific guide is not something to assume exists. Ask Zitadel for one or test it in a lab. Whichever provider you pick, confirm HTTPS on the Nextcloud side and test /login?direct=1 as a fallback before go-live.

user_saml README

LDAP or Active Directory integration

Keycloak documents LDAP and Active Directory user federation, so it can read the directory your users already live in. Nextcloud's own LDAP and Active Directory integration is a separate connection from Nextcloud to that directory, and both can point at the same source. Zitadel's documentation does not describe LDAP or AD user federation, so do not plan around a Zitadel directory route. If the directory is your source of truth, decide whether Nextcloud reads it directly, Keycloak federates it, or both, and confirm the attribute mapping each option needs.

Nextcloud LDAP guide

Per-user encryption keys

Server-side encryption with per-user keys needs Nextcloud to hold the user's cleartext password. OIDC and SAML do not give Nextcloud the cleartext password, so this feature depends on LDAP login. The limit comes from the protocols, so it applies to Keycloak and Zitadel alike. Decide before rollout, because changing the sign-in path later changes how users authenticate and what the server can decrypt. Ask Nextcloud which features in your version depend on the password, and tell users where their password is verified.

What Nextcloud requires for SSO with an external identity provider

Nextcloud handles external sign-in through three separate components, and the one you pick decides which protocol Keycloak or Zitadel must speak. The user_oidc app is the OpenID Connect user backend, and its README includes Keycloak-specific steps, such as setting the JWKS URL in the Keys tab of the Keycloak client settings. The SSO & SAML app (user_saml) handles SAML 2.0, and its README lists SAML 2.0, OneLogin, Shibboleth, AD FS, environment-variable authentication, Kerberos and CAS as supported and tested provider types. Built-in LDAP, covered in Nextcloud's LDAP and Active Directory guide, is the third path. It reads users from a directory and does not redirect the browser to a login page, so it behaves differently from the two redirect-based apps.

Two requirements must be confirmed against the Nextcloud release you plan to run, and this page cannot settle either one. The first is whether user_oidc, user_saml and built-in LDAP each carry a Nextcloud plan or edition requirement. Check the admin documentation for your exact version and ask Nextcloud in writing before you commit to a design. The second is SCIM support for Nextcloud. Keycloak documents a SCIM API that lets external systems provision users into Keycloak, and Zitadel documents a SCIM v2 interface for provisioning users into Zitadel, but neither vendor's documented SCIM feature covers pushing accounts out to Nextcloud. If joiner and leaver automation depends on that, make SCIM behavior a written acceptance test before you select a provider.

Two constraints apply whichever provider you choose. First, OIDC and SAML both require HTTPS, so the Nextcloud host and the provider's public endpoints need valid TLS before you test sign-in. Second, server-side encryption with per-user keys needs LDAP, because OIDC and SAML do not give Nextcloud the user's cleartext password. If you plan to use that encryption, decide early that a directory path is part of the design, since a Keycloak or Zitadel login alone will not supply the password. authentik's Nextcloud guide also notes that users can reach the built-in login at /login?direct=1 when an OIDC or SAML problem blocks sign-in. Test that path, document who may use it, and set that rule in your access policy before go-live.

Keycloak vs Zitadel for Nextcloud SSO, aspect by aspect

This table compares Keycloak and Zitadel as the identity provider for Nextcloud, covering protocols, the Nextcloud app, logout, signing keys, directory federation, provisioning, databases, self-hosting and current releases. Treat a cell marked as not documented as a question to put to the vendor before you commit. The main takeaway is that Keycloak has the clearer documented path for Nextcloud through user_oidc, while Zitadel's Nextcloud guide is dated and flagged as possibly outdated.

AspectKeycloak 26.8.1Zitadel v4.19.5
ProtocolsOpenID Connect via user_oidc. SAML 2.0 is a Keycloak feature, so confirm the user_saml pairing.OpenID Connect and SAML applications. The Nextcloud path is OIDC via user_oidc.
Nextcloud app and documented guideuser_oidc. Its README names Keycloak. A dedicated Keycloak guide is not documented here, confirm with the vendor.user_oidc. Zitadel's Nextcloud guide is a December 8, 2022 blog post that Zitadel flags as possibly outdated.
Backchannel logoutDocumented in the user_oidc README: two settings on the OpenID client, including a backchannel logout URL under /apps/user_oidc.Not documented here, confirm with the vendor and test logout end to end.
JWKS and key setupThe JWKS URL is set in the Keys tab of the Keycloak client settings, per the user_oidc README.Not documented here, confirm the JWKS endpoint and key rotation with the vendor.
LDAP federationFederates users from LDAP or Active Directory. Nextcloud also has its own LDAP integration.Not documented here, confirm with the vendor whether directory federation is available.
Provisioning direction and SCIMInbound: SCIM API provisions users into Keycloak (listed in 26.8 release notes). Push to Nextcloud not documented.Inbound: SCIM v2 provisions users into Zitadel. Guides do not describe pushing users out to apps.
Production databasePostgreSQL 14 to 18, MariaDB, MySQL, SQL Server, Oracle and Aurora PostgreSQL. Dev file database is not for production.PostgreSQL 14 to 18, the only self-hosted database listed.
Self-hosting methodsKubernetes and OpenShift via the Keycloak Operator, installed with OLM (recommended) or kubectl.Linux and macOS binaries, Docker Compose and Kubernetes. The official Helm chart is recommended for high availability.
Current release26.8.1, released October 13, 2026, under Apache-2.0.v4.19.5, released October 15, 2026. Core components are under AGPL-3.0.

Nextcloud checks the login with the provider before it opens a session

This illustrative generic OpenID Connect flow starts when a user opens Nextcloud and chooses the provider login. Nextcloud redirects the browser to the Keycloak or Zitadel sign-in page, where the user authenticates. The provider then redirects the browser back to the user_oidc callback with an authorization code. Nextcloud exchanges that code for tokens on the server side, validates the token against the provider's signing keys (JWKS), and only then starts its own session. When you build this, confirm the redirect URI and the JWKS URL in the provider client settings. Backchannel logout is a separate path, configured as described in the user_oidc README.

Illustrative generic OpenID Connect login path for Nextcloud with user_oidc.

Setting up Keycloak or Zitadel for Nextcloud SSO, step by step

Keycloak setup starts with the database, because production use needs a relational database and the default dev-file database is not suitable for it. Keycloak supports PostgreSQL 14 to 18, along with MariaDB, MySQL, Microsoft SQL Server, Oracle Database and Amazon Aurora PostgreSQL. Once the database is running, create the client that Nextcloud will use and set the key and logout settings that the Nextcloud app expects.

  • Run a production database: Connect Keycloak to PostgreSQL 14 to 18, or another supported production database, and test a backup and restore before going further. See the Keycloak database guide.
  • Create the OpenID client: In the realm that will serve Nextcloud, add an OpenID Connect client, set its redirect address to your Nextcloud server, and record the client ID and secret for the Nextcloud step.
  • Set the JWKS URL: The user_oidc README says the JWKS URL is set in the Keys tab of the Keycloak client settings. Copy the value from the realm's OpenID configuration so Nextcloud can verify token signatures.
  • Configure backchannel logout: The README says backchannel logout needs two settings on the OpenID client, including a backchannel logout URL under /apps/user_oidc. Set both to the values in the README for your app version, then test a sign-out.

Check that the redirect address, the JWKS URL and the backchannel logout URL all use the same Nextcloud hostname and HTTPS scheme before you move to the Nextcloud tab.

How users and groups reach Nextcloud from each provider

This section separates two questions teams often merge: how a user record reaches the identity provider, and how that identity reaches Nextcloud as an account with groups. The documented provisioning paths for Keycloak and Zitadel both end at the identity provider. Everything after that point, including account creation, group mapping and deprovisioning, is what your test instance has to prove.

Keycloak provisioning is inbound

Keycloak's Server Administration Guide documents a SCIM API that lets external systems create users in Keycloak, and LDAP or Active Directory federation that reads users from a directory. Both bring identities into Keycloak, so as documented the provisioning path is inbound only. The documentation does not describe Keycloak pushing users or groups out to Nextcloud, so test the Nextcloud side on its own before you assume a user or group exists there ahead of a first sign-in.

Keycloak docs

Zitadel provisions into Zitadel

Zitadel's docs describe a SCIM v2 service provider interface for provisioning users into Zitadel, plus OIDC and SAML applications for sign-in. The guides do not describe Zitadel sending users or group memberships out to applications. If your HR system or directory is the source of truth, the provisioning chain stops at Zitadel, and you must confirm how the Nextcloud account gets created after that. Zitadel's own Nextcloud blog post carries a notice that it may be outdated and runs Nextcloud without HTTPS in development mode, so use it only as a reference point.

Zitadel services docs

Account creation and group mapping

The documented setup for this pair does not establish how Nextcloud creates accounts or maps identity provider groups to Nextcloud groups. The user_oidc README covers provider registration with the occ user_oidc:provider command and the JWKS URL, but that does not settle group handling. Confirm group mapping on a test instance before assuming it works: sign in a test user from each provider, then record whether the account and its group memberships appear as you expect. Repeat after moving that user between groups upstream.

Deprovisioning and backchannel logout

The user_oidc README documents backchannel logout, which needs two settings on the OpenID client, including a backchannel logout URL under /apps/user_oidc. That covers provider-signaled session end, but it does not say whether a disabled user loses Nextcloud access, or whether an open browser session, desktop client or mobile client keeps working. Disable a test user, check each of those entry points, and record how long each stays usable. Repeat with a group removal, since that path may behave differently from disabling the account.

user_oidc README

Documented limits of Keycloak and Zitadel for Nextcloud SSO

The only Zitadel-specific Nextcloud material in the supplied sources is a Zitadel blog post from December 8, 2022, which Zitadel itself says is more than a year old and may be outdated. Its example runs Nextcloud in Docker without HTTPS in development mode, so treat it as a lab starting point only. The HTTPS requirement is the limit that will hit a production rollout first. The authentik Nextcloud guide states that OIDC and SAML require HTTPS, and nothing in the supplied material says Zitadel or Keycloak relaxes that. Before you copy any configuration key from the post, compare it with the current Nextcloud user_oidc README and the Zitadel release you plan to run. Then confirm that the redirect URI and Nextcloud's base URL both use HTTPS in your own staging environment.

Two documented limits apply to any OIDC or SAML design, whichever identity provider you choose. First, server-side encryption with per-user keys needs LDAP, because OIDC and SAML do not give Nextcloud the user's cleartext password. If your policy requires per-user encryption, decide early whether an LDAP path belongs in the architecture, and test how key unlocking behaves with that path. Second, if an OIDC or SAML problem blocks sign-in, users can reach Nextcloud's built-in login at /login?direct=1, as described in the authentik Nextcloud guide. That route is useful for administrators during an outage, but it sends users to local password login instead of your identity provider. Decide who may use it, whether MFA applies there, and how its use is logged. Test it on staging by breaking the provider settings on purpose.

The supplied material does not document three things you need to test before committing. First, a current Zitadel guide for Nextcloud: the only Zitadel walkthrough is the 2022 post, so client settings, scopes and claim mapping must be verified against today's Zitadel and user_oidc versions. Second, Zitadel LDAP for Nextcloud: Zitadel documents a SCIM v2 interface for provisioning users into Zitadel, and its guides do not describe pushing users out to applications. Ask Zitadel whether an LDAP interface suits your per-user encryption path. Third, Nextcloud SCIM: no supplied source shows Nextcloud consuming SCIM for provisioning. Ask Nextcloud and your integration partner how user creation, group sync and deprovisioning would run. Then run a test that creates, changes and disables one user in the identity provider and records what Nextcloud does in each case.

What buyers ask before hiring help on Nextcloud SSO

What drives the effort of Nextcloud SSO with Keycloak or Zitadel?

Effort rises with the number of Nextcloud instances, because each one needs its own client registration and provider configuration. The other drivers are whether LDAP or Active Directory is in scope, how ready your HTTPS and reverse proxy setup is, how identity provider groups map to Nextcloud groups, and whether the work is validated against the Nextcloud and identity provider versions you actually run.

  • Instance count and client registrations
  • LDAP or Active Directory lookups alongside sign-in
  • HTTPS, certificates and reverse proxy readiness
  • Group mapping and admin roles
  • Testing against current versions

The authentik integration guide for Nextcloud states that OIDC and SAML require HTTPS, so an unfinished certificate or proxy setup is often the first blocker. Ask for each driver to be listed as an assumption in the written scope, so any change in instance count or directory scope is visible in the quote.

How long does a Nextcloud SSO setup with Keycloak or Zitadel take?

The timeline depends on the written scope, and no standard duration fits every environment. The main drivers are the number of Nextcloud instances, whether LDAP or Active Directory is in scope, how ready your DNS, TLS and reverse proxy setup already is, and how quickly your own teams approve changes and supply test users. Items outside the delivery team often set the pace, such as certificate issuance or change windows on a production instance. Most DeployOpen engagements are fixed-scope, and the scope, deliverables and timelines are agreed in writing before work starts. Ask for milestones tied to each deliverable, and ask which dates depend on your teams so you can plan approvals early.

What does the client need to provide for a Nextcloud SSO project?

You need admin access to the identity provider, shell access to Nextcloud with the ability to run occ, DNS and TLS for both systems, read access to the directory if LDAP or Active Directory is in scope, and test users. Specifically:

  • Admin rights on Keycloak or Zitadel to create clients, mappings and signing keys
  • Shell access on each Nextcloud instance to run occ commands as the web server user
  • DNS names and certificates for the identity provider, Nextcloud and the reverse proxy in front of it
  • A directory service account with read access, if LDAP or Active Directory is in scope
  • Test accounts for each group and role Nextcloud must honor

Agree on who makes DNS and certificate changes and how long those approvals take in your environment, because these steps often decide the start date. Ask the delivery team to list each access need in the written scope.

Can our team set up Nextcloud SSO with Keycloak or Zitadel alone?

Yes, a team can do this alone if it owns admin roles on both the identity provider and Nextcloud and accepts the documentation gaps on the Zitadel side. Keycloak is the easier path to verify from public material: the user_oidc README names Keycloak, explains where the JWKS URL goes in the Keys tab of the client settings, and documents backchannel logout and per-provider setup with occ. Zitadel's public Nextcloud example is a December 2022 blog post that carries its own notice that it may be outdated, and it runs Nextcloud without HTTPS in development mode. A Zitadel team must therefore verify production HTTPS, current versions and every setting against current documentation itself. Consider an outside review of the plan if LDAP is in scope or if nobody on the team has run occ on a production Nextcloud before.

What should a quote for Nextcloud SSO implementation itemize?

A quote should itemize scope, deliverables, testing and handover, each tied to named systems and instance counts.

  • Scope: Nextcloud instances, identity providers, LDAP or Active Directory, groups, user populations and what is excluded
  • Deliverables: identity provider and Nextcloud configuration, documentation, and any occ commands or scripts handed over
  • Testing: sign-in, group mapping, logout and the fallback login path, run against the versions you operate
  • Handover: runbooks, an admin walkthrough, and upgrade and backup steps

Ask which items are one-time and which recur, such as retainers for upgrades and continuous testing. DeployOpen does not publish a price list, and a quote follows from the written scope. Most engagements are fixed-scope, so scope, deliverables and timelines should be agreed in writing before work starts.

What is involved in switching identity providers later for Nextcloud?

Switching later means reconfiguring Nextcloud to trust the new provider and changing the identifiers Nextcloud stores for each user. Provider entries are managed with the occ user_oidc:provider command, so the new provider needs its own client, redirect, key and backchannel logout settings. Users who already exist in Nextcloud carry identifiers from the old provider. If those identifiers change, accounts can appear as new users and may be disconnected from their files and shares unless the mapping is planned. Test the move on a copy of the instance first. Keycloak's SCIM API and Zitadel's SCIM v2 interface cover provisioning into each platform, but Zitadel's guides do not describe pushing users out to applications, so confirm how user creation and removal will reach Nextcloud in your design.

How DeployOpen sets up Nextcloud SSO without favoring either provider

DeployOpen plans Nextcloud single sign-on around what Nextcloud documents for OpenID Connect, SAML and LDAP, then applies the same scope, build and test steps to Keycloak or Zitadel. Our role is to implement, harden, document and support the chosen provider inside your own infrastructure. Confirm the protocol, provisioning and licensing points below with each vendor before you commit.

How we scope

  • The written scope names which Nextcloud login apps you use, such as user_oidc, user_saml or LDAP.
  • Scope records whether Keycloak or Zitadel will be the identity provider, and why, before any configuration starts.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing, and ongoing support available as a retainer.

How we build

  • Configure the OpenID Connect client in the chosen provider, including the JWKS URL for Nextcloud's user_oidc app.
  • Configure backchannel logout with the two settings the user_oidc README lists on the provider's OpenID client.
  • Require HTTPS on the Nextcloud and identity endpoints before go-live, since OIDC and SAML setups require it.

How we hand over

  • Document each provider's configuration, including client settings, redirect URIs, and the occ user_oidc:provider commands used.
  • Document provisioning, since Zitadel's SCIM interface covers Zitadel users and its guides do not describe pushing users to apps.
  • Keep the 2022 Zitadel blog example out of production: it is flagged as outdated and runs Nextcloud without HTTPS.

How we support

  • Keep a login fallback documented: users can reach Nextcloud's built-in login at /login?direct=1 when OIDC or SAML blocks sign-in.
  • Retest after each Keycloak or Zitadel upgrade, since release lines change; check the provider's release notes first.
  • Confirm license obligations with your counsel before deployment, since Zitadel's core is AGPL-3.0 and Keycloak's is Apache-2.0.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.