Problem: Nextcloud Does Not connect To LDAP Server Any More

Problem

After an update Nextcloud does not connect to the LDAP server any more.

Environment

Using Nextcloud in an Docker container.
When troubleshooting through univention-app logs nextcloud you get an output similar to the following:

:"--","message":{"Exception":"OC\\ServerNotAvailableException","Message":"Lost connection to LDAP server.","Code":0,"Trace":[{"file":"/var/www/html/apps/user_ldap/lib/LDAP.php","line":420,"function":"processLDAPError","class":"OCA\\User_LDAP\\LDAP","type":"->"},{"file":"/var/www/html/apps/user_ldap

Solution

For some reason during the update some Nextcloud settings get lost. Reconfigure them by:

univention-app shell -u www.data nextcloud
cd /var/www/html
./occ ldap:set-config s01 ldapHost <YOUR INTERNAL NEXTCLOUD HOST>
./occ ldap:set-config s01 ldapTLS 1
./occ ldap:set-config s01  ldapPort 7389
exit
univention-app restart nextcloud