Three places to run Docker on Proxmox, and what happens with each:
| Where | What happens |
|---|---|
| On the host | Docker bends the host’s iptables to its needs: the FORWARD policy becomes DROP, and guest bridges stop passing traffic. Proxmox FAQ: installing Docker on the host isn’t recommended |
| In an LXC container | works with nesting=1, sometimes also keyctl=1. Breaks with updates: in November 2025, containerd 1.7.29, after the fix for CVE-2025-52881, stopped starting containers inside an unprivileged LXC (VM or LXC) |
| In a VM | its own kernel, its own iptables, its own cgroups. Docker behaves like on a VPS, and every Docker guide works without caveats |
Why it’s fragile in a container: Docker inside LXC is a container in a container. It expects rights from the
kernel that LXC deliberately cuts: mounting overlayfs, writing to /proc/sys, creating its own cgroups. Each
such hole is opened by an option, and every update to the kernel, LXC, AppArmor or runc can close it. It usually
doesn’t break right away, but after the next apt upgrade in the guest.
A VM costs the memory of the guest OS: idle Ubuntu 24.04 takes 300–500 MB. In return:
ufw,nftablesand Docker ports work like on any server (Docker ports bypass the input chain);- the VM can move to another node without stopping;
- Docker and its networks don’t touch the host: a broken
daemon.jsonwon’t bring Proxmox down.
How to build it: an Ubuntu template with cloud-init (VM template with cloud-init), then Docker from Docker’s repository (Docker on Ubuntu). For a dozen compose stacks, 2 cores and 4 GB of memory are enough.
If it doesn’t work
Docker went onto the host — VMs and containers lost their network
- Cause
- Docker enables
br_netfilterand setsiptables -P FORWARD DROP. Guest traffic through the bridge now passes theFORWARDchain and gets dropped. - Fix
- Remove Docker from the host (
apt purge docker-ce docker.io containerd.io), restoreiptables -P FORWARD ACCEPTand reboot the host. Docker goes into a VM.
How to check
There’s no Docker on the host, and the FORWARD policy is untouched:
command -v docker || echo "no docker on the host"
iptables -S FORWARD | head -1 # -P FORWARD ACCEPT
In the VM: docker run --rm hello-world prints Hello from Docker!.