# Connect an external NextCloud instance to YunoHost's LDAP server

**URL:** https://forum.yunohost.org/t/connect-an-external-nextcloud-instance-to-yunohosts-ldap-server/27274
**Category:** Support
**Tags:** english
**Created:** [November 21, 2023, 3:28pm UTC](https://forum.yunohost.org/t/connect-an-external-nextcloud-instance-to-yunohosts-ldap-server/27274 "2023-11-21T15:28:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![AkyRhO](https://forum.yunohost.org/user_avatar/forum.yunohost.org/akyrho/32/8931_2.png) [@AkyRhO](https://forum.yunohost.org/u/AkyRhO)
#### Post date: [November 21, 2023, 3:28pm UTC](https://forum.yunohost.org/t/connect-an-external-nextcloud-instance-to-yunohosts-ldap-server/27274/1 "2023-11-21T15:28:19Z")

</div>

### My YunoHost server

**Hardware:** VPS bought online / Old laptop or computer  
**YunoHost version:** 11.2.5  
**I have access to my server :** Through SSH | through the webadmin  
**Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?** : yes  
**If yes, please explain:**

I installed NextCloud on a computer at home and I’d like to connected it to my YunoHost LDAP instance

### Description of my issue

I have a YunoHost instance on a VPS and a home server on which I installed NextCloud from the docker image.

What I’m trying to do is to plug NextCloud to YunoHost LDAP instance.

I did install the LDAP user and admin application on NextCloud, but I’m struggling to find the correct setup for it.

I tried to narrow down the issue and here’s what I discovered :

- I am able to connect to LDAP from my YunoHost server with an `ldapsearch` command (more specifically this one :

```auto
ldapsearch -x -LLL -H ldap://localhost -D "uid=<username>,ou=users,dc=yunohost,dc=org" -w '<password>' -b "dc=yunohost,dc=org"

```

- I am **not** able to use the same command from my home server (after I changed the host to the correct IP of course)
- I opened the port `389` from the YunoHost admin, but `nmap` still tells me otherwise :

```auto
Host is up, received syn-ack (0.024s latency).

PORT STATE SERVICE REASON
389/tcp closed ldap conn-refused

```

A few more information :

- I’m using tailscale as a VPN
- I looks at the logs in `/var/log/syslog` but nothing caught my eyes
- I was able to successfully connect to LDAP via phpLDAPadmin
- I’ve read a bazillion documentation on YunoHost, LDAP, etc for the past couple of days but nothing seems to work or match my specific needs

Thanks for the help 🙂

---

<div class="post-metadata">

### Author: ![Mamie](https://forum.yunohost.org/user_avatar/forum.yunohost.org/mamie/32/1245_2.png) [@Mamie](https://forum.yunohost.org/u/Mamie)
#### Post date: [November 21, 2023, 3:57pm UTC](https://forum.yunohost.org/t/connect-an-external-nextcloud-instance-to-yunohosts-ldap-server/27274/2 "2023-11-21T15:57:35Z")

</div>

On your server, you can try this command :  
`sudo ss -tulnp | grep 389`  
It will inform you about the port 389 who can call it, and what manages it.  
On my server, I have this :

```auto
tcp LISTEN 0 1024 127.0.0.1:389 0.0.0.0:* users:(("slapd",pid=1362,fd=8))

```

So, slapd is listening on 127.0.0.1:389, so only calls from my own server are listened.

Bad thing is that I have no idea how to change it, but I am pretty sure someone had a really similar problem in the last few weeks.

I think it was this one : [Use Yunohost LDAP from server containers - #3 by tituspijean](https://forum.yunohost.org/t/use-yunohost-ldap-from-server-containers/27075/3)

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [December 21, 2023, 3:58pm UTC](https://forum.yunohost.org/t/connect-an-external-nextcloud-instance-to-yunohosts-ldap-server/27274/3 "2023-12-21T15:58:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
