- Technology stack
- Architecture of the Solution
- Installing and Configuring MULTIDIRECTORY
- Configuring Kerberos in the MULTIDIRECTORY Web Interface
- Configuring DNS in the MULTIDIRECTORY Web Interface
- DHCP Configuration
- Domain Trust Configuration
- Group Policy
- Connecting MULTIFACTOR Self-Service Portal to MULTIDIRECTORY
- User, Group, and Resource Management
- Connecting to MULTIFACTOR
- Access Policies
- LDAP Schema
- LDAP Logging Configuration
- Password Policies
- Role and Permission Configuration
- LDAP Authentication in Ansible AWX
- LDAP Authentication in ArgoCD
- LDAP Authentication in GitLab
- LDAP Authentication in GitFlic
- LDAP Authentication in Jenkins
- LDAP Authentication in Harbor
- LDAP Authentication in Nexus
- LDAP Authentication in PostgreSQL
- LDAP Authentication in Rancher
- LDAP Authentication in Proxmox VE
- LDAP Authentication in SpaceVM
- LDAP Authentication in Tantor
- LDAP Authentication in Shturval
- LDAP Authentication in zVirt
- LDAP Authentication in GLPI
Installing and Configuring MULTIDIRECTORY
Overview
This article describes how to install and configure MULTIDIRECTORY. For a detailed understanding of the architecture, please refer to the corresponding article.
MULTIDIRECTORY Installation Requirements
- The component is installed on a Linux server and has been tested on Ubuntu, Debian, Astra Linux, ALT Linux, and RED OS.
- Minimum server requirements for 1,000 users: 4 CPU cores (with AVX instruction support), 6 GB RAM, 40 GB HDD.
- A domain must be registered and mapped to the server IP address.
- If a local domain is used, SSL/TLS certificates are required. The certificate subject must match the domain name used to access the web interface.
- A static IP address is required. Example: webadmin.domain.ru → 255.255.255.255.
- When using a local domain record, you must add a DNS entry pointing to the server IP where MULTIDIRECTORY is installed. Example: webadmin.domain.internal → 10.0.0.20.
- To run MULTIDIRECTORY on Linux, Docker and Docker Compose must be installed.
- To run MULTIDIRECTORY on Windows, Docker Desktop must be installed.
- MULTIDIRECTORY uses port 53 for the DNS server container; ensure this port is free before starting.
- When using a local domain, a certificate must be generated or manually provided.
Connecting an External DBMS
If you need to connect an external DBMS instead of the built-in one, follow this guide:
Connecting an External DBMS
Important
All services run through Traefik and use PostgreSQL as the database. Other DBMS are not compatible.During the initial installation setup.sh / setup.ps1, the system configures the .env file.
Set the following parameters to connect to an external DBMS:POSTGRES_USER=user_login # Specify the credentials POSTGRES_DB=base_name # Specify the database name POSTGRES_HOST=1.2.3.4 # Specify the ip address POSTGRES_PASSWORD=password # Specify the account passwordOn the server where the external DBMS is installed, configure the following files:
- postgresql.conf — modify the listen_addresses parameter
- pg_hba.conf — add entries to allow connections to the database
After completing these steps, restart the PostgreSQL service.
Variables .env File
Description of .env File Variables
| Variable | Description |
| DEFAULT_NAMESERVER | IP address of the host server (DNS), used as the primary nameserver. |
| POSTGRES_USER | PostgreSQL username. |
| POSTGRES_DB | PostgreSQL database name. |
| POSTGRES_HOST | PostgreSQL database host (container name or external server). |
| POSTGRES_PASSWORD | PostgreSQL user password (can be generated automatically). |
| DOMAIN | MULTIDIRECTORY web interface domain. |
| SECRET_KEY | Secret key. |
| SALT_API_USER | User for accessing the Salt API. |
| SALT_API_USER_PASS | Salt API user password (can be generated automatically). |
| SALT_API_ENABLED | Salt API enable flag. |
| SALT_API_URL | Salt API service URL. |
| PDNS_API_KEY | PowerDNS API key. |
| PDNS_DIST_KEY | dnsdist API key. |
| HOST_MACHINE_NAME | Current machine (host) name, detected automatically. |
Installing MULTIDIRECTORY
Installing MULTIDIRECTORY Enterprise Edition
Download the archive containing the provided images.
Extract the archive using the following command:
tar -xvf Enterprise_complete.tar
Navigate to the configuration files directory:
cd ./MD-RELEASE
Load the images using the following command:
docker load -i all_images-*.tar
Generate the .env file by running setup.bat, setup.sh, or setup.ps1, depending on your operating system:
Linux:
./setup.sh
Windows:
./setup.bat
./setup.ps1
Start the services using the following command:
docker compose up -d
Configuring the MULTIDIRECTORY Web Interface
After successfully configuring and starting the Docker services, open your browser. In the address bar, enter the domain that was specified during the .env-file generation.
You will be redirected to the MULTIDIRECTORY web interface setup page.
Verify that the domain name is entered correctly, then select the required settings:
- Enter your domain name.
- Configure DNS, if enabled, DNS will be configured immediately (this can also be done later in the administrator web interface).
- Configure Kerberos, if enabled, Kerberos will be configured immediately (this can also be configured later from the MULTIDIRECTORY admin interface).
- Generate Kerberos passwords, if enabled, passwords for Kerberos will be generated automatically. After completing the web interface setup, the generated passwords will be exported to a file.
Click «Next».

