How to Set Up a Home Server from Scratch in 2026

How to Set Up a Home Server from Scratch in 2026

Velocity Stream is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you.

Velocity Stream is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you. As an Amazon Associate I earn from qualifying purchases. How we test.

You've probably heard the pitch before: just use the cloud. And sure, for a lot of things, the cloud works fine. But in 2026, there are some very real reasons why spinning up your own home server makes more sense than ever.

Privacy is the obvious one. Every file you store on Google Drive, every photo you sync to iCloud — that's data sitting on someone else's hardware, subject to their terms of service, their AI training policies, and their pricing whims. A home server puts you back in control.

Cost savings add up fast. If you're paying for cloud storage, a VPN service, a media streaming subscription, and a password manager, you're easily looking at /month. A home server can replace all of those for the cost of electricity (roughly /month depending on your hardware).

The learning payoff is enormous. Setting up a home server teaches you Linux administration, networking, Docker, and security fundamentals — skills that are genuinely valuable whether you work in tech or not.

And then there's the self-hosting movement. Projects like Nextcloud, Immich, Jellyfin, and Vaultwarden have matured to the point where they're not just "good enough" alternatives to commercial products — they're often better, because you control the data and the updates.

This guide walks you through the entire process: picking hardware, choosing an OS, getting your first services running, and locking things down properly. No fluff, no theory — just the steps that actually work.

Choosing Your Hardware

You don't need enterprise-grade equipment. In fact, some of the best home servers start life as something you already own. Here are your main options, ranked roughly by cost.

Option 1: Repurpose an Old PC ()

That desktop gathering dust in your closet? It's probably more than capable. Any machine with a quad-core CPU, 8GB of RAM, and a 256GB SSD can run a surprisingly capable home server. The main thing you're adding is maybe a larger hard drive for storage.

Pros: Free (or nearly free), plenty of power for most tasks, easy to upgrade with standard parts.

Cons: Power consumption can be high (60–150W idle), noisy fans, takes up space.

Good candidates: Any Intel i5/i7 or AMD Ryzen desktop from the last 8 years. Even older i3 systems work fine for lighter workloads.

Option 2: Mini PCs ()

This is the sweet spot for most people in 2026. Mini PCs pack serious performance into a tiny, power-efficient package. They typically draw 10–25W at idle, run silently, and fit on a shelf.

Top picks right now:

Pros: Low power, silent, small footprint, good performance-per-watt.

Cons: Limited storage expansion (usually 1-2 drive slots), RAM may be soldered.

Option 3: Raspberry Pi 5 ()

The Pi 5 with 8GB RAM is genuinely usable as a lightweight server. It'll handle Pi-hole, a small Nextcloud instance, Home Assistant, and a few other containers without much trouble.

Pros: Ultra-low power (3–8W), tiny, inexpensive, huge community.

Cons: ARM architecture means some Docker images won't work, limited to USB/SD storage (no SATA), struggles with heavier workloads like media transcoding.

Best for: DNS filtering, lightweight automation, and learning. Not ideal as your only server if you want to run Jellyfin or Nextcloud with multiple users.

Option 4: Dedicated NAS Devices (+)

Devices from Synology and QNAP come with their own OS and app ecosystem. They're plug-and-play and handle storage well, but they're opinionated about how you use them.

Pros: Purpose-built for storage, RAID support out of the box, polished web UIs.

Cons: Expensive for the CPU power you get, proprietary software, less flexible than a general-purpose Linux box.

Verdict: If your primary need is file storage and backup with minimal tinkering, a Synology DS224+ is hard to beat. For everything else, a mini PC gives you more flexibility for less money.

My Recommendation

For most people reading this guide, grab a mini PC with at least 16GB RAM and a 500GB SSD. Budget around . You'll have enough power to run 15-20 Docker containers simultaneously, with room to grow. If budget is tight, an Intel N100 mini PC at is a perfectly capable starting point.

Hardware Shopping Picks

Here's what we'd reach for when stocking a new home server build in 2026.

The sweet spot for most home server builds in 2026. Ryzen 5 5625U, 16GB DDR4 RAM, 500GB NVMe SSD, triple 4K output, and ~10W idle draw. Handles 15–20 Docker containers without a sweat. Check Price on Amazon →

Raspberry Pi 5 (8GB)

Best ultra-low-power option for Pi-hole, Home Assistant, and lightweight self-hosting. Draws 3–8W at idle. Check Docker image compatibility before committing your full stack — ARM architecture rules out some images. Check Price on Amazon →

Synology DS223 2-Bay NAS (Diskless)

