Skip to content
Go back

LLDAP: Lightweight LDAP for Your Homelab

By KingPin 15 min read
LLDAP: Lightweight LDAP for Your Homelab
Contents

Seven apps, seven user lists, one tired admin

Count the login pages in your home lab. Jellyfin has its own users. Gitea has its own. Nextcloud has its own. Your wiki has a fourth list, and your partner’s password lives in all of them with slightly different capitalization. A family member leaves, or gets added, and you spend an evening clicking through seven admin panels. Password resets are worse: every app wants its own email flow and half of them are not configured.

LDAP is the old, boring answer: one directory of users and groups, and every app asks it “is this password right, and is this person in the media group?” The catch is that OpenLDAP and FreeIPA have a learning cliff, and most of us do not want to read about slapd schemas to unlock a movie library. LLDAP is a small LDAP server with a web UI that does the user-and-group part and deliberately skips the rest. It is a user directory, not a full LDAP server, and knowing what it leaves out is the difference between a happy install and a weekend of confusion.

Full example: Clone the working files at github.com/KingPin/sumguy-examples/self-hosting/lldap-lightweight-ldap

Versions checked in November 2026: LLDAP v0.6.3 (released April 30, 2026, GPL-3.0, about 6,700 GitHub stars) and Authelia v4.39.28.

What LLDAP is, and what it leaves out

The project’s own README says the goal is not to provide a full LDAP server. If you want that, it points you at OpenLDAP. LLDAP describes itself as an authentication server with an opinionated, simplified LDAP interface. In practice you get:

The project’s FAQ puts the footprint at under 10 MB of RAM including the database in one place and about 15 MiB on startup in another. Both are the project’s own claims. As a one-off probe, a fresh v0.6.3 container with one admin user showed 4.8 MiB in docker stats on my test box, so the claims hold up. It is a Rust binary and idle it does very little.

Now the part you need to read before installing. The README says LLDAP is “intentionally” not a fully featured LDAP server:

OpenID Connect is also not in the box. The README says that for OAuth/OIDC and reverse-proxy login you put something like Authelia, Authentik, or Keycloak in front and let LLDAP be the source of truth for users. That is the combo this post builds.

Deploy it with Docker Compose

The image is lldap/lldap on Docker Hub, and it keeps its config and SQLite database in /data. The upstream example uses the stable tag. Pin an exact release instead so an update never surprises you: v0.6.3 exists, and so do -alpine and -debian variants plus -rootless builds of each.

docker-compose.yml
volumes:
lldap_data:
# Fixed name, so the backup command below finds it.
name: lldap_data
networks:
auth:
services:
lldap:
image: lldap/lldap:v0.6.3
restart: unless-stopped
ports:
# Web UI. Put your reverse proxy in front of this.
- "127.0.0.1:17170:17170"
# LDAP, loopback only so you can test from the host.
- "127.0.0.1:3890:3890"
volumes:
- lldap_data:/data
environment:
- UID=1000
- GID=1000
- TZ=UTC
- LLDAP_JWT_SECRET=${LLDAP_JWT_SECRET}
- LLDAP_KEY_SEED=${LLDAP_KEY_SEED}
- LLDAP_LDAP_BASE_DN=dc=example,dc=com
- LLDAP_LDAP_USER_PASS=${LLDAP_LDAP_USER_PASS}
- LLDAP_HTTP_URL=https://ldap.example.com
networks:
- auth

Generate the secrets once and keep them in an .env file next to the compose file:

Terminal window
cat > .env <<EOF
LLDAP_JWT_SECRET=$(openssl rand -base64 32)
LLDAP_KEY_SEED=$(openssl rand -base64 32)
LLDAP_LDAP_USER_PASS=$(openssl rand -base64 18)
EOF
chmod 600 .env
docker compose up -d

What each setting does, straight from the upstream compose example and config template:

Ports: 3890 is LDAP, 17170 is the web UI, and 6360 is LDAPS if you turn it on with LLDAP_LDAPS_OPTIONS__ENABLED=true plus a cert and key file. The README says the LDAP port does not need to be exposed at all, since only other containers talk to it. I bind both to loopback here for testing and for the reverse proxy. Do not publish 3890 to your LAN just because you can.

One more upstream tip: the default container starts as root to fix file permissions, then drops privileges. Once your volume permissions are right, the -rootless images let you start directly as the target user (swap the UID/GID variables for a user: field).