Kerberos Configuration
If automatic password generation for Kerberos was NOT selected
If you have unchecked the option «Generate Kerberos passwords automatically», a window will appear where you must enter passwords for krbadmin and stash.
- krbadmin is a service account of the Kerberos server. It is used for interaction with the LDAP server. This account has restricted permissions and can only manage its designated area within the LDAP tree.
- The stash password is used to protect the master encryption key of the Kerberos database. You can export the passwords you entered into a file.
Password requirements:
- Passwords must be longer than 7 characters
- krbadmin and stash passwords must not be identical
- Passwords must include uppercase and lowercase letters (A–Z, a–z) and numbers (0–9)
After entering the passwords, click «Next».

Enter the administrator credentials that will be used for the initial login.
Password requirements:
- Passwords must be longer than 7 characters
- Passwords must include uppercase and lowercase letters (A–Z, a–z) and numbers (0–9)
To continue, click «Next».

In the window that appears, verify the details of the created administrator account:
- UPN
- Display name
Click «Next».

License Upload
Upload the provided license file.
Click «Next».

DNS Configuration
If «Configure DNS» was selected, the setup wizard will open:
Click «Next».

Field Description
- Default TTL — the caching duration of a record by servers and clients before it expires. The value is measured in seconds.
If «Bind to external DNS server» was selected:
- IP — the address of your external DNS server that will be used.
- TSIG Key — the contents of the file generated on the external DNS server.

After filling in all fields, click «Next».
The administrator account setup is complete. You will be automatically logged into the MULTIDIRECTORY web interface.
Installing MULTIDIRECTORY Community Edition
Linux
Create a directory for MULTIDIRECTORY:
mkdir MultiDirectory; cd MultiDirectory;
Download the required files:
wget -O setup.sh https://raw.githubusercontent.com/MultiDirectoryLab/MultiDirectory/main/.package/setup.sh wget -O docker-compose.yml https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.7.0/docker-compose.yml wget -O traefik.yml https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.7.0/traefik.yml wget -O kea-ctrl-agent.conf https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.7.0/kea-ctrl-agent.conf
Run the installation:
bash setup.sh
After completing the setup, a .env file will be created.
Windows (PowerShell)
Create a directory:
mkdir MultiDirectory; cd MultiDirectory;
Download the required files:
curl -O https://raw.githubusercontent.com/MultiDirectoryLab/MultiDirectory/main/.package/setup.ps1 curl -O https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.7.0/docker-compose.yml curl -O https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.7.0/traefik.yml curl -O https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.7.0/kea-ctrl-agent.conf
Start the services using the following command:
docker compose pull; docker compose up -d
Configuring the MULTIDIRECTORY Web Interface
After successfully configuring and starting the Docker services, open your browser. In the address bar, enter the domain that was specified during the .env-file generation.
You will be redirected to the MULTIDIRECTORY web interface setup page.
Verify that the domain name is entered correctly, then select the required settings:
- Enter your domain name.
- Configure DNS, if enabled, DNS will be configured immediately (this can also be done later in the administrator web interface).
- Configure Kerberos, if enabled, Kerberos will be configured immediately (this can also be configured later from the
MULTIDIRECTORYadmin interface). - Generate Kerberos passwords, if enabled, passwords for Kerberos will be generated automatically. After completing the web interface setup, the generated passwords will be exported to a file.
Click «Next».

