← All posts

Docker vs VMs on Proxmox: When to Use Which

Docker vs VMs on Proxmox: When to Use Which

You've installed Proxmox. Now you're ready to start adding applications to your home lab, and a question comes up almost immediately: should you create a virtual machine, an LXC container, or install Docker?

If you've spent any time searching for an answer, you've probably noticed that everyone has a different opinion. Some people will tell you to run everything in Docker. Others swear by LXC. And then there are the people who prefer virtual machines for everything.

Here's the thing: none of them are necessarily wrong. I've used all three, and each has its own advantages and disadvantages.

So in this post I'll go through what each one actually does, when I think it's worth considering, and how I decide where an application should run in my own lab. Because at the end of the day, the goal isn't to build the most complicated home lab possible. It's to build something that works for you.

Prefer to watch? click here

The one thing to understand first

These three technologies aren't direct competitors, at least not in the way most comparisons make it sound. There are really two separate decisions:

  1. What kind of environment should Proxmox create for this? A virtual machine or an LXC container?
  2. How should the application run inside that environment? Installed directly, or through Docker?

Proxmox itself gives you two kinds of guests: virtual machines and LXC containers. Docker isn't a third kind of Proxmox guest. It's a layer you add inside one of them.

Here's how the pieces stack up:

Four ways to run proxmox diagram

It's not really about which technology is universally better or worse. It's about where applications belong, and how and when you want to manage them.

Virtual machines: a computer inside a computer

A virtual machine is exactly what it sounds like: a computer inside of a computer. It's a virtualized computing environment with its own operating system and its own kernel. If you've used VMware or VirtualBox, it's basically the same idea, running under Proxmox.

What's good about VMs

What's less good

A lightweight Linux VM can be quite efficient, so the real cost isn't necessarily RAM or CPU. It's that you're maintaining another complete operating system.

How I use VMs

If I need a separate Windows installation for testing, I create a VM for it. In fact, any operating system I'm testing gets its own dedicated VM.

I also run Home Assistant as a VM. If you want to take advantage of all of Home Assistant's features, it runs a lot better that way. You can run a more basic version in a Linux container, and if you're running a basic install, that works too. I'm keeping this beginner-friendly here, and if you're more advanced and have a stronger understanding of the technology, you may well have a better setup than mine. I run it as a VM because that's how I get access to all the features I use.

My rule of thumb: use a VM when you need a full operating system, the best compatibility, or stronger isolation from the system underneath.

LXC containers: lightweight Linux environments

LXC stands for Linux Containers. An LXC container is an isolated Linux environment that shares the Proxmox host's kernel. There's no separate guest kernel, which means you aren't running a full kernel for every container.

You manage it like a small Linux server: install a distribution, then manage its packages, users and services. Proxmox calls these system containers, which is a useful way to distinguish them from Docker's application-focused containers.

What's good about LXC

What's less good

I'll be honest about that last one. If you want to run something like a game server or an AI workload that needs graphics, you can do it in an LXC. I've done it. But you're probably better off setting it up in a VM, or using Docker.

How I use LXC containers

I use a container when I'm running a dedicated service. That includes:

You can do what you want. I'm just telling you what I would do.

One important caveat: lightweight doesn't automatically mean better. Saving RAM isn't worth hours of troubleshooting. Choose an LXC when you want something straightforward, a lightweight Linux service that doesn't fight you.

Docker: applications packaged with their dependencies

In very loose terms, Docker wraps an application and everything it needs into its own packaged environment, called a container. Think of all the dependencies an application would normally rely on. Instead of installing them into your system, they come packaged with the application.

Docker also has a component called Docker Compose, which lets you describe a whole application stack in a single file. A good example is Immich. It isn't only an application; it has a database and a machine-learning component and more. With Compose, you can fit that whole stack together in one compose file.

What's good about Docker

What's less good

I'll admit I'm still learning Docker myself. It becomes a lot more streamlined once you have the expertise to configure it, but that's a real "if."

How I use Docker

I use it for services like Immich, self-hosted dashboards, and web applications that need separate databases but still want to be part of one package and talk to each other. When an application's vendor offers a Docker Compose file, that's often a good sign Docker is the intended route.

Compose files are not backups. This one trips people up. A compose file defines how an application runs. It isn't a backup of the application or its data. You can back it up, but the file itself isn't the backup. I'd suggest keeping a copy somewhere else, named so it's clearly a copy.

