Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Docker on Proxmox: A New Way to Use Your Server

· 7 min read · Home Tech

In this article
  1. Why Proxmox Users Turn to Docker
  2. How Docker Works on Proxmox
  3. What Docker Adds to a Proxmox Server
  4. Choosing Between VMs, LXC, and Docker
  5. Common Problems and How to Avoid Them
  6. Docker vs. LXC Containers on Proxmox
  7. Is Docker on Proxmox Safe?
  8. Frequently Asked Questions

Yes, Docker can make a Proxmox server useful in a whole new way by letting you run lightweight, isolated applications in seconds, without the overhead of a full virtual machine for each service. Instead of dedicating a VM to every app, you run one Linux VM (or LXC container) with Docker, and then deploy dozens of services as containers, each with its own dependencies and configuration, all managed from a single command line.

Why Proxmox Users Turn to Docker

Proxmox VE is a hypervisor built on Debian Linux and KVM, designed primarily for virtual machines and LXC containers. It excels at managing VMs, snapshots, backups, and clustering. But for many homelab and small-business users, the traditional VM-centric workflow feels heavy for running simple services like a media server, a password manager, or a home automation hub. Each VM needs an OS, updates, and dedicated RAM and CPU, which adds up quickly.

Docker fills that gap by providing OS-level virtualization. Containers share the host kernel but isolate the application and its libraries. This means you can run a service in seconds with a single docker run command, and it uses only the resources it actually needs. For a Proxmox server, this translates into being able to run far more services on the same hardware than you could with VMs alone.

How Docker Works on Proxmox

Docker is not a native Proxmox feature. You install it inside a VM or an LXC container that runs a Linux distribution. The most common approach is to create a Debian or Ubuntu VM, install Docker Engine, and then manage containers from that VM's command line or through a web UI like Portainer.

There are two main ways to set it up:

  • VM with Docker: Create a standard VM (e.g., 2 CPU cores, 4GB RAM, 32GB disk) and install Docker inside it. This gives you full isolation and easy snapshots, but uses more resources than a container.
  • LXC container with Docker: Create a privileged LXC container (or unprivileged with proper nesting enabled), then install Docker inside. This is lighter than a VM, but requires enabling nesting and sometimes keyctl in the container options. Unprivileged containers can have issues with Docker's overlay filesystem, so many users start with a privileged container for simplicity.

Once Docker is installed, you can pull images from Docker Hub or a private registry and run them. For example, to run a simple Nginx web server:

docker run -d -p 8080:80 nginx

This downloads the Nginx image, starts a container, and maps port 8080 on the host to port 80 inside the container. You can then access it at http://your-server-ip:8080.

What Docker Adds to a Proxmox Server

The real value of Docker on Proxmox is the ability to deploy and manage applications with a level of speed and convenience that VMs cannot match. Here are concrete examples:

  • Media stack: Run Plex, Sonarr, Radarr, and Transmission as separate containers, each with its own config, all on one VM. Updating one app doesn't affect the others.
  • Home automation: Home Assistant, Mosquitto (MQTT broker), and Node-RED can run as containers, making it easy to experiment with different versions.
  • Development environments: Spin up a database container for a test project, then delete it when done, without touching your main system.
  • Web services: Host multiple websites on one VM using Traefik or Nginx Proxy Manager as a reverse proxy container, routing traffic to different containers based on domain names.

Docker also simplifies backups and migrations. You can use docker-compose to define an entire stack in a YAML file, then recreate it on another machine with one command. This is far easier than cloning a whole VM.

Choosing Between VMs, LXC, and Docker

Proxmox offers three main ways to run services, and each has its place. VMs provide the strongest isolation and support any OS, but use more resources. LXC containers are lighter and start faster, but share the host kernel. Docker containers are the lightest and most portable, but they rely on the host OS's kernel and are not as isolated as VMs.

For a typical homelab, a good pattern is to run a single Linux VM with Docker installed, and then run all your containerized services inside it. This gives you the flexibility of Docker while keeping the VM's snapshot and backup features. If you want even lighter weight, you can use an LXC container with Docker, but you need to enable nesting and accept the slight security trade-off of sharing the kernel with the host.

Common Problems and How to Avoid Them

Docker on Proxmox is not without its quirks. Here are the most common issues and their fixes:

  • LXC container won't start Docker: You need to enable nesting in the container's options. For unprivileged containers, you may also need to set keyctl=1. If you still have issues, switch to a privileged container.
  • Disk space fills up: Docker images and containers can consume a lot of disk. Use docker system prune to clean up unused data, and consider putting Docker's data directory on a larger storage location.
  • Port conflicts: If you run multiple containers that need the same port, you must map them to different host ports. For example, two web servers can't both bind to port 80 on the host; you'd map one to 8080 and the other to 8081.
  • Networking issues: By default, Docker uses a bridge network. If you need containers to be accessible on your LAN, you can use host networking or create a macvlan network, but that requires more setup.

Docker vs. LXC Containers on Proxmox

It's easy to confuse Docker containers with LXC containers, since both are “containers.” The key difference is that LXC is a system-level container that runs a full OS environment, while Docker is an application-level container that runs a single process or service. LXC containers are managed by Proxmox directly, have their own init system, and can be treated like lightweight VMs. Docker containers are managed by the Docker daemon, are ephemeral, and are designed for microservices.

In practice, you might use LXC for services that need a full OS environment (like a custom Linux distro) and Docker for individual apps. Many users run Docker inside an LXC container to get the best of both worlds: the low overhead of LXC and the ease of Docker.

Is Docker on Proxmox Safe?

Security is a common concern. Docker containers share the host kernel, so a vulnerability in a container could potentially affect the host. However, Docker provides several isolation mechanisms, such as namespaces and cgroups, and you can run containers with read-only root filesystems and drop capabilities to reduce risk.

For a home server, the risk is generally acceptable, but you should follow best practices:

  • Keep the host OS and Docker updated.
  • Only run images from trusted sources.
  • Use non-root users inside containers where possible.
  • Limit container capabilities (e.g., --cap-drop ALL).
  • Use separate networks for different services.

If you need stronger isolation, run Docker inside a VM rather than an LXC container, and use Proxmox's firewall features.

Frequently Asked Questions

Can I run Docker directly on Proxmox without a VM or LXC?

No. Proxmox VE is a hypervisor, not a general-purpose OS. Docker needs a Linux kernel with specific features, so you must install it inside a VM or LXC container that runs a Linux distribution.

Should I use a VM or an LXC container for Docker?

It depends on your needs. A VM provides better isolation and is easier to snapshot and migrate, but uses more resources. An LXC container is lighter and starts faster, but requires enabling nesting and may have security trade-offs. For most homelab users, a VM is the safer and more straightforward choice.

How much RAM and CPU do I need for Docker?

Docker itself is very lightweight, but the containers you run will consume resources based on their workloads. A typical setup with a few services (like a media server and a database) can run comfortably on 2 CPU cores and 4GB RAM. Start with those specs and monitor usage.

Can I use Docker Compose with Proxmox?

Yes. Docker Compose works exactly the same inside a VM or LXC container on Proxmox as it does on any Linux machine. You just need to install Docker Compose and create a docker-compose.yml file.

How do I access Docker containers from my LAN?

By default, Docker containers are on a bridge network, which is not directly reachable from your LAN. You need to publish ports (using -p or ports: in Compose) to map container ports to the host's IP. Then you can access them via the host's IP and the mapped port.

Will Docker slow down my Proxmox server?

No, Docker containers have very little overhead compared to VMs. They share the host kernel and only run the processes needed for the app. The main resource usage comes from the apps themselves, not Docker.