Keycloak vs Authelia for Nextcloud SSO

Keycloak covers the most documented Nextcloud sign-in routes, including OpenID Connect, SAML 2.0 and directory federation. Authelia's documented Nextcloud path is an OpenID Connect guide maintained by the community, so the choice depends on which routes you need and how much vendor-backed documentation you want.

On this page

Keycloak vs Authelia for Nextcloud SSO: which fits your team

Choose Keycloak when Nextcloud must sit behind a full identity provider. Keycloak fits when you need SAML 2.0 through Nextcloud's user_saml app, users federated from LDAP or Active Directory, an admin console your identity team can run, or brokering to an upstream OpenID Connect or SAML provider. Choose Authelia for a lighter OpenID Connect setup, where your team accepts a community-maintained guide and HTTPS is already in place for the Nextcloud hostname. Authelia works as a companion to a reverse proxy, so your proxy layout is part of that decision. The general comparison of the two platforms sits on the sibling Keycloak vs Authelia page, so this section stays on the Nextcloud decision.

Authelia's documented Nextcloud path is OpenID Connect, delivered through a community-supported guide that covers two apps: the OpenID Connect Login app and the OpenID Connect user backend app. That guide records testing with Authelia v4.39.9 on Nextcloud v31.0.5 and v31.0.8, so match those app and server versions to yours before you rely on the steps. No SAML route is documented there. If your users must sign in over SAML, confirm that route with Authelia before you choose it. Keycloak's SAML 2.0 support is documented in its Server Administration Guide, but you still need to test user_saml settings against your own identity provider metadata before you commit.

Whichever you choose, run three checks before you commit. First, OpenID Connect and SAML sign-in both need HTTPS on the Nextcloud side. authentik's Nextcloud guide notes that neither protocol gives Nextcloud the user's cleartext password, which matters if you rely on server-side encryption with per-user keys, since that setting needs LDAP. Second, if you use the user_oidc app with Keycloak, its README documents backchannel logout settings on the OpenID client, so test logout as well as login. Third, confirm an admin recovery path. authentik's guide notes users can reach Nextcloud's built-in login at /login?direct=1 when an SSO problem blocks sign-in, so write that path into your runbook before cutover.

How a Nextcloud SSO sign-in moves between browser, app and provider

This illustrative sequence starts when a user opens the Nextcloud sign-in page. Nextcloud, through the user_oidc app, redirects the browser to the identity provider, where the user signs in. The provider sends the browser back to Nextcloud with an authorization code, and Nextcloud exchanges that code for tokens and creates a local session. The backchannel logout step is separate: the provider calls the user_oidc endpoint under /apps/user_oidc to end the matching session, as in the documented Keycloak example. Confirm the exact redirect URIs, client settings and logout steps in the Nextcloud app settings for your version before you build.

Illustrative sign-in and backchannel logout flow, Keycloak as the example provider.

What Nextcloud SSO requires from an identity provider

Nextcloud documents three routes for an identity provider, and your choice starts with the protocol your provider speaks. OpenID Connect runs through the user_oidc app, and Keycloak is named in its README, which says the JWKS URL is set in the Keys tab of the Keycloak client settings. The user_oidc README also says backchannel logout needs two settings on the OpenID client, including a backchannel logout URL under /apps/user_oidc. Authelia's route is a community-supported OpenID Connect guide in Authelia's documentation. It covers two apps, an OpenID Connect Login app and an OpenID Connect user backend app, tested with Nextcloud v31.0.5 and v31.0.8 and Authelia v4.39.9. Confirm those app versions can be installed on your Nextcloud release before you rely on that path.

SAML 2.0 runs through the SSO & SAML app, user_saml, whose README lists SAML 2.0 among its supported and tested provider types, alongside OneLogin, Shibboleth, AD FS, Kerberos and CAS. Keycloak supports SAML 2.0, and its Server Administration Guide documents SAML 2.0 clients, so Keycloak can sit on this route if your policy requires SAML. This page does not walk through the Keycloak client settings for user_saml, so test them in a non-production instance. Authelia's documented Nextcloud guide covers OpenID Connect only, so confirm with Authelia before assuming a SAML route. The LDAP route works differently. Nextcloud's LDAP and Active Directory integration reads a directory directly, and no documented LDAP route runs from Keycloak to Nextcloud. Keycloak documents federating users from LDAP or Active Directory, which is the opposite direction, so point Nextcloud at the directory that holds your users.