If plug-and-play storage is the goal, the DS223 is the easiest path. RAID support, Synology DSM polished web interface, and a full app ecosystem including Plex and cloud sync. Sold without drives — pair with IronWolf drives below. Check Price on Amazon →

Seagate IronWolf 4TB NAS Hard Drive

NAS-rated drives built for 24/7 operation with health monitoring firmware and 300TB/year workload rating. Far more reliable than standard desktop drives in an always-on setup. Check Price on Amazon →

Samsung BAR Plus 128GB USB 3.1 Flash Drive

Rugged metal body, 400MB/s read speeds, compact enough to leave plugged in as a boot drive. Use it to flash Ubuntu Server for installation or keep it as a recovery drive. Check Price on Amazon →

APC 600VA UPS Battery Backup (BE600M1)

A home server that shuts down mid-write can corrupt your filesystem. The BE600M1 gives you 5–8 minutes of runtime during a power cut — enough to flush logs and shut down cleanly. Check Price on Amazon →

Choosing Your Operating System

This is where opinions get strong. Here's an honest breakdown of the four most popular options.

Ubuntu Server 24.04 LTS

Best for: Beginners and general-purpose servers

Ubuntu Server is the most well-documented Linux distribution, period. When you Google a problem, the first three answers will be for Ubuntu. The LTS (Long Term Support) release gets security updates for 10 years, so you're not on a treadmill of upgrades.

Pros: Massive community, excellent documentation, straightforward setup, works with everything.

Cons: Snap packages can be annoying (but removable), no built-in web GUI for management.

Proxmox VE

Best for: Running multiple virtual machines and containers

Proxmox is a hypervisor — it's designed to run multiple operating systems on one machine. If you want to run a Windows VM alongside your Linux containers, or you want hard isolation between services, Proxmox is excellent.

Pros: Web-based management UI, VM and container support, snapshots and backups built in.

Cons: Adds a layer of complexity, overkill if you just want Docker containers, the nag screen for the subscription is annoying (but harmless).

TrueNAS Scale

Best for: Storage-focused servers with ZFS

If your primary goal is rock-solid file storage with data integrity guarantees, TrueNAS and its ZFS filesystem are the gold standard. It also supports Docker containers through its app system.

Pros: ZFS is bulletproof for data integrity, nice web UI, built-in app catalog.

Cons: ZFS is RAM-hungry (wants 1GB per TB of storage), the app system can be finicky, less flexibility than bare Docker.

Unraid ( license)

Best for: Mixed storage with mismatched drives

Unraid lets you build an array from drives of different sizes — something ZFS and traditional RAID can't do. Its Docker and VM support is excellent, and the community app store is huge.

Pros: Use any mix of drives, great community plugins, good Docker integration, simple web UI.

Cons: Not free, parity-based redundancy is slower than RAID, not ideal if you don't need mixed-drive storage.

The Pick for This Guide

We're going with Ubuntu Server 24.04 LTS. It's the most transferable skillset, has the best documentation, and gives you maximum flexibility. Everything you learn here applies directly to cloud servers too, so you're building real skills.

Step-by-Step: Initial Setup

Here's how to go from bare hardware to a working server. This assumes you've got a mini PC or old desktop ready to go.

Step 1: Create a Bootable USB

Download Ubuntu Server 24.04 LTS and flash it to a USB drive using Rufus (Windows), balenaEtcher (Mac/Linux), or just dd if you're comfortable with the command line:

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

(Replace /dev/sdX with your actual USB device — use lsblk to find it. Be careful here; dd will happily overwrite your main drive if you point it at the wrong device.)

Step 2: Install Ubuntu Server

Boot from the USB and walk through the installer. Key choices:

The installer will finish, reboot, and drop you at a login prompt. Log in with your username and password.

Step 3: First Boot Essentials

Run these commands to get your system up to date and install the basics:

# Update everything
sudo apt update && sudo apt upgrade -y

# Install essential tools
sudo apt install -y curl wget git htop net-tools

# Set a static IP (optional but recommended)
# Find your current IP
ip addr show

# Note your interface name (usually eth0, enp0s3, or similar)
# and current IP. Then edit the netplan config:

For a static IP, edit your netplan configuration:

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

Set it to something like:

network:
 version: 2
 ethernets:
 enp0s3:
 dhcp4: no
 addresses:
 - 192.168.1.100/24
 routes:
 - to: default
 via: 192.168.1.1
 nameservers:
 addresses:
 - 1.1.1.1
 - 8.8.8.8

Apply it:

sudo netplan apply

From this point on, you can SSH into your server from another computer and ditch the monitor/keyboard:

ssh yourusername@192.168.1.100

Step 4: Install Docker

