Every developer eventually faces this question: should I deploy to a cloud provider or host it myself? The answer has changed significantly over the past few years. Cloud pricing has increased, self-hosting tools have matured, and the calculus is no longer as one-sided as it was when AWS was the obvious default for everything.
This is a practical comparison for indie developers and small teams. Not for enterprises running global infrastructure -- for people building side projects, SaaS products, and personal tools who want to make an informed decision about where their money goes.
The Real Cost of Cloud
Cloud providers are convenient, but the costs add up in ways that are not always obvious at the start. A typical small project on AWS or GCP might look like this:
| Service | Monthly Cost |
|---|---|
| EC2 / Compute Engine (small instance) | $15 - $40 |
| RDS / Cloud SQL (small database) | $15 - $30 |
| S3 / Cloud Storage (50 GB) | $1 - $3 |
| Data transfer (50 GB outbound) | $4 - $9 |
| Load balancer | $16 - $25 |
| Domain + SSL (via Route 53 / Cloud DNS) | $1 - $2 |
| Total | $52 - $109/month |
That is $624 to $1,308 per year for a small project. And the costs scale with usage -- a traffic spike can produce a surprise bill. Managed databases in particular are expensive for what they provide. A $30/month RDS instance is running on hardware that would cost $5/month if you managed it yourself.
The hidden cost is complexity. IAM roles, VPC configuration, security groups, CloudWatch alerts, billing dashboards. Cloud providers offer hundreds of services, and navigating them requires significant expertise. The "just deploy it" promise often becomes weeks of configuration.
The Real Cost of Self-Hosting
Self-hosting has gotten dramatically easier. A VPS from providers like Hetzner, OVH, or Contabo gives you dedicated resources at a fraction of cloud prices:
| Provider | Specs | Monthly Cost |
|---|---|---|
| Hetzner CX22 | 2 vCPU, 4 GB RAM, 40 GB SSD | ~$4 |
| Hetzner CX32 | 4 vCPU, 8 GB RAM, 80 GB SSD | ~$7 |
| Hetzner CAX21 (ARM) | 4 vCPU, 8 GB RAM, 80 GB SSD | ~$6 |
| OVH Starter VPS | 2 vCPU, 4 GB RAM, 80 GB SSD | ~$6 |
For $7/month you get a server that can comfortably run a web application, a database, and a reverse proxy. The same workload on AWS would cost 5-10x more.
But self-hosting has its own costs:
- Time. Initial setup takes hours, not minutes. You need to configure the OS, set up a firewall, install dependencies, configure TLS certificates, and set up backups.
- Maintenance. Security updates, disk space monitoring, log rotation, certificate renewal. Someone needs to keep the lights on.
- Reliability. A single VPS has no built-in redundancy. If the hardware fails, your site is down until the provider fixes it.
- Backups. You are responsible for backing up your data. This is critical and easy to forget until it is too late.
The Middle Ground: Static Hosting
There is a third option that is often overlooked: if your application is a static site or client-side tool, you can host it for free or nearly free.
- GitHub Pages -- free for public repositories, custom domain support, automatic HTTPS
- Cloudflare Pages -- free tier with generous limits, global CDN, automatic builds
- Netlify -- free tier, form handling, serverless functions
For client-side developer tools -- Base64 encoders, hash generators, JSON formatters -- static hosting is the clear winner. Zero cost, global CDN, no server to maintain. The only requirement is that your tool runs entirely in the browser.
This is a compelling reason to build tools as static sites when possible. Move the logic to the client, and your hosting cost drops to zero.
Decision Framework
After years of trying different approaches, here is how I decide:
Use static hosting when: your project is a static website, client-side tool, or documentation site. There is no reason to pay for a server when the browser can do the work.
Use a VPS when: you need a backend, a database, or long-running processes, and you are comfortable with basic Linux administration. The cost savings are substantial and you have full control.
Use cloud providers when: you need auto-scaling, managed services for compliance reasons, or your team lacks the expertise to manage infrastructure. The premium is the price of convenience and delegation.
My Setup
For my own projects, I use a hybrid approach. Static tools and portfolio sites go on free static hosting. Projects that need a backend run on a single VPS. I only reach for cloud providers when a specific managed service (like S3 for file storage) offers clear value that would be impractical to replicate.
The total cost for hosting everything: under $15/month. The same setup on AWS would easily be $100+.
The right answer depends on your specific situation -- your budget, your skills, and your tolerance for operational work. But it is worth running the numbers before defaulting to a cloud provider. The savings might surprise you.