Keycloak's SCIM API does not provision Nextcloud. It lets external systems create users in Keycloak, and the 26.8 release notes list it as supported. Nextcloud SCIM provisioning is not documented on this page, so ask Nextcloud whether your deployment can receive SCIM-driven account changes before you design joiner and leaver steps around it. Two more decisions follow from the route you pick. authentik's Nextcloud guide notes that server-side encryption with per-user keys needs LDAP, because OIDC and SAML do not give Nextcloud the user's cleartext password, so plan an LDAP or Active Directory connection if you need that encryption. Also decide who may use Nextcloud's built-in login at /login?direct=1, the fallback authentik's guide names for when an OIDC or SAML problem blocks sign-in. Plan and edition requirements for these apps are not documented here, so confirm which apps your Nextcloud deployment can install before you choose a route.

Where Nextcloud SSO differs between Keycloak and Authelia

This table compares how Keycloak and Authelia handle the Nextcloud integration points that matter most at setup and during review. Read each row as a question to put to the vendor, and confirm any cell marked not documented here before you commit. The main takeaway is that Keycloak has documented Nextcloud app support, SAML and directory federation, while Authelia's Nextcloud path is a community-supported OpenID Connect guide.

Integration aspectKeycloakAuthelia
Protocols used with NextcloudOpenID Connect and SAML 2.0OpenID Connect 1.0, per its community-supported Nextcloud guide
Nextcloud app route and vendor documentationuser_oidc app; its README names Keycloak and covers provider setup with occ user_oidc:providerOpenID Connect Login app and OpenID Connect user backend app, per Authelia's community guide
SAML routeKeycloak SAML 2.0 clients can pair with the user_saml app; confirm the setup with the vendorNot documented here; confirm SAML support with the vendor
LDAP or Active Directory sourceKeycloak federates users from LDAP or Active Directory; Nextcloud's own LDAP integration is configured separatelyNot documented here; confirm user directory options with the vendor
SCIM provisioningKeycloak's SCIM API lets external systems provision users into Keycloak; confirm any Nextcloud-side provisioningNot documented here; confirm with the vendor
Backchannel logoutuser_oidc README: two settings on the OpenID client, including a backchannel logout URL under /apps/user_oidcNot documented here; confirm with the vendor
HTTPS requirement and emergency login pathHTTPS: not documented here for Keycloak; confirm for every URL. Emergency login: not documented hereHTTPS required, because session cookies need it and plain HTTP is not supported. Emergency login: not documented here
License and current releaseApache-2.0; current release 26.8.1, released October 13, 2026Apache-2.0; current release v4.39.28, released September 17, 2026
Database and admin consoleRelational database required in production (PostgreSQL 14 to 18, MariaDB, MySQL, SQL Server, Oracle, Aurora PostgreSQL); includes an admin consoleDatabase and admin console: not documented here; confirm with the vendor

How Nextcloud SSO setup differs for each provider

Keycloak with user_oidc is the route with the most documented steps in this comparison. The user_oidc README names Keycloak directly, so most of the work happens in the Keycloak admin console and then in one Nextcloud command.

  • Create the OpenID client: Build an OpenID Connect client for Nextcloud in the Keycloak admin console, using the Keycloak Server Administration Guide for the client settings.
  • Set the JWKS URL: Open the Keys tab of the client settings and set the JWKS URL, which lets Nextcloud verify the signatures on the tokens it receives.
  • Configure backchannel logout: Set the two backchannel logout settings on the client, including the backchannel logout URL under /apps/user_oidc, so a sign-out in Keycloak can reach Nextcloud.
  • Register the provider: Run the occ user_oidc:provider command on the Nextcloud host to register Keycloak, using the values from the client you just created.
  • Test before rollout: Confirm that a test user can sign in, and that a sign-out from Keycloak ends the Nextcloud session, before you move real users across.

Check that the user_oidc app version you install supports your Nextcloud release before you change production.

Who creates Nextcloud SSO users and how access ends

These five points separate what Keycloak provisions from what Nextcloud creates on its own, and how access ends on each path. Group mapping is not documented on this page for either provider, so confirm it separately before you plan role-based access.

Keycloak reads the directory

Keycloak reads the directory through user federation with LDAP or Active Directory. Keycloak can see the users and groups in your directory, but Nextcloud still signs users in through the route you configure, such as the user_oidc app for OpenID Connect or user_saml for SAML. Check which attributes Keycloak imports and whether your directory's lockout and password rules still apply at sign-in.

Keycloak admin guide

SCIM provisions Keycloak only

