Docker Compose Stacks for Home Labs: Copy-Paste Setups
This page may contain affiliate links.
If you've ever spent a Saturday afternoon wrestling with a home server, you'll know the pain: installing dependencies, fighting with config files, and then realising you forgot to set a timezone. Docker Compose changes all that. One YAML file, one command, and your entire stack is up and running. For UK home labbers, it's the difference between a hobby and a chore. Below are four copy-paste stacks that cover the essentials — media, smart home, monitoring, and backups — plus some honest advice on hardware and running costs.
Why Docker Compose Beats Manual Installations
Docker Compose lets you define every service in a single docker-compose.yml file. You specify images, ports, volumes, and environment variables. Then docker compose up -d does the rest. Updates are just a matter of pulling new images and recreating containers. Rollbacks are trivial. If you mess something up, delete the stack and start again — no system-wide damage.
For a UK home lab, the real win is consistency. You can run the same stack on a Raspberry Pi 4, an old Dell OptiPlex, or a proper NAS. The YAML doesn't care. And because everything is containerised, you avoid the classic 'it works on my machine' problem. If you're new to this, I'd recommend starting with a used mini PC — something like a Lenovo ThinkCentre or HP EliteDesk with an i5 and 16GB RAM. You can pick one up for around £100-£150 on eBay, and it'll sip power compared to a full tower. Alternatively, a Raspberry Pi 5 with 8GB costs about £80 for the board, though you'll need a case, PSU, and SD card on top. For a budget-friendly start, grab a Raspberry Pi 5 — it's more than capable for most stacks below.
Stack 1: The Media Server (Plex + Sonarr + Radarr + Transmission)
This is the classic 'arr' stack. It automates downloading and organising your media library. You'll need Plex for streaming, Sonarr for TV shows, Radarr for films, and Transmission for the actual downloading. Here's the compose file:
version: '3.8'
services:
plex:
image: plexinc/pms-docker
container_name: plex
network_mode: host
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
volumes:
- ./plex/config:/config
- ./media:/data/media
restart: unless-stopped
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
volumes:
- ./sonarr/config:/config
- ./media/tv:/tv
- ./downloads:/downloads
ports:
- '8989:8989'
restart: unless-stopped
radarr:
image: lscr.io/linuxserver/radarr:latest
container_name: radarr
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
volumes:
- ./radarr/config:/config
- ./media/films:/movies
- ./downloads:/downloads
ports:
- '7878:7878'
restart: unless-stopped
transmission:
image: lscr.io/linuxserver/transmission:latest
container_name: transmission
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
volumes:
- ./transmission/config:/config
- ./downloads:/downloads
ports:
- '9091:9091'
- '51413:51413'
restart: unless-stoppedSave that as docker-compose.yml in a folder like ~/media-stack, then run docker compose up -d. Point Sonarr and Radarr at Transmission using the host IP and port 9091. For storage, a 4TB external drive costs around £90-£110 — check current prices on Amazon UK. Remember to set PUID and PGID to your own user ID (run id in the terminal) to avoid permission headaches.
Stack 2: Smart Home Hub (Home Assistant + Mosquitto MQTT)
Home Assistant is the Swiss Army knife of home automation. It integrates with everything from Philips Hue to your boiler's smart thermostat. Adding an MQTT broker (Mosquitto) lets you connect DIY sensors and ESP8266 devices. Here's the stack:
version: '3.8'
services:
homeassistant:
container_name: homeassistant
image: ghcr.io/home-assistant/home-assistant:stable
volumes:
- ./ha-config:/config
- /etc/localtime:/etc/localtime:ro
environment:
- TZ=Europe/London
ports:
- '8123:8123'
restart: unless-stopped
privileged: true
mosquitto:
container_name: mosquitto
image: eclipse-mosquitto:2
volumes:
- ./mosquitto/config:/mosquitto/config
- ./mosquitto/data:/mosquitto/data
- ./mosquitto/log:/mosquitto/log
ports:
- '1883:1883'
- '9001:9001'
restart: unless-stoppedYou'll need a mosquitto.conf file in the config folder with this content:
persistence true
persistence_location /mosquitto/data/
listener 1883
allow_anonymous trueThat allows anonymous connections — fine for a home network, but if you expose it externally, add a username and password. Home Assistant will auto-discover Mosquitto on the same Docker network if you set network_mode: host for both, or you can manually add the MQTT integration using localhost:1883. For a cheap start, grab a Sonoff Zigbee USB dongle — about £25 — and some Zigbee sensors for a fiver each. The whole smart home setup can run on a Raspberry Pi 4 with 4GB RAM, which draws about 5W — that's roughly 1p per day at typical UK electricity rates.
Stack 3: Monitoring and Dashboards (Grafana + Prometheus + Node Exporter)
If you want to see what your home lab is doing — CPU, memory, disk, temperatures — this stack is for you. Prometheus scrapes metrics, Node Exporter provides them, and Grafana turns it all into pretty dashboards. The compose file:
version: '3.8'
services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- ./prom-data:/prometheus
ports:
- '9090:9090'
restart: unless-stopped
node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
network_mode: host
restart: unless-stopped
grafana:
image: grafana/grafana:latest
container_name: grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
- ./grafana-data:/var/lib/grafana
ports:
- '3000:3000'
restart: unless-stoppedCreate a prometheus.yml in the same folder:
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'node'
static_configs:
- targets: ['localhost:9100']If you want to monitor other machines on your network, install Node Exporter on each and add their IPs to the targets list. Grafana's default login is admin/admin (change it immediately). Then add Prometheus as a data source at http://prometheus:9090 and import dashboard ID 1860 for a great Node Exporter overview. This stack is pure software — no extra hardware costs unless you want a dedicated display. A small 7-inch touchscreen for your Pi will set you back about £30, but honestly, a browser tab on your phone works fine.
Stack 4: Automated Backups (Duplicati + Watchtower)
Backups are the unglamorous hero of any home lab. Duplicati encrypts and backs up your important folders to a USB drive, NAS, or cloud storage. Watchtower automatically updates your other Docker containers so you don't have to manually pull new images. Here's the stack:
version: '3.8'
services:
duplicati:
image: linuxserver/duplicati:latest
container_name: duplicati
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
volumes:
- ./duplicati-config:/config
- /path/to/your/data:/source
- /path/to/backup/drive:/backup
ports:
- '8200:8200'
restart: unless-stopped
watchtower:
image: containrrr/watchtower:latest
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stoppedReplace the volume paths with your actual directories. Open http://your-server:8200 and set up a backup job — choose a destination folder on your mounted backup drive, set a schedule (e.g., daily at 2am), and enable encryption. For the backup drive, a 2TB portable SSD is about £100, but a slower 2TB HDD is closer to £60. If you're backing up to the cloud, Duplicati supports S3-compatible providers like Backblaze B2, which costs a fraction of a penny per GB per month for storage. Watchtower will check for updates every 24 hours and restart containers automatically — just be aware it might restart your Plex mid-film, so set a schedule using the --schedule flag, like --schedule="0 0 4 * * *" for 4am daily.
If you're following along but want the done-for-you version of all this — including ready-made AI prompts to generate custom stacks, troubleshoot container errors, and document your whole setup — check out the Home Lab & Automation Pack from £9. It's a set of prompts that turn ChatGPT or Claude into your personal Docker debugging assistant. Honestly, it'll save you an evening of Googling when a container won't start.
Putting It All Together
You don't need to run all four stacks at once. Start with one, get comfortable, then add another. A good order is monitoring first (so you can see what's happening), then media, then backups, then smart home. Each stack is independent, so you can keep them in separate folders and run docker compose up -d in each. To manage them all from one place, consider Portainer — a web UI that lets you see all your containers, logs, and stats. It's another single Docker container, and it's free for community use.
A final UK-specific tip: energy costs matter. A typical mini PC draws 15-25W under load, which at current UK prices (around 25p per kWh) works out to roughly 4-6p per hour if running flat out. In practice, idle is more like 10W, so you're looking at maybe £20-£30 a year for a 24/7 server. A Raspberry Pi 4 or 5 will cost under a tenner a year to run. Choose your hardware accordingly — and if you're using an old gaming PC, consider underclocking or replacing it with something more efficient. Your wallet and the planet will thank you.
These stacks are battle-tested and will get you 90% of the way there. The remaining 10% is tweaking paths, adding your own services, and learning the occasional Docker command that saves the day — like docker logs container_name when something goes wrong. Copy, paste, and enjoy your new home lab.
SEO Content Briefs with ChatGPT: A Step-by-Step Workflow
Stop staring at a blank doc. Here's a practical, repeatable workflow for building SEO content briefs with ChatGPT that writers actually want to use.
AI Prompts for Newsletters People Actually Open
Most newsletters die in the inbox graveyard because the subject line is dull and the first line is worse. Here are the exact AI prompts that fix both — plus the rest of the email.
How to Repurpose One Blog Post into 10 Pieces of Content
Write once, publish everywhere. A practical UK-focused workflow for turning a single blog post into ten distinct pieces of content, with prompts you can copy and paste.