For the web UI, a reverse proxy block looks like this. Any proxy works.

ldap.example.com {
reverse_proxy 127.0.0.1:17170
}

First login, users, and groups

Open the web UI and log in as admin with the password from your .env. Then do four things in this order:

  1. Create your own user. Do not use admin for daily life.
  2. Create a group per access boundary, such as media, git_user, and family. Group names are what apps will filter on.
  3. Create a service account per app that needs to search the directory, such as authelia or jellyfin_bind. One bind user per app means you can revoke one without touching the others.
  4. Put each service account in the right built-in group.

LLDAP ships three built-in groups. The README and the example configs describe them like this:

GroupWhat it allows
lldap_adminFull admin rights in the web UI
lldap_password_managerReading users plus changing passwords. Cannot change passwords of lldap_admin members, to prevent privilege escalation
lldap_strict_readonlyRead-only access for apps that only need to look people up

The README’s advice is that most integrations should bind as a user in lldap_strict_readonly or lldap_password_manager, not as an admin. Giving Jellyfin a full admin account so it can check whether Bob exists is the forklift-and-couch mistake in miniature.

The directory layout you never have to design

Everything lives at predictable DNs. With the base DN dc=example,dc=com:

A note on spelling: the README’s general guide writes user DNs as cn=bob,ou=people,..., while LLDAP’s own Authelia, Gitea, and Jellyfin examples use uid=. I use the uid= form below because that is what the integration examples use.

Verify with ldapsearch before blaming the app

Before you touch an app config, prove the directory answers. Install your distro’s ldap-utils (or openldap-clients) package and run:

Terminal window
source .env
ldapsearch -x -H ldap://127.0.0.1:3890 \
-D "uid=admin,ou=people,dc=example,dc=com" \
-w "$LLDAP_LDAP_USER_PASS" \
-b "ou=people,dc=example,dc=com" \
"(objectClass=person)" uid mail memberOf

You should get one entry per user, shaped like this:

dn: uid=bob,ou=people,dc=example,dc=com
uid: bob
memberOf: cn=media,ou=groups,dc=example,dc=com
memberOf: cn=family,ou=groups,dc=example,dc=com

The -x flag asks for a simple bind, the same kind of bind your apps will do. To test a service account the way the app will, change -D and -w to the bind user’s DN and password. A failed bind means a wrong DN or password. A bind that succeeds but returns no entries points at the search base or the filter. That one check saves a lot of staring at app logs.

If the login fails and the admin password in .env looks right, check the FAQ’s list: the password in config is only used on first creation, /data must be persistent, and the process needs write access to it. If you bind-mount a host folder instead of a named volume, check its ownership first.

Wire up Authelia

Authelia is the worked example because it adds what LLDAP lacks: OIDC and forward-auth login in front of your reverse proxy. This is only the backend block. The rest of the Authelia setup is in Tinyauth vs Pocket ID vs Authelia and Vaultwarden Behind Authelia.

Authelia has an lldap implementation, which pre-fills the attribute names and filters. The LLDAP repo’s example, matched against Authelia’s current docs, looks like this:

configuration.yml
authentication_backend:
refresh_interval: '1m'
ldap:
implementation: 'lldap'
address: 'ldap://lldap:3890'
base_dn: 'DC=example,DC=com'
user: 'UID=authelia,OU=people,DC=example,DC=com'
password: 'REPLACE_ME'
password_reset:
disable: false
password_change:
disable: false

Key by key:

Authelia’s docs also note the lldap implementation has no attribute for disabled, locked, or expired accounts, so Authelia cannot filter on them. To cut someone off, remove them from the group or delete them in LLDAP.

Both containers need to share a Docker network, which is why the compose file above declares auth. Add the same network to the Authelia service and the hostname lldap resolves.

Hooking other apps

Any app with an “LDAP login” option can bind to the same directory. The LLDAP repo has example configs for dozens of services, so check example_configs before inventing your own. Two examples from there.

Gitea (and Forgejo). Under Site Administration, Authentication Sources, choose LDAP (via BindDN):

Host: lldap
Port: 3890
Bind DN: uid=gitea_bind,ou=people,dc=example,dc=com
User Search Base: ou=people,dc=example,dc=com
User Filter: (&(memberof=cn=git_user,ou=groups,dc=example,dc=com)(|(uid=%[1]s)(mail=%[1]s)))
Admin Filter: (memberof=cn=lldap_admin,ou=groups,dc=example,dc=com)
Username Attribute: uid
First Name: givenName
Surname: sn
Email Attribute: mail

