Self-Hosted vs Cloud: The True Cost Comparison in 2026 (With Real Numbers)
The "cloud vs self-hosted" debate has been ongoing for over a decade. Cloud providers promise scalability and convenience. Self-hosting advocates promise control and cost savings. But in 2026, with cloud prices rising and hardware getting cheaper, the math has changed.
We did a real cost comparison — not theoretical, but based on actual deployments. Here are the numbers.
The Setup
We compared five common workloads:
- Static website + API (low traffic, ~10k visitors/day)
- PostgreSQL database (100GB, moderate IOPS)
- Container orchestration (5 microservices, auto-scaling)
- Object storage (500GB files, moderate CDN traffic)
- Full LAMP stack application (web app + DB + cache)
For each workload, we compared:
- Self-hosted on a rented dedicated server (Hetzner EX44, €39/month)
- AWS (us-east-1, on-demand pricing)
- GCP (us-central1, on-demand pricing)
- Azure (East US, pay-as-you-go)
Prices are as of July 2026. We assumed 3-year hardware lifecycle for self-hosting.
Workload 1: Static Website + API
Requirements: Nginx serving static files, Node.js API, SSL, 10k visitors/day, 5GB bandwidth/month.
| Platform | Monthly Cost | Notes | |----------|-------------|-------| | Self-hosted (Hetzner) | $7 (shared VPS) | Plenty of headroom | | AWS (EC2 t3.micro + CloudFront) | $23 | Includes data transfer | | GCP (e2-micro + Cloud CDN) | $21 | Similar to AWS | | Cloudflare Pages + Workers | $5 | Best for this workload | | DigitalOcean Droplet ($6) | $6 | Simple, good value |
Winner: Cloudflare or self-hosted. Cloud costs 3-5x more for simple workloads.
Key insight: For static sites and simple APIs, cloud providers are significantly overpriced. A $6 VPS or even Cloudflare's $5 plan handles this easily.
Workload 2: PostgreSQL Database
Requirements: 100GB storage, 4GB RAM, moderate IOPS (~1000), daily backups.
| Platform | Monthly Cost | Notes | |----------|-------------|-------| | Self-hosted (dedicated server) | $0 (included in server) | Run alongside other services | | AWS RDS (db.t3.medium) | $58 | Includes storage + backups | | GCP Cloud SQL | $55 | Comparable to AWS | | Azure Database | $57 | Comparable | | Managed (Neon, Supabase) | $0-25 | Generous free tiers |
Winner: Self-hosted or managed Postgres services (Neon, Supabase). AWS RDS is expensive for what you get.
Key insight: Managed database services charge a 3-4x premium over running Postgres yourself. The convenience is real, but the markup is steep.
Workload 3: Container Orchestration
Requirements: 5 microservices, auto-scaling, load balancing, 50GB container images.
| Platform | Monthly Cost | Notes | |----------|-------------|-------| | Self-hosted (K3s on dedicated server) | $45 | Hetzner EX44, includes everything | | AWS EKS (3x t3.medium) | $155 | Includes EKS control plane + nodes | | GCP GKE (3x e2-medium) | $142 | Slightly cheaper than EKS | | Azure AKS (3x B2s) | $148 | Comparable | | DigitalOcean Kubernetes | $72 | Simpler, cheaper |
Winner: Self-hosted by a wide margin. Cloud Kubernetes is expensive.
Key insight: Kubernetes on cloud providers is where costs explode. The control plane alone costs $73/month on EKS. Self-hosted K3s gives you the same functionality for $0 extra.
The trade-off: Self-hosted means you handle upgrades, monitoring, and security. This takes 4-8 hours/month of maintenance time. If your time is worth $50/hour, that's $200-400/month in labor — which narrows the gap significantly.
Workload 4: Object Storage
Requirements: 500GB storage, 100GB/month CDN traffic.
| Platform | Monthly Cost | Notes | |----------|-------------|-------| | Self-hosted (MinIO on server) | $0 (included) | Part of existing server | | AWS S3 (Standard) + CloudFront | $38 | $12 storage + $26 transfer | | GCP Cloud Storage + CDN | $35 | Similar to AWS | | Cloudflare R2 | $10 | No egress fees! | | Backblaze B2 + Cloudflare CDN | $8 | Cheapest paid option |
Winner: Cloudflare R2 or Backblaze B2. AWS S3 egress fees are brutal.
Key insight: Object storage is where cloud providers really get you. Storage is cheap, but egress bandwidth is marked up 10-20x over actual cost. Cloudflare R2 eliminates egress fees entirely.
Workload 5: Full Application Stack
Requirements: Web app, PostgreSQL, Redis cache, background workers, 50k visitors/day.
| Platform | Monthly Cost | Notes | |----------|-------------|-------| | Self-hosted (Hetzner dedicated) | $45 | Single server handles everything | | AWS (EC2 + RDS + ElastiCache) | $230+ | Multiple managed services | | GCP (Compute + Cloud SQL + Memorystore) | $215+ | Comparable to AWS | | DigitalOcean (Droplet + Managed DB) | $90 | Good middle ground | | Railway / Render | $60-100 | PaaS simplicity |
Winner: Self-hosted or DigitalOcean. Cloud provider costs multiply quickly when you add managed services.
The Grand Total
Running all 5 workloads:
| Platform | Monthly Cost | Annual Cost | |----------|-------------|-------------| | Self-hosted (1 dedicated server) | $45 | $540 | | AWS | $504+ | $6,048+ | | GCP | $468+ | $5,616+ | | Azure | $475+ | $5,700+ | | Hybrid (best of each) | $50-80 | $600-960 |
Cloud providers cost 8-11x more than self-hosting for these workloads.
The Hidden Costs of Self-Hosting
The raw numbers favor self-hosting dramatically, but they don't tell the full story.
1. Your Time
Self-hosting requires maintenance:
- Security updates: 2-4 hours/month
- Monitoring and alerts: Setup + ongoing
- Troubleshooting: Variable, unpredictable
- Backups and disaster recovery: Must configure and test
Estimated labor cost: $200-500/month (at $50/hour)
2. Downtime Risk
Cloud providers offer 99.99% uptime SLAs. A single dedicated server has no redundancy. If your server dies, you're down until the provider replaces the hardware.
Mitigation: Use two smaller servers instead of one large one, with automated failover. This roughly doubles your hosting cost but still comes out cheaper than cloud.
3. Scaling Limitations
Self-hosted servers have fixed capacity. If traffic spikes 10x overnight, you can't auto-scale. Cloud providers handle this automatically.
Reality check: Most applications never need to auto-scale. If your traffic is predictable (and most is), a fixed server is fine.
4. Security Responsibility
On cloud providers, the provider secures the infrastructure. On self-hosted, you handle everything: firewall, DDoS protection, OS patches, intrusion detection.
Mitigation: Use Cloudflare (free tier) in front of your server for DDoS protection and WAF. Keep your OS updated. Use SSH keys, not passwords.
When Self-Hosting Makes Sense
- Predictable workloads. If your traffic doesn't spike wildly, a dedicated server is perfect.
- You have DevOps skills. If you can manage a Linux server, self-hosting is dramatically cheaper.
- Privacy matters. Self-hosting gives you complete data control.
- You're building a product. Early-stage startups should minimize cloud spend.
- You're outside the US/EU. Cloud pricing is often higher in other regions; self-hosting with a local provider can be even more cost-effective.
When Cloud Makes Sense
- Unpredictable traffic. Auto-scaling is worth paying for.
- Small team, no DevOps. Managed services save hiring a dedicated sysadmin.
- Compliance requirements. HIPAA, SOC 2, FedRAMP — cloud providers have certifications you'd spend months achieving.
- You need global edge presence. Cloudflare Workers and CDN are hard to replicate self-hosted.
- Your team uses cloud-native tools. If everything is built around AWS services, migrating to self-hosted is expensive.
The Optimal Strategy: Hybrid
The smartest approach we've seen in 2026:
- Self-host your databases and compute on a dedicated server (Hetzner, OVH, or local provider)
- Use Cloudflare (free plan) for CDN, DNS, DDoS protection, and SSL
- Use Cloudflare R2 for object storage (no egress fees)
- Use Cloudflare Workers for edge logic and API acceleration
- Keep a cloud provider only for specific managed services you can't self-host
This hybrid approach gives you cloud-level reliability at 1/5th the cost.
Conclusion
The cloud revolution promised cheaper, simpler infrastructure. For many workloads in 2026, that promise hasn't been delivered. Cloud pricing has increased, egress fees remain exorbitant, and managed service markups are steep.
Self-hosting isn't free — it costs time and adds operational complexity. But the financial savings are enormous: 8-11x cheaper for typical workloads.
If you have the skills to manage a Linux server (or are willing to learn), self-hosting is the most cost-effective infrastructure strategy in 2026. For everyone else, a hybrid approach gives you 80% of the savings with 20% of the effort.
Don't take our word for it. Run the numbers for your own workloads. You might be surprised by how much you could save.