Keycloak's SCIM API lets an external system create and update users inside Keycloak. It provisions Keycloak identities only and does not create Nextcloud accounts. An HR or identity governance feed that calls SCIM therefore changes who can authenticate to Keycloak, while Nextcloud still needs its own account creation path. Confirm the endpoint on your running release, since the API is listed as supported in the 26.8 release notes, and test one new user end to end.

Nextcloud LDAP as a separate route

Nextcloud's own LDAP and Active Directory integration is a separate route that binds Nextcloud directly to the directory, with no identity provider in front. It matters for per-user encryption. authentik's Nextcloud guide says server-side encryption with per-user keys needs LDAP, because OIDC and SAML do not give Nextcloud the user's cleartext password. If you need per-user keys alongside SSO, plan the directory bind and confirm the setup in the Nextcloud admin manual.

Nextcloud LDAP manual

Authelia's user source needs confirming

Authelia works as a companion to reverse proxies, and its Nextcloud guide is community-supported. Confirm in Authelia's documentation which user source it uses for this integration, and whether Nextcloud accounts are created at first sign-in. Also confirm how group claims reach Nextcloud. Settle both answers before you compare Authelia's provisioning with Keycloak's federation and SCIM routes.

Authelia Nextcloud guide

Backchannel logout and disabled accounts

The user_oidc README documents backchannel logout for providers such as Keycloak. It needs two settings on the OpenID client, including a backchannel logout URL under /apps/user_oidc. Confirm that Keycloak can reach that URL on your Nextcloud server. Then confirm what a disabled Keycloak user means for an existing Nextcloud account, active sessions and app passwords, since this is not documented on this page. Test a disabled account against a live session before you rely on it.

user_oidc README

Documented limits of Nextcloud SSO with each provider

Both providers face the same transport limits. As authentik's Nextcloud guide notes, OpenID Connect and SAML require HTTPS, so the Nextcloud host, the public URL of the identity provider and every redirect URI must be served over TLS before the pilot starts. Authelia makes this a firm boundary: its session cookies require HTTPS, and the project declines to support plain HTTP. Plan for the failure case as well. If a sign-in problem blocks access, users can reach Nextcloud's built-in login at /login?direct=1, but that path only works for accounts that hold a local Nextcloud password. Confirm which administrator and break-glass accounts fall into that group, then test the path before go-live so you know it works when you need it.

Server-side encryption with per-user keys is the limit most likely to change the design. authentik's Nextcloud guide says this encryption needs LDAP, because OpenID Connect and SAML do not give Nextcloud the user's cleartext password. The limit comes from the protocol, so choosing Keycloak or Authelia does not remove it. Confirm the requirement for your Nextcloud version before you sign off, because the statement comes from a vendor guide and the behavior depends on the release you run. If encryption is required, plan a directory connection from Nextcloud to LDAP through Nextcloud's LDAP and Active Directory integration alongside the SSO login. Keycloak can federate users from LDAP or Active Directory, so the directory you already run can stay the source of truth. With Authelia, confirm how its user backend and your LDAP directory relate before you commit, and record the result in the design.

Version support is the third limit, and it differs by provider. Authelia's Nextcloud guide is community-supported and lists its tested pairs: the OpenID Connect Login app v3.2.2 on Nextcloud v31.0.5, and the OpenID Connect user backend app v8.0.0 on Nextcloud v31.0.8, both with Authelia v4.39.9. Treat those pairs as a starting point and test your own release. On the Keycloak side, the project plans four minor releases a year, and according to its October 2024 release update, breaking changes in a minor release are opt-in. Opt-in changes lower the risk of surprise but do not remove the need to check client settings, such as the JWKS URL in the Keys tab and the backchannel logout settings described in the user_oidc README. Test each Keycloak upgrade against your Nextcloud version in staging before production.

What buyers ask before hiring help with Nextcloud SSO

How much effort does a Nextcloud SSO setup with Authelia take?

Effort depends mainly on the route, whether a user directory already exists, how many environments you run, the MFA policy, and how much logout and recovery testing the scope includes. Authelia's community-supported guide for Nextcloud uses two apps, the OpenID Connect Login app and the OpenID Connect user backend app, and lists tested versions: the login app v3.2.2 on Nextcloud v31.0.5 and the user backend app v8.0.0 on Nextcloud v31.0.8, with Authelia v4.39.9. Check those against your own versions before you plan. Effort rises when you add LDAP for user data, keep separate staging and production, apply MFA rules that differ by group, or test sessions and logout across devices. Authelia only works over HTTPS, so certificates are part of the work from the first day.

How long does Nextcloud SSO integration with Authelia take?

