Self Host Wizard Docs

User directory (lldap)

User directory on a Self Host Wizard box: the lldap piece, served at directory.<apps domain>, ldap sign-in, memory limit 68 MB.

At a glance

FieldValue
Addresshttps://directory.<apps domain>
Sign-inldap: the app checks the office password against LLDAP itself
Memory limit68 MB (ram_mb: measured peak × 1.3)
Databasenone shared: it keeps its own data in THX_DATA
Needsnothing
Needed byauthelia, boards, bookstack, drive, easyappointments, espocrm, forgejo, freescout, glitchtip, home, listmonk, radicale, stalwart, uptime-kuma, vaultwarden, vikunja
Containerslldap
Image: lldaplldap/lldap:v0.6.3-alpine@sha256:2a8454b668c1aba7157e832eab0e242e1e7eb5fb7591d7e7774ba05286511ca8
Licence (from the README)GPL-3.0-only
Upstream (from the README)https://github.com/lldap/lldap

Turn it on

thx enable adds lldap and everything it needs to the box's state; thx apply then installs it. Apps are applied only once site_domain is set.

sudo thx enable lldap
sudo thx apply

Engineering notes (pieces/lldap/README.md)

LLDAP v0.6.3, GPL-3.0-only (Cargo.toml): the one list of users and groups. Image lldap/lldap:v0.6.3-alpine, pinned by index digest sha256:2a8454b6…11ca8; the index has linux/arm64 (docker buildx imagetools inspect, 2026-11-24). Upstream image, unmodified.

How it is wired

  • LDAP on lldap:3890 (thx network only), web UI + GraphQL on 127.0.0.1:17170, proxied by Caddy at directory.<apps_domain>. Users change their own password there. SQLite in THX_DATA.
  • Built-in admin: password = THX_SECRET_ADMIN_PASSWORD, reset to it on every start (LLDAP_FORCE_LDAP_USER_PASS_RESET=always), so the secret on disk is always the truth.
  • thx apply bootstraps, idempotently (each a check-then-fix step):

    • thx-readonly: the bind account every app gets as THX_LDAP_BIND_*, in lldap_strict_readonly, its password the generated bind_password (checked by logging in with it).
    • groups admins, org-<org>, team-<org>-<team> from state.
    • user attributes mailalias1 … mailalias16 (one string each, visible, not user-editable) for mail aliases, filled from 1. Not one list attribute: LLDAP 0.6.3 cannot match one value of a list by equality (lldap#1133; a list matches only while it holds exactly one value), and Stalwart looks recipients up by equality. A box from before moves its mailalias list into the slots and the list attribute is deleted.
  • thx user add creates users (random initial password printed once; LLDAP keeps passwords with OPAQUE, so it is set with lldap_set_password inside the container, the password in its environment, never argv). thx user alias add|rm edits the slots (more than 16 is refused); the first --admin user gets noreply@<apps_domain>.

Measured

RAM: measured peak 52 MiB (anon + shmem + kernel from memory.stat, sampled through the whole check.sh docker stage including a 10-client database load; 64 MiB with page cache) × 1.3 = ram_mb 68, mem_limit 68m. Measured 2026-11-25, e2e run 6.

Known gaps

  • key_seed and the data are coupled: LLDAP refuses to start ("private key has changed") when the seed no longer matches its database. Restore /etc/thx/secrets/lldap/ together with THX_DATA, never one alone.
  • Setting a password puts the admin session token briefly in the argv of docker exec lldap lldap_set_password --token … (visible in the host's and the container's process list while it runs): the tool takes it no other way. thx redacts it from its own errors and output. It is a JWT valid for 1 day (auth_service.rs), revoked by logout at the end of each thx command.
  • No password-reset mail: users who forget their password ask an admin (Authelia's reset is disabled).

Facts on this page come from these files in the selfhostwizard repository:

  • pieces/lldap/piece.toml
  • pieces/lldap/compose.yaml
  • pieces/lldap/README.md
  • internal/piece/piece.go

This page is generated from the code at build time, so it changes when the code does.