Kerberos Configuration
If automatic password generation for Kerberos was NOT selected
If you have unchecked the option «Generate Kerberos passwords automatically», a window will appear where you must enter passwords for krbadmin and stash.
- krbadmin is a service account of the Kerberos server. It is used for interaction with the LDAP server. This account has restricted permissions and can only manage its designated area within the LDAP tree.
- The stash password is used to protect the master encryption key of the Kerberos database. You can export the passwords you entered into a file.
Password requirements:
- Passwords must be longer than 7 characters
- krbadmin and stash passwords must not be identical
- Passwords must include uppercase and lowercase letters (A–Z, a–z) and numbers (0–9) After entering the passwords, click «Next».

Enter the administrator credentials that will be used for the initial login.
Password requirements:
- Passwords must be longer than 7 characters
- Passwords must include uppercase and lowercase letters (A–Z, a–z) and numbers (0–9)
To continue, click «Next».

In the window that appears, verify the details of the created administrator account:
- UPN
- Display name
Click «Next».

DNS Configuration
If «Configure DNS» was selected, the setup wizard will open:
Click «Next».

Field Description
Default TTL — the caching duration of a record by servers and clients before it expires. The value is measured in seconds.
If «Bind to external DNS server» was selected:
- IP — the address of your external DNS server that will be used.
- TSIG Key — the contents of the file generated on the external DNS server.

After filling in all fields, click «Next».
The administrator account setup is complete. You will be automatically logged into the MULTIDIRECTORY web interface.
Updating MULTIDIRECTORY
To upgrade to version 2.8.0, you must update and run setup.sh before starting the containers with docker compose up -d.
To update your MULTIDIRECTORY, follow these steps:
Updating MULTIDIRECTORY Enterprise
Run the command:
docker compose down
Go up one directory level:
cd ..
Download the archive with the updated images provided to you.
Extract the archive:
tar -xvf Enterprise_complete.tar
Navigate back to the MD-RELEASE directory:
cd MD-RELEASE
Load the images:
docker load -i all_images-*.tar
Important
Update the .env file by running setup.bat or setup.sh (depending on your system) before starting the containers.
Run the command:
docker compose up -d
Updating MULTIDIRECTORY Community
Linux
Important
To update or install a new version of MULTIDIRECTORY, download the required files and run setup.sh / setup.ps1 before starting the containers with docker compose up -d.
wget -O setup.sh https://raw.githubusercontent.com/MultiDirectoryLab/MultiDirectory/main/.package/setup.sh wget -O docker-compose.yml https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.8.0/docker-compose.yml wget -O traefik.yml https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.8.0/traefik.yml wget -O kea-ctrl-agent.conf https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.8.0/kea-ctrl-agent.conf wget -O dnsdist.conf https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.8.0/dnsdist.conf wget -O pdns.conf https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.8.0/pdns.conf wget -O recursor.conf https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.8.0/recursor.conf
Windows
wget -O setup.ps1 https://raw.githubusercontent.com/MultiDirectoryLab/MultiDirectory/main/.package/setup.ps1 wget -O docker-compose.yml https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.8.0/docker-compose.yml wget -O traefik.yml https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.8.0/traefik.yml wget -O kea-ctrl-agent.conf https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.8.0/kea-ctrl-agent.conf wget -O dnsdist.conf https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.8.0/dnsdist.conf wget -O pdns.conf https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.8.0/pdns.conf wget -O recursor.conf https://github.com/MultiDirectoryLab/MultiDirectory/releases/download/v2.8.0/recursor.conf
Checking Service and Container Logging
Extended Logging
If you want logs to be output in an extended format, set the logging mode in the .env file:
DEBUG=1
After enabling extended logging, restart the services:
docker compose down; docker compose up -d
Checking Container Logs
You can view container logs by referring to a container by its name or ID. To list container names and IDs, use:
docker ps
To view logs by container name in real time:
docker logs -f CONTAINER NAME # replace CONTAINER_NAME with the actual container name
To view logs by container ID in real time:
docker logs -f CONTAINER ID #replace CONTAINER_ID with the actual container ID
Viewing MULTIDIRECTORY Log Files
MULTIDIRECTORY log files are located in the /MultiDirectory/logs directory. Four types of logs are recorded:
- admin_dd-mm-yyyy.log — logs actions in the admin web interface
- kadmin_dd-mm-yyyy.log — logs Kerberos activity (if configured)
- ldap_dd-mm-yyyy.log — logs LDAP and LDAPS activity
- mfa_dd-mm-yyyy.log — logs two-factor authentication (if configured)
To view a log file in real time:
tail -f admin_dd-mm-yyyy.log # the admin file is used as an example
Checking MULTIDIRECTORY Version
Via Web Interface
To check the version in the web interface, click the gear icon and select «MULTIDIRECTORY Settings».

In the window that opens, select «About».

