# More than one LDAP server? (LDAP Authenticator Extension)

**URL:** <https://forum.xwiki.org/t/more-than-one-ldap-server-ldap-authenticator-extension/7763>\
**Category:** Help / Discuss\
**Tags:** ldap\
**Created:** [November 13, 2020, 8:08am UTC](https://forum.xwiki.org/t/more-than-one-ldap-server-ldap-authenticator-extension/7763 "2020-11-13T08:08:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![abonhote](https://forum.xwiki.org/user_avatar/forum.xwiki.org/abonhote/32/61_2.png) [@abonhote](https://forum.xwiki.org/u/abonhote)\
**Post date:** [November 13, 2020, 8:08am UTC](https://forum.xwiki.org/t/more-than-one-ldap-server-ldap-authenticator-extension/7763/1 "2020-11-13T08:08:47Z")

</div>

Hi all

Is it possible to add a fallback LDAP server to the config? As of now, the documentation only talks about one server to be configured in xwiki.authentication.ldap.server. A short look at the source code didn’t reveal anything like this.

We’re running the LDAP Authenticator Extension V9.4.5 here.

Thanks in advance

André

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [November 13, 2020, 2:47pm UTC](https://forum.xwiki.org/t/more-than-one-ldap-server-ldap-authenticator-extension/7763/2 "2020-11-13T14:47:19Z")

</div>

Actually the document do talk a bit about multi server support in [https://extensions.xwiki.org/xwiki/bin/view/Extension/LDAP/Authenticator/UseCases/#HApproach1:Lettheuserindicatethedomain](https://extensions.xwiki.org/xwiki/bin/view/Extension/LDAP/Authenticator/UseCases/#HApproach1:Lettheuserindicatethedomain). But it’s not based on a fallback system: the value used in the login form need to contain a “clue” regarding the LDAP server which should be used (for example “[myuser@domain.com](mailto:myuser@domain.com)”) and then you can customize the configuration based on this criteria.

You can find a detailed example in the general configuration example in [https://extensions.xwiki.org/xwiki/bin/view/Extension/LDAP/Authenticator/#HGenericLDAPconfiguration](https://extensions.xwiki.org/xwiki/bin/view/Extension/LDAP/Authenticator/#HGenericLDAPconfiguration) (the `xwiki.authentication.ldap.remoteUser*` properties).

---

<div class="post-metadata">

**Author:** ![Beat\_Burgener](https://forum.xwiki.org/user_avatar/forum.xwiki.org/beat_burgener/32/413_2.png) [@Beat\_Burgener](https://forum.xwiki.org/u/Beat_Burgener)\
**Post date:** [November 13, 2020, 6:16pm UTC](https://forum.xwiki.org/t/more-than-one-ldap-server-ldap-authenticator-extension/7763/3 "2020-11-13T18:16:54Z")

</div>

You would like to specify more than one ldap server to mitigate an outage, right? Not sure if you could specify more than one ip/server for the ldap\_server property, probably not. @tmortagne is the expert and can answer this in case this was your question.

There are many ldap implementations that do not support multiple LDAP servers to be specified (or only static). Which is only a question of time until this will no longer work 😉

ActiveDirectory implementations that use SRV records are an exception here. But again, most implementations do not work this way.  
You options in this case:

- use a dedicated DNS name like “[ldap.myorganisation.com](http://ldap.myorganisation.com)” that has a very short ttl that points to a working LDAP server and manually/automatically update DNS
- use a load balancer (Layer 4 or protocol specific) that will round robin/fail over to a working LDAP server  
HTH

---

<div class="post-metadata">

**Author:** ![Nimra](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/n/59ef9b/32.png) [@Nimra](https://forum.xwiki.org/u/Nimra)\
**Post date:** [April 13, 2026, 3:22pm UTC](https://forum.xwiki.org/t/more-than-one-ldap-server-ldap-authenticator-extension/7763/4 "2026-04-13T15:22:47Z")

</div>

In case anyone is reading this in 2026: We had success with adding multiple space-delimited hosts to our xwiki.cfg like this:

```auto
xwiki.authentication.ldap.server=host1.com host2.com

```

According to [LDAPConnection (LDAP Classes)](https://www.novell.com/documentation/developer/jldap/jldapenu/api/com/novell/ldap/LDAPConnection.html#connect(java.lang.String,%20int)) , this means “each host is contacted in turn until a connection can be established”. I confirmed this by using a bogus host1 and a working host2.

---

<div class="post-metadata">

**Author:** ![spike77453](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@spike77453](https://forum.xwiki.org/u/spike77453)\
**Post date:** [April 30, 2026, 3:21pm UTC](https://forum.xwiki.org/t/more-than-one-ldap-server-ldap-authenticator-extension/7763/5 "2026-04-30T15:21:55Z")

</div>

> [@Nimra](#):
>
> In case anyone is reading this in 2026: We had success with adding multiple space-delimited hosts to our xwiki.cfg

Just for the record, you could also make use of [LDAP service discovey](https://extensions.xwiki.org/xwiki/bin/view/Extension/LDAP/Authenticator/#:~:text=xwiki.authentication.ldap.service_discovery). If you run Microsoft’s Active Directory or RedHat’s IdM/FreeIPA this is set up out of the box.

You’ll just have to set `xwiki.authentication.ldap.service_discovery=1` and point `xwiki.authentication.ldap.server` to your domain, e.g. if your Active Directory servers offering LDAP are `ad01.example.com` and `ad02.example.com` etc., you’d configure:

```auto
xwiki.authentication.ldap.server=example.com
xwiki.authentication.ldap.service_discovery=1

```