Docker is the backbone of modern self-hosting. Nearly every service you'll want to run is available as a Docker container, which means clean installs, easy updates, and no dependency conflicts.

# Install Docker using the official convenience script
curl -fsSL https://get.docker.com | sudo sh

# 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 for the group change to take effect
exit
# SSH back in

# Verify Docker is working
docker run hello-world

You should see a "Hello from Docker!" message. You're in business.

Essential First Services

With Docker installed, let's get five genuinely useful services running. We'll use Docker Compose for all of these — it's the cleanest way to define and manage multi-container setups.

First, create a directory structure to keep things organized:

mkdir -p ~/docker/{portainer,pihole,nginx-proxy-manager,nextcloud,jellyfin}

1. Portainer — Docker Management UI

Portainer gives you a web interface for managing your Docker containers. It's not strictly necessary (you can do everything from the command line), but it's incredibly useful for monitoring what's running and troubleshooting issues.

cd ~/docker/portainer

cat > docker-compose.yml <<'EOF'
services:
 portainer:
 image: portainer/portainer-ce:latest
 container_name: portainer
 restart: unless-stopped
 ports:
 - "9443:9443"
 volumes:
 - /var/run/docker.sock:/var/run/docker.sock
 - portainer_data:/data

volumes:
 portainer_data:
EOF

docker compose up -d

Access it at https://your-server-ip:9443. Create an admin account on first visit. You'll see all your running containers, resource usage, and logs from one dashboard.

2. Pi-hole — Network-Wide Ad Blocking

Pi-hole acts as a DNS server that blocks ads and trackers at the network level. Point your router's DNS at your server, and every device on your network gets ad-free browsing — no browser extensions needed.

cd ~/docker/pihole

cat > docker-compose.yml <<'EOF'
services:
 pihole:
 image: pihole/pihole:latest
 container_name: pihole
 restart: unless-stopped
 ports:
 - "53:53/tcp"
 - "53:53/udp"
 - "8080:80/tcp"
 environment:
 TZ: 'America/Chicago'
 WEBPASSWORD: 'your-secure-password-here'
 volumes:
 - pihole_data:/etc/pihole
 - dnsmasq_data:/etc/dnsmasq.d

volumes:
 pihole_data:
 dnsmasq_data:
EOF

docker compose up -d

Access the dashboard at http://your-server-ip:8080/admin. Once it's running, change your router's DNS settings to point to your server's IP address. You'll immediately start seeing blocked queries in the Pi-hole dashboard.

Tip: Start with the default blocklists. Add more later if you want stricter filtering, but the defaults catch the vast majority of ad and tracking domains.

3. Nginx Proxy Manager — Reverse Proxy Made Easy

If you want to access your services using nice domain names (like nextcloud.home instead of 192.168.1.100:8081), Nginx Proxy Manager makes it painless. It also handles SSL certificates automatically if you ever expose services to the internet.

cd ~/docker/nginx-proxy-manager

cat > docker-compose.yml <<'EOF'
services:
 npm:
 image: jc21/nginx-proxy-manager:latest
 container_name: nginx-proxy-manager
 restart: unless-stopped
 ports:
 - "80:80"
 - "443:443"
 - "81:81"
 volumes:
 - npm_data:/data
 - npm_letsencrypt:/etc/letsencrypt

volumes:
 npm_data:
 npm_letsencrypt:
EOF

docker compose up -d

Access the admin panel at http://your-server-ip:81. Default login is admin@example.com / changeme — you'll be prompted to change this immediately.

4. Nextcloud — Your Own Cloud Storage

Nextcloud replaces Google Drive, Dropbox, and more. File sync, calendar, contacts, notes, and a mobile app that auto-uploads your photos. It's the killer app of self-hosting.

cd ~/docker/nextcloud

cat > docker-compose.yml <<'EOF'
services:
 nextcloud:
 image: nextcloud:latest
 container_name: nextcloud
 restart: unless-stopped
 ports:
 - "8081:80"
 environment:
 MYSQL_HOST: nextcloud-db
 MYSQL_DATABASE: nextcloud
 MYSQL_USER: nextcloud
 MYSQL_PASSWORD: your-db-password-here
 volumes:
 - nextcloud_data:/var/www/html
 depends_on:
 - db

 db:
 image: mariadb:10.11
 container_name: nextcloud-db
 restart: unless-stopped
 environment:
 MYSQL_ROOT_PASSWORD: your-root-password-here
 MYSQL_DATABASE: nextcloud
 MYSQL_USER: nextcloud
 MYSQL_PASSWORD: your-db-password-here
 volumes:
 - nextcloud_db:/var/lib/mysql

