A home lab sounds grand, but it is really just a computer that stays on at home and does useful jobs for you. You do not need a rack in the spare room, or a pile of flashing switches. An old laptop on a shelf will do.
I got into this because I was fed up of paying for things I could run myself, and I wanted to understand my own network properly. At home I have already set up Pi-hole to block the nasty ads, and I have run a WireGuard VPN so I could reach the house from outside. This guide is the path I would follow if I were starting the whole lab from scratch, on a tight budget, with kit you may already own.
By the end you will have a little always-on box that can:
- block ads and trackers on the whole network with Pi-hole
- play your own films and music with Jellyfin, instead of paying another streaming subscription for media you already own
- keep files and photos on Nextcloud, instead of paying for Google Drive
- reach it all from outside the house with Tailscale (or WireGuard), without opening your network to the world
The software is free. The only spend is the computer, if you do not already have one, and a few cheap cables.
Why bother?
Three reasons, and you only need one of them.
It can save you money. If you already have the films, a media server costs you electricity, not a monthly fee. If you just need a place for documents and photos, your own file store does the same job as a paid cloud folder.
It is more private. Your files stay in your house. You decide who can see them.
It is a brilliant way to learn. You will use a real Linux server, a fixed IP address, Docker and a firewall-free way to get in from your phone. That is proper home networking, and you can break things safely because this machine is not the family PC.
If the networking words are new, read how I set up my home network and IP addresses explained first, then come back here.
What you will need (start with £0)
Lead with what you already have. That is the whole point.
| Tier | What to use | Rough cost | Notes |
|---|---|---|---|
| Free | An old laptop or desktop you already have | £0 | Any machine that still boots, with about 4 GB of RAM (8 GB is more comfortable) and a wired Ethernet port, or a cheap USB-to-Ethernet adapter. This will run all four services. |
| Budget buy | A used office mini PC | About £70–£90 | Look on eBay UK for a 6th or 7th generation Intel Core i5: a Lenovo ThinkCentre M710q, a Dell OptiPlex Micro or an HP EliteDesk 800 G3 Mini, with 8 GB of RAM, a 240–256 GB SSD and the official power supply included. Typical sold prices in the 120 days to 21 November 2026 were about £80–£89. |
| If you already have one | A Raspberry Pi | £0 if it is in the drawer | A Pi 3B is still plenty for Pi-hole and a light VPN. I would not buy a new official Pi 4 or Pi 5 kit for this lab right now: on 23 November 2026 a Pi 4 4 GB starter kit was £143.90 and a Pi 5 4 GB kit was £162.10 at The Pi Hut, which is more than a used mini PC. |
For a used mini PC, start with a search like ThinkCentre M710q, used, lowest price, and do the same for OptiPlex Micro and EliteDesk 800 G3 Mini. Prefer a seller with good feedback and returns, and check that the power brick is in the box. These little machines use a specific supply, and buying one separately can wipe out the saving.
You do not need a branded network-storage box for this. The old laptop or mini PC, plus a USB hard drive later if the film library grows, is enough.
Extras, only if you need them
Prices below were the cheapest Prime listings I found on Amazon UK on 23 November 2026 (Black Friday week, so they may move). I am an Amazon Associate and I earn from qualifying purchases.
| Item | Why | Price that day | Link |
|---|---|---|---|
| Short Cat6 patch lead, 0.5 m | From the lab box to the router, if they sit next to each other | £2.99 | JARNHNG 0.5 m Cat6 |
| 10 m Cat6 cable, pure copper | If the box is in another room and you want a ready-made lead | £8.98 (or £6.59 as a Prime member deal that day) | UGREEN 10 m Cat6 |
| 20 m Cat6 cable | A longer indoor run | £15.16 | Mr. Tronic 20 m Cat6 (this one is copper-clad aluminium; for a long outdoor or through-wall run, prefer copper cable and the crimp kit) |
| 5-port gigabit switch | Only if the router is short of ports | £10.99 | Tenda TEG1005D |
| 1 TB USB hard drive | Extra room for a Jellyfin library | £62.68 | Seagate 1 TB portable |
| 32 GB USB stick | To write the Linux installer, if you do not have a spare | £9.99 (or £8.49 Prime member) | Biwin UD150 |
| Pass-through RJ45 crimp kit with tester | Only if you want to make your own cables | £14.43 | VORXEON kit |
A short cable is the only extra most people must buy. The switch, the hard drive and the crimp kit can wait.
Cheapest working starter if you are buying a machine: about £73–£93 for a used mini PC and a short cable. That is enough to get everything below running.
STEP 1Back up, then give the machine a clean start
If this computer still has photos, schoolwork or anything you would miss, copy it off first. A spare USB drive or another PC is fine. Do not wipe a machine you still use every day until that copy is done and you have opened a couple of files to prove they work.
Once you are happy, this box can become a dedicated lab machine. The Linux installer in the next step can wipe the internal disk and start fresh, which is what I would do. You are not trying to keep Windows alongside this if you can avoid it: a small server is simpler when it has one job.
STEP 2Install a free operating system
I would use Ubuntu Server, because the instructions are clear and it is easy to keep updated. Debian is an equally good, slightly leaner choice. You do not need a desktop on this machine.
- On a PC or laptop you already use, download the current Ubuntu Server LTS from the official Ubuntu Server download page, or Debian from the official Debian download page.
- Write it to a USB stick with balenaEtcher (Windows, macOS or Linux) or Rufus (Windows). Both are free. Etcher is the straightforward one: choose the file, choose the USB stick, flash. Rufus is a solid Windows alternative if you already use it.
- Plug the USB stick into the lab machine, turn it on, and use the boot menu (often F12, F10 or Esc, depending on the make) to boot from the stick.
- Follow the installer. Choose English (or English UK), a keyboard that matches yours, and the official updates. When it asks about software, enable OpenSSH so you can finish the rest of this guide from another computer.
- Let it use the whole disk if this is a dedicated lab box. Set a username and a strong password, and do not lose them.
- When it reboots, remove the USB stick. Leave it plugged into the router with an Ethernet cable if you can. A wired link is more reliable than Wi-Fi for something that stays on all day.
From another computer on the same network, you can now sign in with:
ssh yourusername@THE-IP-ADDRESS
You can find that address in your router's list of connected devices. There is a Windows static IP guide if you ever need to set a fixed address on a PC, but for the lab box itself I prefer the method in the next step.
STEP 3Give it a fixed address and keep it wired
Every service below will be reached by an address, so that address must not change when the router is rebooted. The easiest way, and the one I used on my Pi, is a DHCP reservation on the router.
- Plug the lab machine into the router (or into a small gigabit switch next to the router) with Ethernet.
- Open the router's settings page and find the list of connected devices.
- Find the new machine, and choose "always use this IP address" or "DHCP reservation" (the wording varies).
- Make a note of the address, for example
192.168.1.20. You will use it a lot.
Leave it on a wire if you can. Wi-Fi will work in a pinch, but cables do not drop when someone starts a video call.
STEP 4Update the system and install Docker
Still signed in over SSH, update the machine first:
sudo apt update
sudo apt upgrade
We will run Pi-hole, Jellyfin and Nextcloud in Docker, which keeps each app in its own box so they do not trip over each other. The steps below are the official Docker Engine install for Ubuntu, using Docker's own apt repository (not the older docker.io package in Ubuntu, and not the snap). If you chose Debian, use the matching Debian instructions instead.
sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Check that it worked:
sudo docker run hello-world
You should see a short "Hello from Docker" message. To use docker without typing sudo every time, add your user to the docker group (this is in Docker's Linux post-install steps), then sign out and back in:
sudo usermod -aG docker $USER
Make a folder for the lab and go into it:
mkdir -p ~/homelab/media
cd ~/homelab
Put films and music you already own in ~/homelab/media later, or plug in a USB hard drive and use that path instead.
STEP 5Install Pi-hole
If you are doing this on a Raspberry Pi you already have, follow my full Pi-hole on a Raspberry Pi 3B guide instead: it uses Raspberry Pi OS and the normal installer, which is the smoother path on a Pi.
On a laptop or mini PC, the official way is Pi-hole's Docker compose file. I have kept their settings, with two beginner-friendly changes: the web page is on port 8080 so it does not grab port 80 (we will need that flexibility for other apps), and I have left out NET_ADMIN, which they only require if Pi-hole is also your DHCP server.
Create ~/homelab/docker-compose.yml with this, and change the password to one of your own:
# Based on the official example at https://docs.pi-hole.net/docker/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "8080:80/tcp"
environment:
TZ: "Europe/London"
FTLCONF_webserver_api_password: "CHANGE_ME_TO_A_STRONG_PASSWORD"
FTLCONF_dns_listeningMode: "ALL"
volumes:
- "./etc-pihole:/etc/pihole"
restart: unless-stopped
Start it:
docker compose up -d
Then open http://THE-IP-ADDRESS:8080/admin in a browser, sign in with the password you set, and point your router's DNS at the lab machine's address, just as in the Pi-hole guide. If DNS is still a bit abstract, that post will help.
If the router itself will not let you change DNS, you can still point one or two devices at the Pi-hole address to try it first.
STEP 6Install Jellyfin
Jellyfin is a free media server for films, TV and music you already own. It does not give you other people's catalogues, and it is not a way to dodge paying for streaming. Think of it as your own shelves, on the telly and on your phone.
The official image and compose layout are in the Jellyfin container docs. Add this under the services: section in the same docker-compose.yml (watch the indent, it should line up with pihole:):
jellyfin:
image: jellyfin/jellyfin
container_name: jellyfin
ports:
- "8096:8096/tcp"
volumes:
- "./jellyfin-config:/config"
- "./jellyfin-cache:/cache"
- type: bind
source: ./media
target: /media
restart: unless-stopped
Bring it up:
mkdir -p ~/homelab/jellyfin-config ~/homelab/jellyfin-cache
docker compose up -d
Open http://THE-IP-ADDRESS:8096, create your account, and add a library pointing at /media. On the telly or your phone, install the official Jellyfin app and sign in to that same address on your home network.
STEP 7Install Nextcloud
Nextcloud is your own file and photo store. The official installation method is Nextcloud All-in-One. Their default command publishes ports 80, 8080 and 8443, which would clash with Pi-hole on this same machine and is aimed at a public domain with a proper certificate.
For a first lab on the same box, I would start it without ports 80 and 8443 (you are not opening this to the internet yet) and put the admin page on 8081, which is a change their docs allow when 8080 is already in use. That gives you:
sudo docker run \
--init \
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
--publish 8081:8080 \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
ghcr.io/nextcloud-releases/all-in-one:latest
Then open https://THE-IP-ADDRESS:8081 (the certificate will be self-signed, so your browser will warn you: that is expected on a first lab). Follow the official AIO screens to start Nextcloud, and keep the password it shows you in a safe place.
If you would rather follow their default command to the letter, use a second machine, or read their reverse-proxy notes first, so port 80 is not fought over. There is also official guidance for using Nextcloud AIO with Tailscale, which fits this lab nicely once both are running.
STEP 8Reach it from outside, without opening ports
This is the important safety bit. Do not port-forward 22, 80, 443, 8096 or the Nextcloud ports to the internet on day one. You do not need to. A home lab that is only on your network, plus a proper remote-access tool, is much safer than a wide-open router rule.
The straightforward option is Tailscale. Install it on the lab machine with the official Linux install script, then start it:
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
It will give you a link to sign in. Install Tailscale on your phone or laptop too, sign in with the same account, and you can reach the lab's Tailscale address from outside the house as if you were on the sofa.
If you would rather run the VPN yourself, I have a full WireGuard on a Raspberry Pi guide. That one does use port forwarding on the router. For a first lab, I would start with Tailscale so you do not have to open any ports, and come back to WireGuard when you want to learn that part. I also explain the difference between a home VPN and a commercial one in What is a VPN?.
Keep it safe
A few habits will save you a lot of grief:
- Do not port-forward the lab to the internet. Use Tailscale, or WireGuard once you are comfortable.
- Keep it updated. On the machine, run
sudo apt updateandsudo apt upgradenow and then. For the containers:cd ~/homelab && docker compose pull && docker compose up -d. Pi-hole in Docker is upgraded by pulling a new image, not withpihole -up(that is their official advice). - Back up. Keep a copy of
docker-compose.ymland theetc-piholefolder. Copy or move your Jellyfin media somewhere you would not mind losing the machine. Nextcloud AIO has a built-in backup option in its own interface: use it. - Use strong, unique passwords for the machine, Pi-hole, Jellyfin and Nextcloud. The examples in this guide are placeholders.
- This box is for the lab. Do not browse the web or open email on it if you can help it.
What it costs
All figures are UK pounds, including VAT, as I found them on 23 November 2026. Mini PC totals are typical eBay UK sold prices, not a promise that a listing at that exact figure is still up.
| Setup | Rough total |
|---|---|
| Old laptop you already have | £0 |
| Plus a short Ethernet cable, if you need one | £2.99 |
| Used mini PC (typically £70–£90) plus a short cable | About £73–£93 |
| The same, plus a 5-port switch at the price that day | About £84–£104 |
| Comfortable media lab: mini PC, switch, 10 m copper cable and a 1 TB USB drive | About £152–£172 |
Electricity for a used mini PC or an old laptop is usually a few pounds a month, which is still a lot less than a handful of subscriptions.
Next steps
Once the box is happily humming:
- Point a couple of family devices at Pi-hole and see how the ad blocking feels, then switch the whole router if you are happy.
- Add Unbound later if you want your network to do its own DNS lookups. I have a Pi-hole and Unbound guide.
- Put the Jellyfin app on the telly and rip or copy films you already own, not other people's catalogues.
- Install the Nextcloud app on your phone and try a photo backup of one album first, not the whole camera roll.
- When you want to go deeper on the networking side, my book A Little Pi, Fewer Nasty Ads walks through Pi-hole, DNS and a home VPN in more detail, with diagrams and an undo button for every change.
If you want the full walk-through as a Short and a longer video on Freejack Tech on YouTube (@FrƎƎjackTech), leave a comment and tell me which part you want first.