Docker on Proxmox: LXC vs VM for Containers
Run Docker on Proxmox in LXC or VM. Pros, cons, performance comparison, and production recommendations.
May 28, 2026
DockerProxmoxLXCContainers
Docker on Proxmox: LXC vs VM for Containers
Last updated: May 28, 2026 | Reading time: 8 minutes
The Question
Should Docker run in LXC or VM on Proxmox?
Short answer: LXC for most cases, VM for specific needs.
Docker in LXC
Setup
# Create container with nesting enabled
pct create 122 local:vztmpl/ubuntu-24.04-standard.tar.zst \
--features nesting=1,keyctl=1 \
--memory 2048 \
--cores 2
# Install Docker
pct exec 122 -- curl -fsSL https://get.docker.com | sh
Pros
- ✅ Lower overhead (less RAM/CPU)
- ✅ Faster boot
- ✅ Simpler networking
- ✅ Easier backups
Cons
- ❌ Shared kernel (security)
- ❌ Some Docker features limited
- ❌ Storage drivers restricted (overlay2 works)
Docker in VM
Setup
# Create VM
qm create 150 --name docker-vm --memory 4096 --cores 4
# Install Ubuntu, then Docker
Pros
- ✅ Full isolation
- ✅ All Docker features work
- ✅ Different kernel possible
- ✅ Better for untrusted containers
Cons
- ❌ More overhead (5-15%)
- ❌ Slower boot
- ❌ More complex networking
Performance Comparison
| Metric | LXC | VM | |--------|-----|-----| | RAM (idle) | 100 MB | 500 MB | | Container start | 0.5s | 0.5s | | Build time | 45s | 52s | | Network throughput | 940 Mbps | 920 Mbps |
Recommendation
Use LXC when:
- Running trusted containers
- Resource efficiency matters
- Simple Docker Compose stacks
Use VM when:
- Running untrusted containers
- Need full Docker features
- Multi-tenant environment
For homelabs, LXC with nesting is the sweet spot.