Also worth knowing: updating an image doesn't guarantee your data is safe or that the new version will work. Persistent volumes, configuration files, databases and tested backups still matter.

So how do all three work together?

You can run Docker inside a VM. You can run Docker inside an LXC. Both approaches work. The difference is the trade-offs.

Docker inside a VMDocker inside an LXC
IsolationStronger, with a dedicated kernelShares the Proxmox kernel
CompatibilityFewer nested-container problemsNested containers can be complicated
OverheadMore: a separate OS to maintainLower and more efficient
Watch out forExtra OS updates, more memoryPermissions, storage and kernel compatibility, extra security considerations

Proxmox's own documentation recommends running Docker inside a VM. I agree, for beginners especially. Docker inside a container is valid if you understand the trade-offs, and plenty of experienced people do it. It just isn't the simplest place to start.

Two more rules I follow:

  1. Don't change something that's already working reliably. A little extra RAM can be worth a simpler setup.
  2. Don't install Docker directly on the Proxmox host. Keep Proxmox focused on virtualization and keep things separated.

Possible doesn't always mean preferable. Just because you can do something doesn't mean you should.

Not everything needs to live inside Proxmox

This is a personal one, and it's where I deliberately break the "put it all in Proxmox" idea.

I sometimes run Docker directly on my NAS because it has the Docker application built in. Take Immich: I run it on my NAS because the NAS has far more storage than my Proxmox server.

I know plenty of people run Immich on their main compute server and have it access storage directly. Every time I've tried a setup like that, I've run into issues. It would work on day one, then for some reason not work on day two. Maybe it's a patience thing for me, but I don't have the time or patience to set it up properly. So my rule is simple: if the application needs storage, run it directly on the NAS.

These aren't hard rules. Multiple approaches can work, and it comes down to the best solution for you. Use the hardware and environment that make sense for the situation.

How I decide: my short version

Here's the decision process in plain terms.

If this is true...I'd chooseExamples
It needs a full operating system, or maximum compatibility and isolationA VMWindows testing, Home Assistant, a NAS OS I'm evaluating
It's a small, straightforward Linux serviceAn LXCPi-hole, AdGuard Home, Beszel, Mealie
It's distributed as a Docker image or Compose stackDocker inside a VMImmich, Uptime Kuma, web apps with their own databases
It needs lots of storage, and I have a NAS with the Docker application built inDocker on the NASImmich in my setup

And my personal split: I use mostly LXCs and Docker, and I reach for VMs when I really need to. If I'm testing something that I'm going to rebuild, especially if I'm also testing the install and uninstall process, I'll lean toward Docker. If it's something more permanent, more of my production flow, I'll typically use an LXC.

Summary

My philosophy at UnclutteredTech: don't use technology just because you can. Fewer resources doesn't automatically mean less complexity. And always consider updates, troubleshooting, backups and recovery. Choose whatever is easiest to maintain over time.

Your home lab should be something you enjoy using and experimenting with, not something that constantly needs your attention just to keep running.

FAQ

Can I run Docker inside an LXC on Proxmox?

Yes, and plenty of people do. It uses fewer resources, but nested containers can bring permission, storage and kernel-compatibility issues. Proxmox itself recommends a VM for Docker, so that's the more straightforward default, especially for beginners.

Is an LXC better than a VM because it uses less RAM?

Not automatically. Saving RAM isn't worth hours of troubleshooting. Choose an LXC when the service is simple and straightforward, and a VM when you need compatibility or stronger isolation.

Should I install Docker directly on the Proxmox host?

I'd avoid it. Keep Proxmox focused on virtualization and run Docker in a VM (or deliberately in an LXC if you understand the trade-offs).

Is a Docker Compose file a backup?

No. It defines how an application runs. You still need backups of the application's data and a copy of the compose file stored somewhere else.

Which should a beginner start with?

For a beginner: VMs for operating-system testing, LXC for simple Linux services such as Pi-hole or AdGuard Home, and Docker inside a VM for Compose-based applications.

Join the conversation

How are you running your applications: Docker, LXCs or VMs? And if you run Docker inside an LXC, why did you choose that? Let me know in the comments on the video.

.

Stuck on your own setup? Book a 1:1 session.