Proxmox VE inside a Docker container.
- Runs a full Proxmox VE node inside Docker
- Provides the familiar Proxmox web interface
- Supports fast KVM-accelerated virtual machines
- Supports LXC containers out of the box
- Includes a pre-configured NAT bridge with DHCP
- Supports both AMD64 and ARM64 host platforms
services:
proxmox:
hostname: pve
image: dockurr/proxmox
container_name: proxmox
environment:
PASSWORD: "root"
SSH: "${SSH:-N}"
ports:
- 8006:8006
- "${SSH_PORT:-2222}:22"
volumes:
- ./data:/var/lib/vz
- ./config:/var/lib/pve-cluster
- type: bind
source: "${SSH_AUTHORIZED_KEY:-/dev/null}"
target: /run/ssh-imports/authorized_keys.in
read_only: true
bind:
create_host_path: false
- type: bind
source: "${SSH_PRIVATE_KEY_PATH:-/dev/null}"
target: /run/ssh-imports/id_ed25519.in
read_only: true
bind:
create_host_path: false
- type: bind
source: "${SSH_PUBKEY_PATH:-/dev/null}"
target: /run/ssh-imports/id_ed25519.pub.in
read_only: true
bind:
create_host_path: false
restart: always
privileged: true
stop_grace_period: 2mdocker run -it --rm --name proxmox --hostname pve --privileged -e "PASSWORD=root" -p 8006:8006 -v "${PWD:-.}/data:/var/lib/vz" -v "${PWD:-.}/config:/var/lib/pve-cluster" --stop-timeout 120 docker.io/dockurr/proxmoxTip
To enable SSH with the CLI, add -e SSH=Y -p 2222:22 and mount your public key, for example:
-v "$HOME/.ssh/id_ed25519.pub:/run/ssh-imports/authorized_keys.in:ro".
- Docker or Podman on a Linux host with KVM support.
- Docker Desktop or Podman (Desktop) on Windows 11 with nested virtualization enabled.
- At least 2 GB of available RAM.
- At least 32 GB of free disk space.
Note
Docker Desktop on Linux, macOS, and Windows 10 does not currently provide KVM access to containers and is therefore not supported.
Very simple! These are the steps:
-
Start the container and connect to port 8006 using your web browser.
-
Login using the username
rootand the password you specified in thePASSWORDenvironment variable.
Enjoy your time with your brand new Proxmox VE installation, and don't forget to star this repo!
To change the location for the local storage pool used by Proxmox to store large objects like disk images and .iso files, include the following bind mount in your compose file:
volumes:
- ./data:/var/lib/vzReplace the example path ./data with the desired storage folder or named volume.
To change the location of your Proxmox VE configuration data, include the following bind mount in your compose file:
volumes:
- ./config:/var/lib/pve-clusterReplace the example path ./config with the desired storage folder or named volume.
Minimal — authorized key only:
SSH=Y
SSH_AUTHORIZED_KEY=$HOME/.ssh/id_ed25519.pubFull — authorized key plus the Ansible key pair:
SSH=Y
SSH_AUTHORIZED_KEY=$HOME/.ssh/id_ed25519.pub
SSH_PRIVATE_KEY_PATH=$HOME/.ssh/id_ed25519
SSH_PUBKEY_PATH=$HOME/.ssh/id_ed25519.pubThen start:
docker compose up -dCompose reads .env automatically. The compose snippet above already includes the SSH mounts; if you copied an older snippet, add them from compose.yml.
SSH_PORTchanges only the published host port (default2222);sshdlistens on22inside the container.SSH_AUTHORIZED_KEYis the host path to the filesshdtrusts. It can be a single.pubkey or anauthorized_keysfile with multiple keys.SSH_PRIVATE_KEY_PATHandSSH_PUBKEY_PATHare the client key pair installed at/root/.ssh/id_ed25519and/root/.ssh/id_ed25519.pubfor Ansible inside the container. They are independent fromSSH_AUTHORIZED_KEY.- If
SSH_AUTHORIZED_KEYis not set,SSH_PUBKEY_PATHis used; if that is also missing, the public key is derived fromSSH_PRIVATE_KEY_PATH. SetSSH_PUBKEY_PATHwhen the private key is passphrase-protected. sshduses the Proxmox default/root/.ssh/authorized_keys, which links to/etc/pve/priv/authorized_keys.- Only these files are mounted, read-only, under
/run/ssh-imports(0700 root:root). They are copied to root-owned files in/root/.ssh; the mounted sources are never modified. ~/.sshis not exposed and the client'sknown_hostsstays writable.- SSH is key-only; password authentication is disabled.
SSH=N(default) keepssshddisabled. Proxmox features that use SSH, such as clustering, requireSSH=Y.- SSH host keys are generated on first start. Recreating the container changes them, so update
known_hostsor persist/etc/sshif you need stable keys.
Ansible:
pve ansible_host=127.0.0.1 ansible_port=2222 ansible_user=root ansible_ssh_private_key_file=~/.ssh/id_ed25519Inside the container, with the full configuration, use ansible_ssh_private_key_file=/root/.ssh/id_ed25519.
Yes, see our Proxmox Backup Server, Proxmox Datacenter Manager and Proxmox Mail Gateway containers.
First, make sure your platform and container runtime meet the requirements listed above.
On a Linux host, install cpu-checker and run:
sudo apt install cpu-checker
sudo kvm-okA working configuration should report:
KVM acceleration can be used
You can also verify that the KVM device exists:
ls -l /dev/kvmIf KVM is unavailable, check whether:
- Hardware virtualization (
Intel VT-xorAMD-V) is enabled in your BIOS or UEFI. - Nested virtualization is enabled when the host itself is a virtual machine.
- Your VPS or cloud provider supports nested virtualization.
If kvm-ok succeeds but the container still reports that KVM is unavailable, you can temporarily add privileged: true to your Compose file to rule out a permission or device-access issue.
Special thanks to rtedpro-cpu and LongQT-sea, this project would not exist without their invaluable work.
The product names, logos, brands, and other trademarks referred to within this project are the property of their respective trademark holders. This project is not affiliated, sponsored, or endorsed by Proxmox Server Solutions GmbH.