volumes:
 nextcloud_data:
 nextcloud_db:
EOF

docker compose up -d

Access it at http://your-server-ip:8081. Create your admin account, and you're ready to start syncing files. Install the Nextcloud desktop client on your computers and the mobile app on your phone for automatic sync.

Important: Change those placeholder passwords to real, strong passwords before running docker compose up. Use a password manager or generate them with openssl rand -base64 24.

5. Jellyfin — Free Media Streaming

Jellyfin is a free, open-source media server. Point it at your movie and music folders, and it organizes everything with metadata, artwork, and a Netflix-like interface. Apps available for every platform — Roku, Fire TV, Apple TV, Android, iOS, and web browser.

cd ~/docker/jellyfin

cat > docker-compose.yml <<'EOF'
services:
 jellyfin:
 image: jellyfin/jellyfin:latest
 container_name: jellyfin
 restart: unless-stopped
 ports:
 - "8096:8096"
 volumes:
 - jellyfin_config:/config
 - jellyfin_cache:/cache
 - /path/to/your/media:/media:ro
 environment:
 TZ: 'America/Chicago'

volumes:
 jellyfin_config:
 jellyfin_cache:
EOF

docker compose up -d

Access it at http://your-server-ip:8096. Walk through the setup wizard, add your media libraries, and let it scan. Within minutes you'll have a fully browsable media library.

Tip: Organize your media files in a clear folder structure before adding them: /media/movies/Movie Name (Year)/ and /media/tv/Show Name/Season 01/. Jellyfin's metadata scrapers work much better with clean naming.

Security Basics: Don't Skip These

Your server is on your local network, which provides some protection, but good security habits matter — especially if you ever plan to expose services to the internet. Here are the non-negotiables.

Set Up SSH Key Authentication

Password-based SSH is a liability. SSH keys are both more secure and more convenient (no typing passwords every time you connect).

On your local computer (not the server):

# Generate a key pair (if you don't already have one)
ssh-keygen -t ed25519 -C "your-email@example.com"

# Copy your public key to the server
ssh-copy-id yourusername@192.168.1.100

Now test that you can log in without a password:

ssh yourusername@192.168.1.100

Once confirmed, disable password authentication on the server:

sudo sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo systemctl restart sshd

Configure the Firewall (UFW)

UFW (Uncomplicated Firewall) is already installed on Ubuntu — you just need to enable it and tell it what to allow.

# Allow SSH (do this FIRST or you'll lock yourself out)
sudo ufw allow ssh

# Allow the ports for your services
sudo ufw allow 53/tcp # Pi-hole DNS
sudo ufw allow 53/udp # Pi-hole DNS
sudo ufw allow 80/tcp # HTTP
sudo ufw allow 443/tcp # HTTPS

# Enable the firewall
sudo ufw enable

# Check the status
sudo ufw status

Critical: Always allow SSH before enabling UFW. If you enable the firewall without allowing SSH, you'll need physical access to the machine to fix it.

Enable Automatic Security Updates

Unattended upgrades keep your system patched without you having to remember to run apt upgrade every week.

# Install (usually already present)
sudo apt install -y unattended-upgrades

# Enable automatic security updates
sudo dpkg-reconfigure -plow unattended-upgrades

Select "Yes" when prompted. Your server will now automatically install security patches. It won't reboot on its own — you'll still want to do a manual reboot after kernel updates, which you'll see flagged when you SSH in.

Keep Docker Images Updated

Docker images don't update themselves. Get in the habit of pulling fresh images periodically:

# Update all running containers (run from each compose directory)
docker compose pull && docker compose up -d

# Or update everything at once with a simple script:
for dir in ~/docker/*/; do
 echo "Updating $(basename $dir)..."
 cd "$dir" && docker compose pull && docker compose up -d
done

Some people automate this with Watchtower, but I'd recommend doing it manually until you're comfortable — automatic updates can occasionally break things, and you want to be around to notice and fix it.

What's Next?

You've got a working home server with five genuinely useful services. That's not a toy — that's infrastructure you'll actually use every day. But this is really just the foundation.

Here's where you might go from here:

Each of these follows the same pattern: create a directory, write a docker-compose.yml, run docker compose up -d. The hardest part is the first setup — and you've already done that.

Want the complete walkthrough? Our Home Server Setup Guide covers everything above in deeper detail, plus advanced topics like remote access with Wireguard, automated backups, media server optimization, and monitoring — all for . It's the guide we wish existed when we were setting all this up.

Happy self-hosting.

Want the complete guide?

Get our The Home Server Setup Guide — a complete walkthrough for building and configuring your own home server. Instant PDF download after purchase.

Get the Guide —