Self-Hosting vs Cloud: I Tracked Every Dollar for 1 Year
Real costs of running production apps on Hetzner, DigitalOcean, AWS, and Vercel — with surprising results
Everyone says "the cloud is expensive" and "self-hosting saves money." But is it true? I spent a year running identical production workloads on both self-hosted servers and managed cloud platforms, tracking every cost.
The results surprised me. Self-hosting isn't always cheaper — and when it is, the savings come with hidden costs most people ignore.
TL;DR: The Bottom Line
Self-Host When:
- Predictable workloads — You know your resource needs
- High traffic — 100K+ requests/day (50-70% savings)
- You have DevOps skills — Can manage servers, security, backups
- Long-term projects — ROI improves over 6+ months
- Data sovereignty matters — EU/GDPR compliance
Typical Savings: $200-800/month at scale
Use Cloud When:
- Variable traffic — Spiky or unpredictable loads
- Starting out — Under 10K requests/day (cloud is cheaper)
- Fast iteration — Need to ship features, not manage servers
- Small team — No dedicated DevOps engineer
- Global distribution — Need edge locations worldwide
Typical Cost: $0-500/month for most startups
The Experiment: What I Tested
Test Setup
I ran 3 production apps for 12 months on both self-hosted and cloud platforms:
App 1: SaaS Dashboard (Medium Traffic)
- Next.js app with PostgreSQL database
- 50K requests/day average
- 20GB database, 100GB file storage
- 5 background workers
App 2: API Service (High Traffic)
- FastAPI + Redis + PostgreSQL
- 500K requests/day average
- Heavy compute (ML inference)
- 50GB database
App 3: Static Site (Low Traffic)
- Astro blog with 200 pages
- 10K requests/day
- Minimal compute needs
Platforms Tested
| Category | Self-Hosted | Cloud Managed |
|---|---|---|
| VPS Providers | Hetzner, DigitalOcean | — |
| App Hosting | Docker on VPS | Vercel, Netlify, Render |
| Database | Self-managed PostgreSQL | Supabase, PlanetScale, Neon |
| Object Storage | MinIO on VPS | AWS S3, Cloudflare R2 |
Cost Breakdown: 12-Month Totals
App 1: SaaS Dashboard (50K req/day)
Self-Hosted (Hetzner)
| Item | Monthly | Annual |
|---|---|---|
| VPS (CX41: 8 vCPU, 16GB RAM) | $28 | $336 |
| Backup storage (100GB) | $5 | $60 |
| Monitoring (Uptime Robot + Sentry) | $15 | $180 |
| SSL cert (Let's Encrypt) | $0 | $0 |
| CDN (Cloudflare) | $0 | $0 |
| Total | $48 | $576 |
Cloud Managed
| Item | Monthly | Annual |
|---|---|---|
| Vercel Pro | $20 | $240 |
| Supabase Pro | $25 | $300 |
| Cloudflare R2 (100GB) | $2 | $24 |
| Monitoring (included) | $0 | $0 |
| Total | $47 | $564 |
💡 Surprising Result: At 50K req/day, costs are nearly identical! Cloud wins on convenience.
App 2: API Service (500K req/day)
Self-Hosted (Hetzner)
| Item | Monthly | Annual |
|---|---|---|
| VPS (CCX33: 8 vCPU, 32GB RAM) | $65 | $780 |
| Database VPS (CX31: 4 vCPU, 8GB) | $18 | $216 |
| Backup storage (200GB) | $10 | $120 |
| Monitoring & logging | $20 | $240 |
| Total | $113 | $1,356 |
Cloud Managed
| Item | Monthly | Annual |
|---|---|---|
| AWS ECS Fargate (2 vCPU, 4GB) | $145 | $1,740 |
| RDS PostgreSQL (db.t3.large) | $125 | $1,500 |
| ElastiCache Redis | $45 | $540 |
| CloudWatch + monitoring | $25 | $300 |
| Data transfer | $60 | $720 |
| Total | $400 | $4,800 |
🔥 Self-hosting saves $3,444/year (72%) at high traffic! This is where it pays off.
App 3: Static Site (10K req/day)
Self-Hosted (DigitalOcean)
| Item | Monthly | Annual |
|---|---|---|
| Droplet (1 vCPU, 1GB RAM) | $6 | $72 |
| Backup | $1 | $12 |
| Cloudflare CDN | $0 | $0 |
| Total | $7 | $84 |
Cloud Managed
| Item | Monthly | Annual |
|---|---|---|
| Cloudflare Pages | $0 | $0 |
| Total | $0 | $0 |
⚠️ Cloud wins for static sites. Free hosting beats $84/year self-hosting.
⏰ Hidden Costs: Time is Money
Time Spent on Self-Hosting (12 months)
| Task | Hours/Month | Annual Hours | Cost @ $100/hr |
|---|---|---|---|
| Initial setup & configuration | — | 40 | $4,000 |
| Security updates & patches | 2 | 24 | $2,400 |
| Monitoring & incident response | 3 | 36 | $3,600 |
| Backup management | 1 | 12 | $1,200 |
| Performance optimization | 2 | 24 | $2,400 |
| Total | 8 hrs/mo | 136 hrs | $13,600 |
⚠️ Reality check: If you value your time at $100/hr, self-hosting costs $13,600/year in labor.
Time Spent on Cloud (12 months)
| Task | Hours/Month | Annual Hours | Cost @ $100/hr |
|---|---|---|---|
| Initial setup | — | 4 | $400 |
| Monitoring (dashboards) | 0.5 | 6 | $600 |
| Incident response | 0.5 | 6 | $600 |
| Total | 1 hr/mo | 16 hrs | $1,600 |
💡 Cloud saves 120 hours/year — that's 3 weeks of work you can spend building features.
The Break-Even Analysis
When Does Self-Hosting Pay Off?
Scenario 1: Solo Developer ($100/hr value)
Self-hosting costs: $113/mo + $1,133/mo (time) = $1,246/mo
Cloud costs: $400/mo + $133/mo (time) = $533/mo
❌ Cloud is cheaper by $713/month
Scenario 2: Team with DevOps Engineer
Self-hosting costs: $113/mo + $0 (dedicated DevOps) = $113/mo
Cloud costs: $400/mo
✅ Self-hosting saves $287/month ($3,444/year)
Scenario 3: Multiple Apps (5+ services)
Self-hosting costs: $200/mo (larger VPS) + time amortized
Cloud costs: $2,000/mo (5 apps × $400)
✅ Self-hosting saves $1,800/month ($21,600/year)
🔥 Key insight: Self-hosting pays off when you have dedicated DevOps or run multiple apps on shared infrastructure.
What They Don't Tell You About Self-Hosting
The Good
- ✅ 50-70% cost savings at high traffic
- ✅ Full control — No vendor lock-in
- ✅ Predictable costs — No surprise bills
- ✅ Data sovereignty — Keep data in specific regions
- ✅ Learning experience — Deep infrastructure knowledge
The Bad
- ❌ You're on call 24/7 — No managed support
- ❌ Security is your responsibility — Patches, firewalls, SSL
- ❌ No auto-scaling — Traffic spikes require manual intervention
- ❌ Single point of failure — Unless you build HA yourself
- ❌ Slower iteration — Time spent on ops, not features
The Ugly
- 💀 3am server crashes — I had 4 in the first 6 months
- 💀 DDoS attacks — Cost me $200 in bandwidth overages
- 💀 Backup failures — Nearly lost data once (caught it in time)
- 💀 SSL renewal issues — Site went down for 2 hours
- 💀 Kernel panics — Random reboots, lost sessions
My Recommendations by Use Case
Use Cloud If:
- 🚀 You're a startup — Focus on product, not infrastructure
- 📈 Traffic is unpredictable — Need auto-scaling
- 👥 Small team (1-5 people) — No dedicated DevOps
- 💰 Under 100K requests/day — Cost difference is minimal
- 🌍 Global audience — Need edge locations
- ⚡ Fast iteration matters — Ship features > save money
Best platforms: Vercel, Netlify, Render, Railway
Self-Host If:
- 📊 High, predictable traffic — 500K+ requests/day
- 👨💻 You have DevOps skills — Or a dedicated engineer
- 💵 Running multiple apps — Amortize infrastructure costs
- 🔒 Data compliance — GDPR, HIPAA, specific regions
- 🎓 Want to learn — Infrastructure as a skill investment
- ⏰ Long-term project — 1+ year commitment
Best platforms: Hetzner, DigitalOcean, Vultr, OVH
The Hybrid Approach (What I Do Now)
After 1 year, I use a hybrid strategy:
- ☁️ Frontend on Vercel — Fast deploys, edge caching
- 🖥️ API on Hetzner — 70% cost savings
- ☁️ Database on Supabase — Managed backups, scaling
- 🖥️ Background jobs on VPS — Cheap compute
- ☁️ Static assets on Cloudflare R2 — Free egress
✅ Result: 40% cost savings + 80% of cloud convenience
Pro Tips for Self-Hosting
If You Decide to Self-Host:
1. Start with Managed Database
Self-host your app, but use managed PostgreSQL (Supabase, Neon). Database management is the hardest part.
2. Use Infrastructure as Code
# Terraform for reproducible infrastructure
terraform apply
# Ansible for configuration management
ansible-playbook deploy.yml 3. Automate Everything
- Automated backups (daily, tested restores)
- Security updates (unattended-upgrades)
- Monitoring alerts (UptimeRobot, Better Stack)
- SSL renewal (certbot with auto-renew)
4. Plan for Disasters
- 📋 Runbook — Document every procedure
- 💾 Backup strategy — 3-2-1 rule (3 copies, 2 media, 1 offsite)
- 🔄 Disaster recovery — Test restoring from backup monthly
- 📞 On-call rotation — Don't be the only person who can fix issues
5. Monitor Costs Religiously
Self-hosting costs creep up:
- Bandwidth overages
- Backup storage growth
- Additional services (monitoring, logging)
- Scaling to larger VPS tiers
Final Verdict: The Data
| Metric | Self-Hosted | Cloud | Winner |
|---|---|---|---|
| Cost (low traffic) | $84/year | $0/year | ☁️ Cloud |
| Cost (medium traffic) | $576/year | $564/year | ☁️ Cloud (barely) |
| Cost (high traffic) | $1,356/year | $4,800/year | 🖥️ Self-host |
| Setup time | 40 hours | 4 hours | ☁️ Cloud |
| Monthly maintenance | 8 hours | 1 hour | ☁️ Cloud |
| Downtime incidents | 7 (avg 45min) | 2 (avg 10min) | ☁️ Cloud |
| Learning value | High | Low | 🖥️ Self-host |
| Flexibility | Total control | Limited | 🖥️ Self-host |
The Truth About Self-Hosting in 2026
Self-hosting saves money at scale, but costs time and peace of mind.
For most developers and startups, cloud platforms are worth the premium. You pay for:
- ✅ Time to focus on your product
- ✅ Better uptime and reliability
- ✅ Automatic scaling and security
- ✅ Sleep at night (no 3am pages)
Self-host when: You have high traffic (500K+ req/day), dedicated DevOps, or specific compliance needs.
Use cloud when: You're starting out, have variable traffic, or value speed over cost optimization.