LLDAP on Docker: Centralize Your HomeLab Logins Without the Bloat

HomeLab tutorial - IT technology blog
HomeLab tutorial - IT technology blog

The ‘Too Many Passwords’ Problem

Most HomeLabs start small. You install Jellyfin for your media, then Portainer to manage your containers. At that scale, creating one or two accounts is easy. But as your lab expands to include Nextcloud, Grafana, Gitea, and a few dashboards, you hit a wall. I realized I was managing 12 different sets of credentials. Every time I wanted to update my master password, I spent 30 minutes logging into separate web interfaces to change them manually.

This isn’t just a chore; it’s a security hole. If you forget to delete a test account on a service you rarely use, that’s a permanent backdoor into your network. Many people resort to using weak, identical passwords just to keep track of it all. I needed a way to manage my users in one place, but enterprise-grade solutions felt like trying to kill a fly with a sledgehammer.

Why Traditional LDAP Feels Like Overkill

Applications usually store user data in their own internal SQLite or Postgres databases. This creates data silos. To fix this, the industry uses LDAP (Lightweight Directory Access Protocol). It allows an app to ask a central server: “Does this user exist, and is this password correct?”

The trouble is that traditional LDAP implementations are a nightmare to set up. OpenLDAP is powerful but requires a deep understanding of obscure schemas. FreeIPA is another option, but it’s a resource hog that demands at least 2GB of RAM just to stay stable. For a modest HomeLab running on a NUC or a Raspberry Pi, that’s a massive waste of resources.

Comparing the Options

I tested several ways to centralize my credentials before finding a winner. Here is how they stack up:

  • OpenLDAP: The 40-year-old industry standard. It works, but the learning curve is vertical. Managing it via the command line or clunky tools like LDAP Account Manager (LAM) is frustrating.
  • Authentik / Authelia: These are full Identity Providers (IdP). They are excellent if you need SAML or OIDC, but they are heavy. Authentik often requires multiple containers and several gigabytes of memory.
  • LLDAP (Lightweight LDAP): A modern server written in Rust. It focuses on the basics: a clean UI, a tiny footprint, and easy integration. It typically idles at around 15-20MB of RAM.

The Solution: LLDAP on Docker

LLDAP hits the sweet spot for self-hosters. It gives your apps the LDAP interface they need while giving you a simple web dashboard. I’ve been running this setup for over a year to manage 15 different services. It has been rock solid, handling every login request without a single sync error or crash.

Step 1: Preparing the Environment

Docker Compose is the best way to deploy this because it keeps your config portable. Start by creating a dedicated folder for your LLDAP data.

mkdir -p ~/homelab/lldap/data
cd ~/homelab/lldap

Step 2: The Docker Compose Configuration

Create a docker-compose.yml file. While LLDAP supports Postgres, SQLite is more than enough for a HomeLab with a few dozen users. It makes your entire database a single file that is easy to move.

services:
  lldap:
    image: lldap/lldap:latest
    container_name: lldap
    ports:
      - "17170:17170" # Web UI
      - "3890:3890"   # LDAP Port
    environment:
      - LLDAP_LDAP_BASE_DN=dc=homelab,dc=local
      - LLDAP_LDAP_USER_PASS=MySuperSecretAdminPass
      - LLDAP_SERVER_KEY_SEED=use-a-long-random-string-here
      - LLDAP_DATABASE_URL=sqlite:///data/users.db
    volumes:
      - ./data:/data
    restart: unless-stopped

Pro tip: Change dc=homelab,dc=local to your own domain. Also, make sure the LLDAP_SERVER_KEY_SEED is a truly random string to keep your session tokens secure.

Step 3: Launching and Initial Setup

Bring the container online with one command:

docker compose up -d

Visit http://[Your-Server-IP]:17170 and log in with the admin username. The interface is minimal and fast. Your first task should be creating a group like “users” or “admins” and adding your personal account to it.

Step 4: Connecting Your Services

Once LLDAP is running, you can point your apps to it. Whether it’s Gitea, Nextcloud, or Jellyfin, the configuration usually looks like this:

  • LDAP Host: 192.168.1.50 (Your Docker host IP)
  • Port: 3890
  • Bind DN: uid=admin,ou=people,dc=homelab,dc=local
  • User Search Base: ou=people,dc=homelab,dc=local
  • Group Search Base: ou=groups,dc=homelab,dc=local
  • User Filter: (uid=%s)

The moment you hit “Save,” you can log into that app using your LLDAP credentials. You’ll never have to create a manual account on that service again.

Maintenance and Backups

Backups are straightforward because LLDAP is so lean. Since everything lives in the users.db file, I just include the ~/homelab/lldap/data folder in my nightly Restic backups. If my server dies, I can restore that single folder to a new machine and be back online in under 60 seconds.

For security, keep LLDAP inside your local network. While it supports LDAPS (encrypted LDAP), keeping it behind a firewall or accessing it via a VPN like Tailscale is usually enough for most home users. If you must expose it, definitely set up SSL certificates.

Final Thoughts

Switching to LLDAP was the single best quality-of-life upgrade for my server. It removed the friction of testing new software because I no longer dreaded the setup process. It’s fast, stays out of the way, and uses almost no RAM. If you’re managing more than three services, stop juggling passwords and let LLDAP do the heavy lifting.

Share: