Turn Your Raspberry Pi into a Home Server (Complete Guide)

Step-by-step guide to building a Raspberry Pi home server with Docker. Run Pi-hole, Nextcloud, Jellyfin, Vaultwarden, and more.

Andreas · April 12, 2026 · 12 min read

Introduction

With Docker installed and SSH configured, your Raspberry Pi is ready to become a home server. This guide covers setting up the essential self-hosted services that replace cloud subscriptions.

Prerequisites

  • Raspberry Pi with Docker installed (see Part 1)
  • Headless SSH access configured (see Part 2)
  • External SSD recommended for storage-heavy services

Project Structure

Create a directory for all your services:

mkdir -p ~/server && cd ~/server

Each service gets its own docker-compose.yml and data directory.

Service 1 — Pi-hole (Network Ad Blocker)

mkdir pihole && cd pihole

Create docker-compose.yml:

services:
  pihole:
    image: pihole/pihole:latest
    container_name: pihole
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "80:80/tcp"
    environment:
      TZ: 'Europe/Oslo'
      WEBPASSWORD: 'changeme'
    volumes:
      - './etc-pihole:/etc/pihole'
      - './etc-dnsmasq.d:/etc/dnsmasq.d'
    restart: unless-stopped
docker compose up -d

Set your router's DNS to the Pi's IP address to block ads network-wide.

Service 2 — WireGuard VPN

Access your home network from anywhere:

mkdir ~/server/wireguard && cd ~/server/wireguard
services:
  wireguard:
    image: linuxserver/wireguard
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Oslo
      - SERVERURL=your.domain.com
      - PEERS=phone,laptop
    volumes:
      - './config:/config'
    ports:
      - "51820:51820/udp"
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: unless-stopped

Service 3 — Vaultwarden (Password Manager)

Self-hosted Bitwarden-compatible server:

services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    volumes:
      - './data:/data'
    ports:
      - "8080:80"
    environment:
      - SIGNUPS_ALLOWED=false
    restart: unless-stopped

Service 4 — Nextcloud (Files & Calendar)

services:
  nextcloud:
    image: nextcloud:latest
    container_name: nextcloud
    volumes:
      - './data:/var/www/html'
    ports:
      - "8081:80"
    restart: unless-stopped

For production use, add a MariaDB or PostgreSQL database container.

Service 5 — Jellyfin (Media Server)

services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    volumes:
      - './config:/config'
      - './cache:/cache'
      - '/mnt/media:/media:ro'
    ports:
      - "8096:8096"
    restart: unless-stopped

Managing Your Stack

Useful commands for day-to-day management:

# See running containers
docker ps

# View logs
docker logs pihole --tail 50

# Update all containers
docker compose pull && docker compose up -d

# Stop a service
docker compose down

Monitoring Resources

Keep an eye on your Pi's resources:

# CPU temperature
vcgencmd measure_temp

# Memory and CPU usage
htop

# Disk usage
df -h

Summary

You now have a fully functional home server running five core services — ad blocking, VPN, password manager, file storage, and media streaming — all on a Raspberry Pi. The total cost is a fraction of equivalent cloud subscriptions, and you own all your data.

Comments