No duration is documented here, and timing follows the written scope that you and DeployOpen agree before work starts. The scope sets the route, the number of environments, any directory work, the MFA policy and the testing the engagement covers. Most engagements are fixed-scope, so the agreed timeline appears in the scope and deliverables document. Ask for the timeline with its assumptions listed: which environments are included, which test accounts exist on day one, and whether a directory is available for the work. Access requests, DNS changes and certificate issuance are the client-side steps most likely to move a plan, so confirm their lead times early.

What does the client need to provide for an Authelia and Nextcloud SSO project?

Plan to provide admin access to Nextcloud and the identity provider, DNS records and HTTPS certificates, test accounts, and a named owner for the emergency login path. In more detail:

  • Admin access to Nextcloud and to Authelia, including the hosts and configuration that run it.
  • DNS records and HTTPS certificates for both hostnames, since Authelia only works over HTTPS.
  • Test accounts for each group or role that Nextcloud permissions depend on.
  • Read access to the directory if LDAP supplies user accounts or groups.
  • A named owner for the emergency login path, who can sign in to Nextcloud when SSO is down and who approves its use.

Ask for these in the written scope so access requests start before the build begins.

Can our own admins set up Nextcloud SSO with Authelia without a partner?

Yes, a capable admin team can follow the documented steps, but testing and recovery need planning before go-live. The Authelia guide covers both Nextcloud apps and their settings, so an experienced admin can work through it in a test environment. The harder parts are proving that logout works across sessions and that users can still reach Nextcloud when the identity provider fails. The user_oidc app documents backchannel logout as two settings on the OpenID client, with its example set up for Keycloak, so confirm with Authelia's documentation whether it supports the same flow. Before anyone changes production, plan a named owner for the emergency login path and a written test list.

What drives the cost of a Nextcloud SSO project and what should a quote include?

The written scope drives most of the cost, because DeployOpen does not publish prices and a quote follows from the agreed scope. Cost has three parts: DeployOpen's fixed-scope fee for the agreed deliverables, your internal staff time for access, reviews and sign-off, and the infrastructure that runs Nextcloud, Authelia and any directory. Ongoing support, upgrades and continuous testing are available as separate retainers, so the recurring part depends on what you choose after go-live. Ask each quote to list:

  • The route, the two Nextcloud apps and the versions covered.
  • The environments in scope, and the logout, recovery and MFA tests included.
  • Directory work, if LDAP is used.
  • Documentation, handover and any retainer, with its terms.
Who maintains the Authelia Nextcloud guide and who fixes it when it is outdated?

The Authelia Nextcloud guide is labeled community-supported, so it carries no vendor support commitment in the documentation. Confirm the current maintainer and update schedule with the Authelia project before you rely on it. Check the tested versions against your Nextcloud and app versions, because a change in either can leave the steps out of date. DeployOpen plans, implements, documents and supports self-hosted platforms inside your infrastructure, and ongoing support, upgrades and testing are available as retainers. Your written scope should name who re-tests the Nextcloud apps and Authelia after a version change, who updates your internal runbook, and who answers when the guide is wrong.

How DeployOpen sets up Nextcloud SSO with either provider

DeployOpen plans and implements Nextcloud single sign-on on the identity provider your organization chooses, self-hosted in your own infrastructure. The work follows the same arc for both: a written scope, a build on Nextcloud's OpenID Connect apps, testing, and documentation your security and compliance teams can review. Keycloak and Authelia differ in what they are for, so the scope starts with that choice.

How we scope

  • Engagements are fixed-scope, so the scope, deliverables and timeline are agreed in writing before work starts.
  • For Keycloak, the scope covers realms, OIDC clients and whether user_oidc's backchannel logout is required.
  • For Authelia, the scope covers the reverse proxy, HTTPS, and the tested app versions in the community guide.

How we build

  • Keycloak: configure an OpenID Connect client, set the JWKS URL in the Keys tab and connect Nextcloud's user_oidc app.
  • Authelia: configure Authelia as the OpenID Connect 1.0 provider and connect the two Nextcloud apps listed in its guide.
  • Both paths: test sign-in, logout and a direct login fallback before users depend on either.

How we hand over

  • Documentation covers the provider configuration, Nextcloud app settings, and the steps to recover local access.
  • If you need per-user server-side encryption, plan an LDAP connection, because OIDC does not give Nextcloud cleartext passwords.
  • Test evidence and configuration records go to your compliance team; DeployOpen does not issue attestations.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Plan a retest after Nextcloud or provider upgrades, since the community guide lists specific tested app versions.
  • Keycloak's project plans four minor releases a year, so schedule regular upgrade windows and retests.

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.