Why I Moved My Home Lab to Docker
Running bare-metal VMs worked fine until it didn't. Here's what pushed me to containerize everything and what I learned along the way.
For a long time my home lab was a collection of bare-metal installs and hand-rolled VMs — each one a slightly different version of whatever I needed at the time. It worked, until the day I wanted to move a service from one box to another and spent three hours recreating an environment I had built six months ago with no notes.
That was the moment I decided to containerize everything.
The problem with “it works on my machine”
The classic joke applies to home labs too. My Plex server was running on Ubuntu 20.04 with a specific version of ffmpeg compiled by hand. My Nextcloud instance had a PHP configuration I had tweaked and forgotten. When the host hardware started failing, I had no clean way to move things.
Docker changes the fundamental deal: the environment travels with the service. I don’t need to remember what packages I installed — the Dockerfile is the documentation.
How I structured it
I landed on a single docker-compose.yml per service, all living in a Git repo. The folder structure is simple:
homelab/
plex/
docker-compose.yml
nextcloud/
docker-compose.yml
traefik/
docker-compose.yml
.env
Traefik handles reverse proxying and automatic TLS through Let’s Encrypt. Everything else just declares which Traefik network to join and what labels to set, and Traefik picks it up automatically.
What I gave up
Not everything is better. A few things I miss:
- Direct hardware access. GPU passthrough for Plex transcoding required extra steps that a bare-metal install handled automatically.
- Simplicity for simple things. Running a quick one-off script doesn’t need a container. I still use the host for small utilities.
- Less abstraction. When something goes wrong at the network layer, debugging inside Docker adds a step.
What I gained
Backups got dramatically simpler. Every service’s state lives in a named Docker volume or a bind-mounted directory. My backup script just tars those directories and ships them to Backblaze B2.
Rebuilding a machine went from a weekend project to an afternoon. Clone the repo, run docker compose up -d in each folder, done.
The actual lesson
The real value of Docker in a home lab isn’t efficiency — it’s that it forces you to be explicit about your setup. Writing a docker-compose.yml means you understand what ports you’re opening, what environment variables you’re passing, and what data needs to persist. That explicitness is worth more than any performance gain.
If you’re running services on bare metal and thinking about making the jump, start with one non-critical service. Get comfortable with volumes and networks before you migrate anything you care about.