# Using Multiple LDAP Servers

### Auto Docker or Docker Compose

When using the docker version of KCM, you can list the multiple LDAP servers in your `docker-compose.yml` file using the environment variable `LDAP_SERVERS` in the environment section of the guacamole service, as shown below:

<pre><code>version: "3"
services:
    guacamole:
        image: keeper/guacamole:2
        restart: unless-stopped
        depends_on:
            - guacd
            - db
        environment:
            ACCEPT_EULA: "Y"
            GUACD_HOSTNAME: "guacd"
            LDAP_SERVERS: |
<strong>              - hostname: server1.example.net
</strong>                user-base-dn: OU=Users,DC=example,DC=net
                username-attribute: sAMAccountName
                search-bind-dn: CN=Guacamole,OU=Services,DC=example,DC=net
                search-bind-password: SomePassword!

              - hostname: server2.example.net
                user-base-dn: OU=Users,DC=example,DC=net
                username-attribute: sAMAccountName
                search-bind-dn: CN=Guacamole,OU=Services,DC=example,DC=net
                search-bind-password: SomePassword! 
                
</code></pre>

{% hint style="info" %}
Using `LDAP_SERVERS` will automatically create `/etc/guacamole/ldap-servers.yml` within the guacamole container.
{% endhint %}

{% hint style="warning" %}
When using `LDAP_SERVERS` in your docker-compose.yml, don't volume mount the ldap-servers.yml file (since this will be handled automatically). For advanced or non-docker installations, [follow this guide](https://newdocs.keeper.io/kcm-linux-rpm-method/authentication/authenticating-users-with-ldap/storing-connection-data-within-ldap).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/keeper-connection-manager/authentication/authenticating-users-with-ldap/using-multiple-ldap-servers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
