Docker Services¶
The Pattern: Docker Host LXC¶
Rather than creating a separate VM for each service, GoozLab uses a consistent pattern: privileged LXC containers with Docker installed inside.
┌───────────────────────────────────┐
│ Proxmox Node │
│ │
│ ┌─────────────────────────────┐ │
│ │ LXC Container │ │
│ │ • Debian 13 minimal │ │
│ │ • Docker + docker-compose │ │
│ │ • nesting=1, keyctl=1 │ │
│ │ │ │
│ │ ┌─────────┐ ┌─────────┐ │ │
│ │ │ Service │ │ Service │ │ │
│ │ │ (Docker│ │ (Docker│ │ │
│ │ │ cont.) │ │ cont.) │ │ │
│ │ └─────────┘ └─────────┘ │ │
│ └─────────────────────────────┘ │
└───────────────────────────────────┘
Why this pattern?¶
- Lighter than VMs: LXCs share the host kernel — ~50MB overhead vs ~512MB+ for a VM
- Docker-compose for everything: Services are defined in YAML, version-controlled, and reproducible
- Easy backups: Snapshot the entire LXC to capture both the Docker host and its data volumes
- VLAN isolation: Each LXC can be placed on a different VLAN via its network tag
How to create a Docker Host LXC¶
# Create the LXC
pct create <ID> <template> \
--hostname <service-name> \
--cores 2 --memory 2048 \
--rootfs local-zfs:16 \
--net0 name=eth0,bridge=vmbr0,tag=<VLAN> \
--features nesting=1,keyctl=1 \
--unprivileged 0
# Start and enter
pct start <ID>
pct enter <ID>
# Install Docker from Docker's official apt repository
# (https://docs.docker.com/engine/install/debian/) — this includes the compose plugin.
# Turn on automatic security updates
apt install -y unattended-upgrades
Standard docker-compose structure¶
Each service directory follows the same layout:
/opt/<service-name>/
├── docker-compose.yml
├── .env # Environment variables (not committed to git)
├── .env.example # Template showing required variables
└── data/ # Persistent data (bind-mounted volumes)
Deploying a Service¶
cd /opt/<service-name>
cp .env.example .env
# Edit .env with your values
nano .env
# Start
docker compose up -d
# Check logs
docker compose logs -f
Updating Services¶
Container updates are handled by Tugtainer across every Docker host. By hand, it's still:
Containers that share a network namespace (for example, apps that route through a VPN container with network_mode: service:<vpn>) must be recreated together. Never update or restart the VPN container on its own — recreate it and every container attached to it in one docker compose up -d --force-recreate .... Pin the VPN container's image so it can't update underneath the others.
Current Services¶
| Docker host | Node | Services | Docs |
|---|---|---|---|
| docker-mon | — | Prometheus, Grafana, Loki, ntfy, Uptime Kuma, Homepage, Tugtainer | Monitoring |
| frigate | pve3 | Frigate NVR | Frigate |
| docker-apps | pve2 | Vaultwarden, Syncthing, n8n | Catalog |
| docker-flix | pve1 | Jellyfin, Seerr | Catalog |
| docker-media | pve2 | General-purpose Docker host | — |
| immich | pve1 | Immich (library on NAS over NFS) | Catalog |
| ai | pve3 | Ollama + Open WebUI | Catalog |
| VM | Node | Why a VM |
|---|---|---|
| Home Assistant OS | pve2 | HAOS needs its own kernel and manages its own add-ons |
| Wazuh | pve2 | Indexer + manager + dashboard want a full OS |
| UniFi OS Server | pve1 | Shipped as a VM install by the community script |