# Can't connect with ldaps

**URL:** <https://help.nextcloud.com/t/cant-connect-with-ldaps/136944>\
**Category:** 📄 Office\
**Tags:** tls, collabora-online, ldap\
**Created:** [April 4, 2022, 1:30pm UTC](https://help.nextcloud.com/t/cant-connect-with-ldaps/136944 "2022-04-04T13:30:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fropa](https://help.nextcloud.com/letter_avatar/fropa/32/6_449c533f586939b6e5f246632a46421f.png) [@fropa](https://help.nextcloud.com/u/fropa)\
**Post date:** [April 4, 2022, 1:30pm UTC](https://help.nextcloud.com/t/cant-connect-with-ldaps/136944/1 "2022-04-04T13:30:37Z")

</div>

Hi, I set up nextcloud with ldap and it’s working well. Now I want to use ldaps ( port 636 ) instead of 389, I imported the certificate from ldap server, put it into the /etc/openldap/certs/ca.pem and put the line into the ldap.conf TLS\_CACERT /etc/openldap/certs/ca.pem. Then I went into the web portal and change ldap to ldaps and port but the green button (configuration ok) changed into red (incorrect)

here’s my log from web :

> Error: ldap\_bind(): Unable to bind to server: Can’t contact LDAP server at /var/www/html/nextcloud/apps/user\_ldap/lib/LDAP.php#338
> 
> 1. \<\>OC\Log\ErrorHandler::onError()
> 2. \<\>ldap\_bind(“\*\*\* sensiti … \*”)
> 3. /var/www/html/nextcloud/apps/user\_ldap/lib/LDAP.php - line 338:call\_user\_func\_array()
> 4. /var/www/html/nextcloud/apps/user\_ldap/lib/LDAP.php - line 60:OCA\User\_LDAP\LDAP-\>invokeLDAPMethod(“\*\*\* sensiti … \*”)
> 5. /var/www/html/nextcloud/apps/user\_ldap/lib/Wizard.php - line 1093:OCA\User\_LDAP\LDAP-\>bind(“\*\*\* sensiti … \*”)
> 6. /var/www/html/nextcloud/apps/user\_ldap/lib/Wizard.php - line 696:OCA\User\_LDAP\Wizard-\>connectAndBind()
> 7. /var/www/html/nextcloud/apps/user\_ldap/ajax/wizard.php - line 96:OCA\User\_LDAP\Wizard-\>guessPortAndTLS()
> 8. /var/www/html/nextcloud/lib/private/Route/Route.php - line 155:require\_once(“/var/www/ht … p”)
> 9. \<\>OC\Route\Route-\>OC\Route{closure}(“\*\*\* sensiti … \*”)
> 10. /var/www/html/nextcloud/lib/private/Route/Router.php - line 310:call\_user\_func()
> 11. /var/www/html/nextcloud/lib/base.php - line 1006:OC\Route\Router-\>match()
> 12. /var/www/html/nextcloud/index.php - line 36:OC::handleRequest()

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 13, 2024, 2:05pm UTC](https://help.nextcloud.com/t/cant-connect-with-ldaps/136944/2 "2024-12-13T14:05:05Z")

</div>


