DEV Community

Prim Ghost
Prim Ghost

Posted on

Stop Paying for Cloud Services: A Beginner's Guide to Self-Hosting

I was paying $147/year for services I could run myself on a $35 Raspberry Pi.

Google Drive. A VPN. A password manager. All services where the "cloud" is just someone else's computer — and you're paying monthly to use it.

This guide shows you how to replace all of it. No prior Linux experience required.


What Is Self-Hosting?

Self-hosting means running software on your own hardware instead of paying a company to run it for you.

The advantages:

  • No monthly fees — pay once for hardware, run software forever
  • Your data stays yours — not on someone else's servers
  • No feature limits — you control everything
  • Learning opportunity — Docker, Linux, networking are career-relevant skills

The tradeoffs:

  • You maintain it (maybe 30 minutes a month)
  • You're responsible for backups
  • If your power goes out, it goes down

For most people, the tradeoffs are worth it easily.


What You Can Replace

Paid Service Monthly Cost Self-Hosted Alternative Your Cost
Google Drive (2TB) $10/mo Nextcloud $0
NordVPN $6/mo WireGuard $0
Bitwarden Premium $1/mo Vaultwarden $0
Google Photos $3/mo Immich $0
Plex Pass $5/mo Jellyfin $0
Total $25/mo Hardware + power ~$5-10/mo

Hardware: What You Actually Need

The Free Option: An Old PC or Laptop

The best homelab is the one you already own. An old laptop or desktop that's collecting dust works perfectly.

Requirements:

  • At least 4GB RAM (8GB+ ideal)
  • Any processor from the last 10 years
  • 120GB+ of storage
  • Internet connection (wired is better)

That's it. If you have this, you can start today for $0.

The $80 Option: Raspberry Pi 4

Tiny, quiet, uses almost no power (~5 watts). Runs 24/7 without raising your power bill.

Best for: Pi-hole, WireGuard VPN, Vaultwarden, basic file storage
Struggles with: video transcoding, large Nextcloud installs

Buy the 4GB or 8GB version. Skip the 2GB — it's not worth the savings.

The Best Value: Used Mini PC ($100-200)

A used Intel NUC or Beelink mini PC from eBay. Roughly laptop-sized, quiet, efficient, and powerful enough for everything including Jellyfin 4K transcoding.

This is what most serious homelabbers run.


The Software Stack: How It Works

Step 1: Install Ubuntu Server

Download Ubuntu Server 22.04 LTS from ubuntu.com. Boot from a USB drive. Follow the installer.

After install, run:

sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git ufw fail2ban
sudo ufw allow ssh && sudo ufw enable
Enter fullscreen mode Exit fullscreen mode

You now have a secure, updated server.

Step 2: Install Docker

Docker lets you run apps in isolated containers. Each app is self-contained — no dependency conflicts, easy to remove.

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
Enter fullscreen mode Exit fullscreen mode

Log out and back in. Docker is ready.

Step 3: Run Apps With Docker Compose

Every app below comes with a docker-compose.yml file. You paste it, run one command, app is running. No complicated installation.

docker compose up -d
Enter fullscreen mode Exit fullscreen mode

That's the magic. -d means "run in background."


The 5 Apps to Install First

1. Pi-hole — Block Ads on Every Device

Pi-hole blocks ads at the DNS level. Every device on your network — phones, smart TVs, game consoles — gets ad blocking without installing anything on them.

version: "3"
services:
  pihole:
    image: pihole/pihole:latest
    container_name: pihole
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "80:80/tcp"
    environment:
      TZ: 'America/Chicago'
      WEBPASSWORD: 'changeme'
    volumes:
      - './etc-pihole:/etc/pihole'
    restart: unless-stopped
Enter fullscreen mode Exit fullscreen mode

After starting, log into your router and set your DNS server to your Pi-hole's IP. Done.

2. WireGuard — Your Own VPN

Access your home network securely from anywhere. Faster and simpler than OpenVPN.

version: "3.8"
services:
  wg-easy:
    environment:
      - WG_HOST=YOUR_PUBLIC_IP
      - PASSWORD=changeme
    image: ghcr.io/wg-easy/wg-easy
    container_name: wg-easy
    ports:
      - "51820:51820/udp"
      - "51821:51821/tcp"
    cap_add:
      - NET_ADMIN
    restart: unless-stopped
Enter fullscreen mode Exit fullscreen mode

Access the web UI at http://YOUR-IP:51821. Create a client, download the config, import it in the WireGuard app on your phone.

3. Vaultwarden — Self-Hosted Password Manager

The Bitwarden app on every device connects to YOUR server instead of Bitwarden's cloud.

version: "3"
services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    volumes:
      - ./vw-data:/data
    ports:
      - "3002:80"
    restart: unless-stopped
Enter fullscreen mode Exit fullscreen mode

After starting: go to http://YOUR-IP:3002, create your account. In the Bitwarden app, go to Settings → Server URL → enter your IP. All passwords now sync to your server.

4. Nextcloud — Your Own Google Drive

File sync, calendar, contacts, notes. Install the app on your phone and it syncs automatically.

Paste the full docker-compose (it needs a database container too — the full config is in my guide below).

5. Immich — Unlimited Photo Backup

Like Google Photos but yours. Auto-backup from your phone, facial recognition, timeline view. No storage limits.


Security Basics (Don't Skip This)

SSH Key Authentication — disable password login, use keys only:

ssh-keygen -t ed25519
ssh-copy-id user@your-server-ip
# Then set PasswordAuthentication no in /etc/ssh/sshd_config
Enter fullscreen mode Exit fullscreen mode

Firewall — only allow what you need:

sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 80
sudo ufw allow 443
sudo ufw enable
Enter fullscreen mode Exit fullscreen mode

Automatic Updates:

sudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades
Enter fullscreen mode Exit fullscreen mode

Accessing Everything Remotely

Tailscale is the easiest option. Install it on your server and your devices. Everything becomes accessible by hostname from anywhere without opening ports on your router.

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
Enter fullscreen mode Exit fullscreen mode

Where to Go From Here

The rabbit hole goes deep. Once Pi-hole and Vaultwarden are running, you'll want Jellyfin. Then Nextcloud. Then Home Assistant. This is normal.

Communities:

  • r/homelab — hardware, networking, builds
  • r/selfhosted — software and Docker
  • selfh.st/apps — searchable directory of self-hosted apps

For a complete beginner guide with all 10 apps, full Docker Compose configs, security setup, and remote access options:

The Homelab Starter Guide → ($12)

It's everything I wish existed when I started — real configs, not just descriptions.


Prim Ghost builds practical guides for self-hosters and tinkerers.

Top comments (0)