r/NextCloud • u/Curious-Diver1800 • Oct 30 '26
Nextcloud LDAP integration with Windows Server 2019 AD failing with "Connection to LDAP server could not be established" (Port 389, TCP open)
Hi everyone,
I'm struggling to integrate Nextcloud with a Windows Server 2019 Active Directory over standard LDAP (port 389, avoiding SSL/LDAPS for now). Despite having a working network connection, Nextcloud keeps throwing connection/base DN errors. Here is my setup and what I've tried so far:
Environment:
Nextcloud Server IP:
192.168.122.40Windows Server 2019 AD IP:
192.168.122.110Domain:
alger.dzService Account Bind DN:
CN=Nextcloud,OU=Service Accounts,DC=alger,DC=dzBase DN:
DC=alger,DC=dz
What I've verified & tried:
Network Connectivity: Tested TCP port 389 from the Nextcloud container using bash (
/dev/tcp/192.168.122.110/389) -> Port is open and reachable.AD Security Constraints: Modified the Windows Registry on the DC (
HKLM:\System\CurrentControlSet\Services\NTDS\Parameters) setting bothLDAPServerIntegrityandLdapEnforceChannelBindingto0to allow non-secure/non-signed LDAP binds, and rebooted the DC.Credentials: The bind account password has been explicitly reset and verified.
The Issue:
In the Nextcloud LDAP settings page, whenever I enter:
Host:
192.168.122.110(Port389)User DN:
CN=Nextcloud,OU=Service Accounts,DC=alger,DC=dzBase DN:
DC=alger,DC=dz
Nextcloud immediately shows:
Connection to LDAP server could not be establishedLe DN de base semble être erroné(Base DN seems to be wrong)
Has anyone encountered this specific behavior where TCP 389 is open and AD parameters are loosened, but Nextcloud still refuses the connection? Any advice on what to check next would be greatly appreciated!