I Self-Host Everything for Less Than a Coffee a Month
I run a surprising amount of infrastructure on a single cheap VPS, behind Cloudflare, and the monthly bill is roughly the price of a coffee. This is the honest version: what I run, what it really costs, and the tradeoffs that self-hosting fans do not talk about.
What "everything" means here
- Go web services running under systemd, reverse-proxied by nginx.
- SQLite databases for the services (backed up with the WAL discipline I wrote about separately).
- Static site for this very site, generated and served from the same box.
- Analytics via GoAccess on the nginx logs — no third-party script, no cookie banners, no data leaving the box.
- Cloudflare in front for DNS and CDN, so the origin is not directly exposed.
The real numbers
Rough, honest ballpark for a modest single-node workload:
| Item | Cost |
|---|---|
| Cheap VPS | ~$4–6/month |
| Domain | ~$10/year (spread across months, negligible) |
| Cloudflare free tier | $0 |
| Monitoring/analytics | $0 (GoAccess, journald) |
| Total | ~$5/month |
The same workload on a managed platform can run 5–20x that once you add a hosted database, a hosted analytics product, and a hosting plan that scales by requests.
The tradeoffs nobody puts in the post
Self-hosting is cheaper in dollars and more expensive in time and attention:
- You are the SRE. Patches, disk space, log rotation, and "why is the box slow" are your problem, not a platform's.
- Uptime is on you. No managed SLA, no auto-failover. For a solo project that is fine; for something you depend on daily, it is a real cost.
- Security surface is yours. Cloudflare hides the origin, but you still configure ssh, firewall, and updates. A managed platform bundles that.
- Backups are a habit, not a feature. My SQLite backup discipline exists because there is no dashboard button that does it for me.
When it is worth it — and when it is not
Self-hosting on a VPS wins when: you run Go binaries (deploy is a file copy), your data fits a file-based database, you are comfortable being the SRE, and your traffic is modest.
Pay for managed hosting instead when: you have a team, you need a guaranteed SLA, you want to spend zero time on operations, or your workload needs elastic scaling. The dollar difference is often worth buying your attention back.
For a solo developer running a few services, the coffee-a-month box is hard to beat — as long as you accept the job that comes with it. Run the numbers on your own workload below before you decide.
Comments (0)
No comments yet.