Nextcloud with docker and ldap?

I just installed nextcloud with docker. I was able to login do some trivial configuration like smtp server. Then I wanted to configure ldap configuration as I do have some users and groups there. My ldap is actually a samba active directory, requires ldaps on port 636, and uses a letsencrypt certificate. I copied user, password, and base dn from another working app.
Nextcloud complains “Lost connection to LDAP server.”.
How can I check what it is complaining about?
I also tried detect port or detect base dn - none of these worked.