title: "Five years of self-hosting"
date: 2024-03-08
tags: [craft]
reading_time: 6 min
slug: five-years-of-self-hosting
---
Five years of self-hosting
I've been running my own small fleet of services for five years now: a couple of personal apps, a few side projects, a mail relay, a git mirror, a home dashboard. Some on a single VPS, some on a Raspberry Pi, most running longer than I expected.
Here's what I've learned, in descending order of usefulness.
The one rule
Write down how to rebuild everything on a fresh box.
Not in your head. Not in your memory. In a file, committed to git, updated when the process changes. Everything else I've learned is a corollary of this.
What breaks
Things fail in predictable ways:
- Disks fill up because log rotation is something you turned off and forgot
- Certificates expire because Let's Encrypt renewal was running in a cron job on a server you decommissioned
- Backups are never tested until the day you find out they've been empty for six months
- OS upgrades break things because the PHP version bumped and your self-hosted CMS wasn't ready
I've done every one of these. The pattern: none of them were hard problems. All of them were ignored for too long.
The disciplines that pay off
The three things that saved me most pain:
- Uptime monitoring you actually see. I use a push notification when anything goes red. Dashboards you have to log into are read when everything is already on fire.
- Unattended upgrades set to security-only. Auto-apply kernel and critical patches. Skip the rest. This is the single highest-ROI line of config you can write.
- A nightly backup that writes to somewhere else. S3, a B2 bucket, a friend's NAS. Same machine isn't backup; it's a RAID you can delete by accident.
What I've stopped self-hosting
After five years, the things I've handed back to hosted services:
- Email. Reputation is harder than SMTP. Fastmail is worth every rupee.
- DNS. Cloudflare's free tier is operationally invisible and I had an incident once where my DNS was my actual website.
- Continuous integration. GitHub Actions is fine. My CI server kept running out of disk.
What's still on the fleet
Analytics, a small git frontend, a bookmarks app, a couple of internal tools. All boring, all Postgres-backed, all easy to move.
Self-hosting is less about stopping paying for things and more about knowing where things live when they break. It's a muscle, and five years in, it's the most useful one I've built.