Docker with LDAP and NAS

If you need to connect from the Docker image to an LDAP and both are installed at the NAS it does not work to use the local IP from the NAS inside the Docker image.
Instead, you need the HOST IP from the docker network you use.

For example, BookStack Docker:

In the .env file for BookStack we need to add the NAS IP for the LDAP integration.
If we set it to it won’t work.

Instead, we check the HOST IP from the network tab in the Docker:


In this example the “Gateway” is
So we can use this IP instead of the to connect to the NAS within Docker.