You’ve got a few Docker containers running, everything’s working, and then it hits you: restarting them after a reboot means typing the same docker run commands over and over, remembering every flag, every port, every volume mount. There’s a better way, and it’s called Docker Compose. Setting up a docker compose home server is how homelabbers go from “I have containers” to “I have an actual system.”
Docker Compose lets you define your entire service stack in a single YAML file — every container, every network, every volume, all in one place. One command starts everything. One command tears it down. When your server reboots, everything comes back automatically. If you’re running more than two containers on your home server, this is the tool that makes it manageable.

| Command | What It Does |
|---|---|
docker compose up -d |
Starts every service in the stack, detached in the background |
docker compose ps |
Shows the status of running services |
docker compose logs -f |
Streams logs from all services in real time |
docker compose down |
Stops and removes containers and networks |
docker compose pull |
Pulls the latest images before an update (pair with up -d) |
What Is a Docker Compose Home Server Setup?
A docker compose home server is simply a machine running Docker where all your services are defined and managed using Compose files (compose.yaml). Instead of manually running each container with long docker run commands, you write a YAML file that describes every service, and Docker handles the rest.
The key benefits: reproducibility (your entire stack is documented in a text file you can back up), automatic restart policies (containers come back after reboots), dependency management (service B won’t start until service A is ready), and shared networking (containers in the same Compose file can talk to each other by service name, no IP address juggling required).
Step 1: Install Docker and Compose
On Ubuntu or Debian (which is what most homelab mini PCs run), install both with:
curl -fsSL https://get.docker.com | sh
That script installs Docker Engine and Docker Compose v2. Verify it worked: docker --version and docker compose version. Then add your user to the Docker group so you don’t need sudo every time: sudo usermod -aG docker $USER (log out and back in after).
Step 2: Understand the Compose File Structure
Here’s a minimal compose.yaml running Pi-hole:
services:
pihole:
image: pihole/pihole:latest
container_name: pihole
restart: unless-stopped
ports:
- "53:53/tcp"
- "53:53/udp"
- "8080:80"
environment:
WEBPASSWORD: "your-password-here"
volumes:
- ./pihole/etc-pihole:/etc/pihole
- ./pihole/etc-dnsmasq.d:/etc/dnsmasq.d
Three things to understand: restart: unless-stopped means the container auto-starts on reboot. volumes map folders on your host into the container — this is how data survives container restarts. ports map host ports to container ports in HOST:CONTAINER format.
Step 3: Run Your Stack
Save your compose.yaml in a folder (e.g., ~/homelab/pihole/), navigate there, and run:
docker compose up -d
The -d flag runs it detached (in the background). That’s it. Your services are running. To check status: docker compose ps. To see logs: docker compose logs -f. To stop everything: docker compose down.
Step 4: Build a Multi-Service Stack
The real power of Docker Compose comes when you combine services. Here’s a starter stack combining Pi-hole for DNS blocking and Vaultwarden for password management in a single file:
services:
pihole:
image: pihole/pihole:latest
restart: unless-stopped
ports:
- "53:53/tcp"
- "53:53/udp"
- "8080:80"
environment:
WEBPASSWORD: "changeme"
volumes:
- ./pihole/etc-pihole:/etc/pihole
vaultwarden:
image: vaultwarden/server:latest
restart: unless-stopped
ports:
- "8081:80"
volumes:
- ./vaultwarden/data:/data
Run docker compose up -d from that folder and both services start together. They share the same network by default, so they can communicate with each other by service name if needed.
The Hardware That Makes This Work
A solid docker compose home server needs reliable, always-on hardware. The Beelink MINI S13 is the current sweet spot — Intel N150, 16GB RAM, 500GB SSD (plus a spare M.2 NVMe slot if you want to add more), dual 2.5G LAN. That’s efficient enough to run 24/7 without adding meaningfully to your electricity bill, and capable enough to handle 10+ containers without breaking a sweat.
Pair it with an APC Back-UPS 600VA and your docker compose home server will survive power outages gracefully instead of corrupting databases mid-write — something you’ll be very glad about the first time the power flickers.
Beelink MINI S13
Pair it with an APC Back-UPS 600VA and your docker compose home server will survive power outages gracefully instead of corrupting databases mid-write — something you’ll be very glad about the first time the power flickers.
- Pair it with an APC Back-UPS 600VA and your docker compose home server will survive power outages gracefully instead of corrupting databases mid-write
- something you’ll be very glad about the first time the power flickers
Current price and availability shown on Amazon.
APC Back-UPS
Pair it with an APC Back-UPS 600VA and your docker compose home server will survive power outages gracefully instead of corrupting databases mid-write — something you’ll be very glad about the first time the power flickers.
- Pair it with an APC Back-UPS 600VA and your docker compose home server will survive power outages gracefully instead of corrupting databases mid-write
- something you’ll be very glad about the first time the power flickers
Current price and availability shown on Amazon.
The official Compose documentation deserves a bookmark — the file reference answers every “can I do X in YAML” question this hobby will eventually make you ask.
Quick Answers: Docker Compose Home Server FAQ
Why Compose files instead of just docker run commands? Because your server becomes a document. Every service, port, volume, and setting lives in one YAML file you can read, version, and rebuild from — six months later, “how did I set this up?” has an answer. A docker compose home server is infrastructure you can carry between machines; a pile of run commands is archaeology.
One big compose file or one per service? Start with one file while the stack is small — seeing everything together teaches you how the pieces relate. Split services into their own folders (each with its compose file and data directory) once the single file passes a few hundred lines. Migration between the two styles is painless, so don’t overthink the starting choice.
How do updates work? The manual, sane way: docker compose pull then docker compose up -d, which recreates only what changed. The automated way is Watchtower — convenient, but auto-updating databases at 3am has broken more homelabs than it’s saved. My compromise: automate the boring stateless stuff, update databases deliberately with a backup fresh in hand.
Where do I put my data so containers don’t eat it? Bind mounts to a predictable folder tree (like /srv/appdata/servicename) beat anonymous Docker volumes for a home server — your data sits in plain sight, backs up with one rsync line, and survives any amount of container carnage. The compose file plus that folder is your server; protect both and reinstalls become boring.
When do I actually need Kubernetes? For a home server: realistically never. Compose handles dozens of services on one box with a fraction of the complexity. Learn k3s because it’s fun or career-relevant — not because your Jellyfin needs an orchestrator.
The Takeaway: Docker Compose Home Server Is How You Graduate to a Real Homelab
Running a docker compose home server transforms your setup from a collection of containers you manage manually into a system that manages itself. One YAML file, one command, everything running and auto-restarting after every reboot. That’s the whole upgrade.
Start with one service in a Compose file, get comfortable with the format, then add more. Once you’re running four or five services this way, you’ll wonder how you ever did it with raw docker run commands. If you want to go deeper into virtualization, check out the Proxmox beginner setup guide — Proxmox and Docker Compose work beautifully together for more complex homelab setups.
What services are you planning to run? Drop them in the comments — I’d love to see what people are building.
Version that compose file, back up the data folder, and you’ve got a server that can die on a Tuesday and be reborn by Wednesday breakfast.
That’s the entire philosophy: boring, readable, reproducible. Your future self — the one restoring the stack at midnight — will thank you for every line of that YAML.
What’s in your stack? Drop your favorite container in the comments — the best additions to my own compose file have all come from readers.
- AdGuard Home vs Pi-hole: Which DNS Blocker Wins for Homelabs
- Immich Self Hosted Docker: 3 Reasons It Beats Google Photos
- 5 Best Uptime Kuma Homelab Setup Tips for Self-Hosters
- Proxmox vs Docker Homelab: Which Setup Should You Run?
- n8n Self Hosted Setup: 5 Easy Steps to Private Automation
- How Many Docker Containers Raspberry Pi 5 Can Actually Run
