Getting Started12 min read

How to Build a Homelab From Scratch

A practical, step-by-step guide to building your first homelab — from choosing hardware and installing your OS to networking, containers, and your first running services.

1. Choose Your Hardware

Don't overthink hardware on day one. The best homelab is one that runs quietly in a corner and you forget it's there. Here are three practical tiers:

Entry Level — $0 (use what you have)

An old desktop, laptop, or Mac Mini you're not using. Install Ubuntu Server and you're done. Great for learning Docker and running lightweight services like Pi-hole and Home Assistant.

Mini PC — $150–400 ⭐ Best Value

Beelink EQ12, EQ13, or SER series (N100/N305 CPU), 8–32 GB RAM, 256 GB+ SSD. Silent, low power (6–15W), fits anywhere. The current sweet spot for homelab beginners.

Tower Server — $300–800

Refurbished Dell Optiplex 7080 Micro, HP ProLiant DL20, or Lenovo ThinkStation. Supports ECC RAM, multiple drives, and Intel vPro for remote management. Scales well as your homelab grows.

2. Install Your Operating System

For most beginners, Ubuntu Server LTS is the recommended starting point. It's well-documented, has a massive community, and works with virtually all hardware.

1

Download Ubuntu Server LTS

Get the latest LTS ISO from ubuntu.com/download/server. Choose the LTS (Long Term Support) version for stability.

https://ubuntu.com/download/server
2

Create a bootable USB

Use Balena Etcher or dd to flash the ISO onto a USB drive.

sudo dd if=ubuntu-22.04.4-live-server-amd64.iso of=/dev/sdX bs=4M status=progress
3

Boot and install

Plug the USB into your homelab machine, boot from USB (press F2/F12/Del to enter BIOS), and follow the installer. Choose your disk, set up a user account, and install OpenSSH server when prompted.

4

Log in and update

SSH into your new server (or log in locally). Run apt update && apt upgrade immediately.

ssh [email protected] sudo apt update && sudo apt upgrade -y

3. Set Up Networking

Before installing services, set up a static IP and basic firewall. This is the foundation your entire homelab will build on.

A static IP ensures your homelab services are always reachable at the same address on your local network.

1

Set a static IP

Edit the netplan configuration on Ubuntu Server.

sudo nano /etc/netplan/00-installer-config.yaml
2

Configure netplan

Replace the file content with your desired static IP (adjust addresses to match your network).

network: version: 2 ethernets: eno1: addresses: - 192.168.1.100/24 gateway4: 192.168.1.1 nameservers: addresses: - 1.1.1.1 - 8.8.8.8 sudo netplan apply
3

Set up UFW firewall

Allow SSH (to avoid locking yourself out), then enable the firewall.

sudo ufw allow 22/tcp comment "SSH" sudo ufw enable sudo ufw status verbose

4. Install Docker & Docker Compose

Docker is the most efficient way to run multiple services on a homelab without managing them as system packages. Everything from Pi-hole to Plex runs as a container.

1

Install Docker

Use the official convenience script (Ubuntu/Debian).

curl -fsSL https://get.docker.com | sh # Add your user to the docker group sudo usermod -aG docker $USER newgrp docker
2

Install Docker Compose

Docker Compose lets you define and run multi-container applications with a single YAML file.

sudo apt install docker-compose-v2 docker compose version
3

Verify Docker is running

Test with a minimal container.

docker run --rm hello-world

5. Run Your First Services

Now for the fun part — running actual services. Start with these two easy wins that deliver immediate value:

1

Pi-hole — Network-wide Ad Blocking

Pi-hole blocks ads and trackers at the DNS level, for every device on your network at zero cost.

docker run -d \ --name pihole \ -e TZ=America/New_York \ -e WEBPASSWORD=YourSecurePassword \ -p 53:53/tcp \ -p 53:53/udp \ -p 80:80/tcp \ -v pihole-data:/etc/pihole \ -v pihole-dns:/etc/dnsmasq.d \ --restart unless-stopped \ pihole/pihole:latest
2

Uptime Kuma — Self-hosted Monitoring

Monitor your services and get alerted when something goes down. Beautiful UI, easy setup.

docker run -d \ --name uptime-kuma \ -p 3001:3001 \ -v uptime-kuma:/app/data \ --restart unless-stopped \ louislam/uptime-kuma:latest
3

Access your services

Navigate to your homelab's IP address in your browser. Pi-hole at http://192.168.1.100/admin, Uptime Kuma at http://192.168.1.100:3001.

6. Backup & Maintenance

A homelab without backups is a homelab waiting to lose everything. Set up backups before you add more services.

📁 Back up Docker volumes

Use tools like Volsync or a simple rsync cron job to back up critical data volumes to an external drive or another machine.

🔄 Set up automatic updates

Use Watchtower to automatically update Docker containers with the latest images. Or update manually every month with docker compose pull && docker compose up -d.

📊 Monitor disk space

Set up Disk Space alerts in Uptime Kuma. Homelabs are notorious for slowly filling up storage with logs and Docker images.

🗂️ Document your setup

Keep a README or notes on what services you're running, what ports they use, and how to restore them. You'll thank yourself in 6 months.

Frequently Asked Questions

What is the minimum RAM for a homelab?

2 GB is enough to run a minimal Ubuntu Server with Docker, Pi-hole, and Home Assistant. 4–8 GB gives you room to grow. 16 GB or more is ideal if you want to run local LLMs, Plex, or multiple heavy services simultaneously.

Should I use Proxmox or just Ubuntu Server with Docker?

Ubuntu Server + Docker is simpler and sufficient for most homelabs. Proxmox is better if you need full VMs (Windows, pfSense, or multiple isolated Linux installs), want GPU passthrough, or plan to cluster multiple machines.

Can I run a homelab on a Raspberry Pi?

Yes, a Raspberry Pi 4 (4–8 GB) or Raspberry Pi 5 is a great entry point. Run Raspberry Pi OS Lite (64-bit) with Docker. Keep expectations realistic — don't try to run Plex or local LLMs on a Pi.

How do I access my homelab from outside my home?

Set up WireGuard VPN on your server. This lets you securely connect to your home network from anywhere. Alternatively, use Tailscale (free for personal use) for an even simpler mesh VPN with zero port forwarding.

How do I choose a static IP address?

Pick an IP outside your router's DHCP range. If your router assigns IPs from 192.168.1.100 to 192.168.1.250, use something lower like 192.168.1.50 or 192.168.1.99. Always set a DHCP reservation so the router never assigns that IP to another device.

Next: Secure Your Homelab

Once your homelab is running, learn how to set up a proper firewall and network segmentation.

Firewall Setup Guide →