Services

infra / running

Docker on LXC — the pattern

Five Docker-hosting LXCs across two nodes. Notes on why per-LXC isolation beats a single mega-Docker host.

What it is

The standard pattern I use for any Docker workload in the homelab: a dedicated LXC, with Docker installed inside, running one logical stack of services. I have five of these across the two Proxmox nodes — edge infrastructure, password manager, media stack, dev tools, and a sandbox for experiments.

Why I run it this way

The default question for a self-hoster is "one big Docker host or many small ones?" The answer for me is many small ones. Specifically:

The cost is a bit of duplication — five Docker installs, five Watchtower instances, five Portainer agents. That's been a fair trade.

How I use it

Each Docker LXC follows the same playbook: unprivileged container with nesting=1,keyctl=1 features, static IP (never DHCP — routers lose reservations on firmware updates), Docker installed from the official Docker apt repo (not docker.io), Container Protection enabled in Proxmox to prevent accidental destroy. Services live as docker-compose.yml files under /opt/stacks/<service>/, version-controlled where it matters.

The five current LXCs:

Every Docker LXC also runs a Portainer agent for unified container management, and its own Watchtower instance configured monitor-only (notifies me of available updates but never applies them).

Setup notes

Runbook