Nextcloud authentication with Active Directory (LDAP)

Connect Nextcloud to Active Directory over TLS, keep internal user identifiers stable and test filters before admitting more users.

Last updated

On this page (5)

Nextcloud · Active Directory / LDAP · LDAP

Before you start

This connects Nextcloud directly to a directory; it does not add federated browser SSO. Obtain the directory base DN, a least-privilege read-only bind account, and a trusted directory certificate chain. Keep a local admin login and note any existing Nextcloud internal user IDs.

Configure directory sign-in

  1. Enable the LDAP user and group backend and enter the directory FQDN, TLS settings, bind identity and base DN. Use a transport that validates the directory server’s certificate. Test the connection before entering a broad search scope.
  2. Under Users, Login Attributes and Groups, scope the visible users to a pilot population and choose the intended login attribute, such as sAMAccountName. A login attribute identifies the directory record during sign-in; it is not the same as the internal Nextcloud UID. Leave internal username and UUID settings stable on an established connection.
  3. Use the configuration test and compare the resulting accounts with the directory inventory. If local accounts already own files, decide how to preserve ownership before switching the backend. A matching display name or email does not guarantee that the LDAP account resolves to the same UID.

Verify the result

  • Test an allowed user, a user outside the scope and an existing account with files and shares. Confirm only expected groups appear in the share picker.
  • Disable a pilot directory account and test browser sessions and sync-client app passwords separately. Record the app-side actions needed to end prior access.

Official documentation

Have Pilae connect your identity provider

Pilae can deploy Nextcloud with your identity provider already connected. We agree the edition, account mapping and access tests with your team before rollout.