A homelab is a small server — or a few of them — running in your home that you fully control. This homelab setup guide walks you through building your first home server from scratch: what hardware to pick, what software to install, how much it really costs, and three projects you can finish this weekend.
You don’t need to be a sysadmin, and you don’t need to spend a fortune. A $150 mini PC and a free afternoon is enough to start.
What is a homelab?
A homelab is a dedicated machine (or a handful of them) at home that runs self-hosted services — the kind of things most people rent from a cloud provider. Instead of paying someone else to run a server, you run your own.
Common homelab examples:
- A media server that streams your movie library to any TV.
- A private cloud for files, calendar, and contacts (replacing Google Drive).
- A whole-home ad blocker.
- A sandbox to learn Linux, Docker, and networking.
The goal isn’t to replace every cloud service. It’s to learn, save money, and own your data.
What can you do with a homelab?
Here’s what most people run on their first home server:
- Media streaming — Jellyfin or Plex serves your own library.
- File sync & photos — Nextcloud or Immich replace Google Drive and Google Photos.
- Ad blocking — Pi-hole blocks ads and trackers for your entire network.
- Password manager — Vaultwarden is a self-hosted Bitwarden server.
- Learning — break things, fix them, and level up fast.
How much does a homelab cost to run?
This is the question everyone asks first. The honest answer: hardware is a one-time cost, but electricity is the real ongoing expense.
| Setup | Upfront cost | Idle power | Monthly electricity (est.) |
|---|---|---|---|
| Old laptop / PC | $0 | 15–30 W | $2–4 |
| Raspberry Pi 5 | $80–120 | 5–10 W | $1–2 |
| Mini PC (Intel N100) | $150–250 | 8–15 W | $1–3 |
| Used enterprise server | $200–400 | 80–150 W | $10–20 |
For most beginners, a mini PC is the sweet spot: cheap, quiet, and powerful enough to run a dozen containers. We break down every cost in more detail in our homelab cost guide.
Do you need to know Linux?
No — but you’ll pick up the basics quickly. Most homelab software runs on Linux, and you’ll learn a handful of commands as you go. If you’ve ever run a command in a terminal, you’re already most of the way there.
The commands you’ll use daily:
sudo apt update && sudo apt upgrade # update the system
cd /some/directory # change directory
docker compose up -d # start your services
Choosing your homelab hardware
Four realistic options, from cheapest to most powerful:
- Old PC or laptop — free and great to learn on, but bulky and less power-efficient. An old laptop is ideal: built-in screen, keyboard, and battery (a free UPS).
- Raspberry Pi — tiny and silent, but limited CPU for heavier services.
- Mini PC (Intel N100 or similar) — the recommended sweet spot: small, quiet, 8–15 W idle.
- Used enterprise server (Dell/HP) — lots of RAM and cores, but loud and power-hungry.
Start with what you already have. Don’t buy anything until you’ve outgrown it.
How much RAM and storage do you need?
- RAM: 8 GB is plenty to start. 16 GB gives you room to grow.
- Storage: a 256 GB SSD for the OS and containers, plus a bigger HDD later if you host media.
The software stack: Proxmox vs Docker
You have two main paths:
- Proxmox VE — a hypervisor that runs virtual machines. More flexible, steeper learning curve.
- Debian/Ubuntu + Docker — the simplest way to run self-hosted apps. This guide uses this path.
Docker packages apps into containers that run anywhere. You define your services in a few lines of YAML called a Compose file.
Step 1: Install the operating system
Download Ubuntu Server LTS, flash it to a USB stick (balenaEtcher or Rufus), and boot the installer. Accept the defaults, enable OpenSSH, and create a user. That’s it — you now have a server.
Step 2: Install Docker and Docker Compose
On Ubuntu or Debian, run:
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
Log out and back in, then verify:
docker --version
docker compose version
Step 3: Run your first container
Portainer gives you a web UI to manage Docker. Create a file called docker-compose.yml:
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: always
ports:
- "9443:9443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
volumes:
portainer_data:
Then start it:
docker compose up -d
Open https://your-server-ip:9443 and follow the setup. Congratulations — your homelab is officially running.
Three projects to start with
- Pi-hole — block ads across your whole network in about 10 minutes.
- Nextcloud — your own Dropbox and Google Drive alternative.
- Jellyfin — stream your media library to any device.
Common homelab mistakes to avoid
- Buying enterprise hardware too early. Loud, power-hungry servers are tempting, but you’ll regret the noise and the electric bill. Start small.
- Storing data on the OS drive. If the OS disk dies, you lose everything. Keep your data on a separate volume and back it up.
- Exposing services to the internet without thinking. Use a VPN (Tailscale) instead of opening ports blindly.
Can you run a homelab in an apartment?
Yes. The three concerns — noise, space, and power — are all solved by a mini PC or Raspberry Pi. A N100 mini PC is silent or near-silent, fits on a shelf, and idles under 15 W. Just avoid used enterprise servers in an apartment; those fans will keep you awake.
What if you break something?
Then you’re doing it right. A homelab is a sandbox — breaking a container and fixing it is how you actually learn. Two habits make it painless:
- Keep your services in Docker Compose files, so they’re reproducible.
- Back up your data volumes regularly.
Homelab security basics
- Keep the OS and containers updated.
- Enable a firewall (UFW) and open only the ports you need.
- Don’t expose services to the public internet. Use Tailscale or a VPN for remote access.
Ready to build yours?
You now know everything needed to start your first home server. For a concrete first project, check out our step-by-step guide to self-hosting Git with Gitea — it’s a perfect way to put your new homelab to work.