Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to run 2 LDAP instances on the same ubuntu server which have the same structure (both writing to ou=People,dc=example,dc=org for instance) but have data which should remain separate. The 2 LDAP instances don't need different permissions so I can use the same root DN, and I don't need to have 2 separate ports for tracking/fire-walling purposes.

Is it worth running 2 LDAP instances or can I just run 1 LDAP instance with 2 separate databases?

Do you happen to know publicly available documentation relevant to the topic?

share|improve this question
up vote 1 down vote accepted

You cannot have two databases in a single LDAP instance configured for the same base DN (ou=People,dc=example,dc=org). The only way to accomplish this is to run two separate LDAP instances on your system -- which will of course require running them either (a) on two separate portst or (b) bound to two distinct ip addresses. Your use case is a little odd, and if you were able to provide us some of the underlying requirements we might be able to provide you with a better answer.

You can share most of your configuration between the two instances, although you will obviously need different database directories for each instance. You can probably make your life easier by putting common configuration options in one file and using the include directive to source that into the per-instance configurations.

share|improve this answer
We are running different dev environments. To reduce hosting cost we have servers which host several environments, hence 2 LDAP instances on the same server with the same base DN. The include idea is good and should facilitate the maintenance. – Max Jul 11 '11 at 14:15

I'm quite sure it's not possible to have two different databases with the same base DN.

So your only bet is to use two instances.

As far as documentation, I recommend "LDAP for Rocket Scientists"

share|improve this answer

Depending on how you would distinguish the 2 instances, you could also use to present only one server to the world.

share|improve this answer

You can configure two instance with same base dn on same system. Both will run on different port no. Try using 389 directory server & install two instances in same machine.

Another possible solution I can think of is to have two databases with different name dc=example,dc=com & dc=example1,dc=com in OpenLDAP 2.4 & use slapo-rwm to show entries of dc=example1,dc=com as dc=example,dc=com, For clients it will be transparent. same basedn, Same IP & same port.

Hope that helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.