The upstream example uses the admin account as the bind DN. I swapped in a dedicated service user, which matches the README’s advice. Only members of the git_user group can sign in, and lldap_admin members become Gitea admins if you keep that last filter.

Jellyfin (through its LDAP plugin) uses the same pattern:

LDAP Bind User: uid=jellyfin_bind,ou=people,dc=example,dc=com
LDAP Base DN: ou=people,dc=example,dc=com
LDAP Search Filter: (memberof=cn=media,ou=groups,dc=example,dc=com)
Search Attributes: uid, mail
Uid Attribute: uid
Username Attribute: uid

To let Jellyfin change passwords, upstream says the bind user needs lldap_password_manager, you tick Allow Password Change, and the password attribute must be userPassword.

Nextcloud, Grafana, Portainer, Vaultwarden and Proxmox all have example configs in the same folder. The shape is usually the same: a bind DN, base DN ou=people, an optional memberof filter, and uid as the username. Field names and group filters differ per app, so copy from the example instead of guessing.

Backups and database choice

Start with SQLite. For a home lab it is the right answer: one file, no second container to babysit, and a directory of a few dozen people is not a load problem.

Your backup is two things: the /data volume (it holds users.db and the lldap_config.toml that LLDAP writes on first start) and your LLDAP_KEY_SEED. The config template says the key is what protects the stored passwords, so a database copy without the seed is not a restore plan. Keep .env in the same backup as the compose file.

The simple way to get a consistent copy is to stop the container for a moment:

Terminal window
docker compose stop lldap
docker run --rm -v lldap_data:/data -v "$PWD":/backup alpine \
tar czf /backup/lldap-data-$(date +%F).tgz -C /data .
docker compose start lldap

The directory changes rarely, so a nightly stop of a couple of seconds costs you nothing.

Switch to Postgres or MariaDB only when you already run one and back it up properly. Set LLDAP_DATABASE_URL to a postgres:// or mysql:// URL. Moving later is possible: the FAQ links a database migration doc for SQLite to MySQL/MariaDB or PostgreSQL.

When to skip LLDAP

Skip it when:

If none of those apply and you have five or more apps with their own user lists, LLDAP is a good trade. It takes one container and one volume, and the ldapsearch check above tells you in seconds whether the directory answers. Move one app over first, then the rest.

Common Questions

Can LLDAP replace Active Directory?

No. LLDAP provides users, groups, and an LDAP bind for apps. Active Directory adds Kerberos, DNS, group policy, and machine domain joins, none of which LLDAP implements. The README states it is intentionally not a full LDAP server, and Windows integration is listed as work in progress.

Does LLDAP support LDAPS?

Yes. LLDAP serves LDAPS on port 6360 once you set LLDAP_LDAPS_OPTIONS__ENABLED=true and point LLDAP_LDAPS_OPTIONS__CERT_FILE and LLDAP_LDAPS_OPTIONS__KEY_FILE at a certificate and key. The README calls LDAPS between containers optional and says exposing the LDAP port to the internet is not recommended, with or without TLS.

Which databases does LLDAP support?

LLDAP supports SQLite, MySQL/MariaDB, and PostgreSQL. SQLite is the default, stored in /data/users.db, and fits a home lab directory. Set LLDAP_DATABASE_URL to a postgres:// or mysql:// URL to switch.

Can I use LLDAP with an app that only supports OIDC?

Not directly. LLDAP only speaks LDAP. Put an identity provider such as Authelia, Authentik, or Keycloak in front of it, configure that provider to use LLDAP as its user backend, and point the OIDC-only app at the provider. LLDAP then stays the single place where users and groups are edited, and the provider handles tokens, consent screens, and second factors. With that setup, one LLDAP user list serves the LDAP apps and the OIDC apps at the same time.

What happens if I lose the LLDAP key seed?

Treat the passwords as unrecoverable. LLDAP’s config template describes the seed as the source of the private key used to store passwords safely, so a restored database without the matching seed cannot be relied on. Store LLDAP_KEY_SEED in the same backup as users.db, and test a restore before you need one.


Wrote about this post on your own site? Send a webmention.

It shows up above once verified.


Next Post
Wi-Fi Roaming: 802.11r/k/v at Home

Discussion

Powered by Garrul. Sign in with GitHub or Google, or post anonymously.

Related Posts