On the Server
To check the MULTIDIRECTORY version in a Docker container, run:
docker image inspect ghcr.io/multidirectorylab/multidirectory | grep VERSION
Via API
To check the version via API, open:
Note
Replace “your-domain.ru” with your actual domain name.

Questions and Answers
Q: How do I update Kerberos certificates?
A:
- Delete the old certificates krbcert.pem and krbkey.pem in the ../MultiDirectory/certs/ folder.
- Restart MULTIDIRECTORY:
docker compose down; docker compose up -d
Q: The traefik_certs_dumper container returns an error:
ERROR | extra.dump_acme_certs:dump_acme_cert.39 - Error loading TLS certificate, exiting...
A: This indicates incorrect certificate names or missing certificates. Check the ./certs folder.
Certificate files must be strictly named:
- cert.pem
- privkey.pem
Steps for generating or adding certificates are described below.
Q: Containers multidirectory-ldap-server-* fail to start (status “Error”). Logs show:
File "/app/ldap_protocol/server.py", line 176, in _read_acme_cert
raise acme_exc from err
SystemError: Let's Encrypt certificate not found. The `acme.json` file might not have been generated or lacks certificate details.
This can also occur if the certificate failed to generate for localhost, as Let's Encrypt only issues certificates for public domains.
Try deleting and recreating the `acme.json` file, or consider using a self-signed certificate for local environments or closed networks.
A: The issue is related to certificate generation. Perform the following steps:
- Navigate to the ../MultiDirectory/ directory.
Run the command to generate a certificate (replace your-domain.ru with your domain name):
openssl req -nodes -new -x509 -keyout ./certs/privkey.pem -out ./certs/cert.pem -subj '/C=RU/ST=Moscow/L=Moscow/O=Global Security/OU=Multifactor/CN=your-domain.ru'
Q: I want MULTIDIRECTORY to use my own certificate. What should I do?
A: To use self-signed certificates:
- In the traefik.yml file, comment out:
# certificatesResolvers: # md-resolver: # acme: # tlschallenge: true # email: support.md@multifactor.com # storage: /letsencrypt/acme.json
P.S.: Certificate file names must be:
- privkey.pem
- cert.pem
Q: Container exits with error “137”
A: Possible solutions:
- Add a Swap file to the MULTIDIRECTORY directory (example)
- Increase RAM
- Free up memory from other processes
Q: I want to add a certificate for ldaputil (Let’s Encrypt only)
A: 1. Download the certificate and update the trust store:
wget -O /usr/local/share/ca-certificates/isrgrootx1.crt https://letsencrypt.org/certs/isrgrootx1.pem update-ca-certificates
2. Add the following line to ldap.conf:
TLS_CACERT /etc/ssl/certs/isrgrootx1.pem
Q: Web interface redirects me back to the login page (on virtualization like QEMU, Proxmox, etc.)
A: Check logs of the dragonfly container.
If you see:
An attept to execute an instruction failed. The root cause might be an old hardware. Exiting...
Set CPU virtualization mode CPU: host / host passthrough.
Q: After installation, I cannot log in, although installation completed successfully
A: Check dragonfly container logs.
If the same error appears:
An attempt to execute an instruction failed.The root cause might be an old hardware. Exiting...
Verify CPU support for AVX instructions:
grep flags /proc/cpuinfo | head -1 | tr ' ' '\n' | grep -i avx
If the command returns no output, your processor does not meet the minimum technical requirements for the correct operation of the dragonfly container.
Q: Installation fails due to port 53 being unavailable
Example error:
Error response from daemon: failed to set up container networking: driver failed programming external connectivity on endpoint traefik: failed to bind host port 0.0.0.0:53/tcp: address already in use
A: Port 53 is already in use by the system.
Run the following command (you can replace DNS servers if needed):
sudo bash -c 'F=/etc/systemd/resolved.conf; DNS="1.0.0.1 8.8.4.4"; cp -a "$F"{,.bak.$(date +%Y%m%d-%H%M%S)} 2>/dev/null || true; grep -q "^\[Resolve\]" "$F" || printf "\n[Resolve]\n" >>"$F"; sed -i -E "/^[[:space:]]*#?[[:space:]]*DNSStubListener[[:space:]]*=.*/d; /^[[:space:]]*#?[[:space:]]*DNS[[:space:]]*=.*/d" "$F"; awk -v dns="$DNS" '\''{print} /^\[Resolve\]$/ {print "DNS="dns; print "DNSStubListener=no"}'\'' "$F" > "$F.tmp" && mv "$F.tmp" "$F"; ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf; systemctl restart systemd-resolved; echo OK'