I got tired of paying monthly fees for things I could run myself. Cloud storage, password managers, note syncing, all services that someone else hosts, someone else has access to, and someone else can change the price on whenever they feel like it.

A Raspberry Pi 5 and a few Docker containers later, I'm hosting my own Nextcloud instance. It's not as polished as Google Drive. It's mine.

Why a Pi 5

The Pi 5 is a noticeable jump from the 4. Four Cortex-A76 cores at 2.4GHz, support for PCIe NVMe via the HAT, and actual USB 3 throughput that doesn't collapse under sustained transfers. For a home server that sits on a shelf and hums quietly, 8GB of RAM is plenty.

I went with 8GB because I'm running multiple Docker containers. If you're just running Nextcloud and nothing else, 4GB works. But I wanted headroom for services I haven't thought of yet.

What I'm running

Nextcloud File sync, calendar, contacts: the core reason for this setup
Caddy Reverse proxy with automatic HTTPS via Let's Encrypt
PostgreSQL Database backend for Nextcloud (faster than the default SQLite)
Redis Caching layer. Nextcloud is sluggish without it
Docker Compose Everything runs in containers. One docker compose up -d to start

Setup walkthrough

I'm not going to give you a 40-step tutorial. There are plenty of those already. Here's the shortened version of what actually matters:

  1. Flash Raspberry Pi OS Lite (64-bit) to your SD card or NVMe drive. Use the Imager tool. It lets you set hostname, SSH keys, and user credentials before boot.
  2. Install Docker and Docker Compose. The convenience script works fine on Pi OS.
  3. Create a docker-compose.yml with Nextcloud, Postgres, Redis, and Caddy. The Nextcloud image has ARM builds. Everything else does too.
  4. Configure Caddy with your domain. It handles the TLS certificate automatically. If you don't have a domain, use a free subdomain from DuckDNS.
  5. Open the right port on your router. Nextcloud needs 443. That's it.

If you're running Nextcloud behind a reverse proxy, set the TRUSTED_PROXIES environment variable. Without it, Nextcloud thinks every request comes from the proxy IP and breaks IP-based security rules. This one took me an embarrassingly long time to figure out.

Storage

The Pi 5's SD card slot is fine for the OS, but don't put your Nextcloud data directory on it. SD cards die under write-heavy workloads. I boot from NVMe using the Pimoroni NVMe Base and keep all data on the NVMe drive. An external USB SSD is another option if you don't want the HAT.

If you're stuck with SD only, at least mount the data directory as tmpfs or use a USB stick for the data volume. You'll still wear out the SD card eventually, but less quickly.

Backups

I use a fairly low-tech approach: a cron job that runs pg_dump for the database and rsync for the data directory, copying both to an external drive. It runs nightly. I also have a weekly off-site backup that uploads a tarball to a cheap S3-compatible storage bucket.

The important thing isn't the method, it's that you have one and that you've tested restoring from it. Untested backups aren't backups.

What I stopped using

I used to run Jellyfin and Forgejo on the same Pi. Media streaming eats storage and bandwidth. Git hosting is fine until you realize you're the only one using it. Both went away in a recent cleanup. The Pi now does one job and does it reliably.

There's a temptation to load every self-hosted service you can find onto one box. Resist it. A Pi can handle a surprising amount, but the moment you start running ten containers and wondering why Nextcloud feels slow, you'll know you've gone too far.

The honest assessment

Self-hosting is more work than a subscription. You deal with updates, certificate renewals, and occasional downtime. Your internet connection becomes a single point of failure for remote access (though Tailscale or WireGuard can help with reliability).

But the tradeoff is worth it for me. I own the data. I control the access. Nobody can deprecate a feature I depend on, and nobody can raise the price 40% because the market will bear it.

If you've got a Pi 5 gathering dust and $10/month in subscription bills, give it a shot. Worst case, you learn something about networking. Best case, you stop paying for cloud storage entirely.