Infrastructure Economics
What's the cheapest way to run your stack at each stage of the business?
The answer changes as revenue changes. Pre-revenue and post-product-market-fit have different cost structures. The mistake is optimizing for the wrong stage.
The Spectrum
CHEAPEST MOST MANAGED
│ │
▼ ▼
Bare Metal → VPS → Self-Managed Cloud → Managed PaaS → Serverless
(Hetzner (Hetzner (AWS/GCP/Azure) (Vercel, (Lambda,
dedicated) Cloud) Railway) Cloudflare
Workers)
| Tier | Monthly cost (comparable spec) | You manage | They manage | Best for |
|---|---|---|---|---|
| Bare metal | €40-80/month | Everything | Power, network | High-compute workloads, ML training |
| VPS | €4-20/month | OS, runtime, deploys | Hardware, network | Solo dev, CI runners, databases |
| Self-managed cloud | $50-500/month | Architecture, scaling | Infrastructure | Teams with ops skills |
| Managed PaaS | $0-50/month | Code only | Everything else | Ship fast, pay per use |
| Serverless | $0-20/month | Functions only | Everything | Event-driven, low-traffic |
Decision by Stage
Pre-revenue (proving demand)
Goal: Minimize fixed costs. Maximize speed to first user.
| Need | Choice | Cost | Why |
|---|---|---|---|
| Web app hosting | Vercel free tier | $0 | Deploy on push, preview per PR |
| Database | Supabase/Neon free tier | $0 | Postgres, auth, realtime included |
| Auth | Clerk free tier | $0 | First 10K MAU free |
| CI/CD | GitHub Actions free tier | $0 | 2,000 min/month |
| Domain | Already owned | $0 | |
| Total | $0/month |
First customers ($1-1K MRR)
Goal: Reliability matters now. Paying users expect uptime.
| Need | Choice | Cost | Why |
|---|---|---|---|
| Web app | Vercel Pro | $20/month | No cold starts, analytics |
| Database | Supabase Pro | $25/month | Daily backups, 8GB |
| Auth | Clerk Pro | $25/month | Org support, SSO |
| CI/CD | GitHub Actions + optimization | $0-4/month | Fit in free tier with path filters |
| Monitoring | PostHog free | $0 | Product analytics |
| Total | $70-74/month |
Scaling ($1K-10K MRR)
Goal: Cost efficiency. Revenue should outpace infrastructure.
This is where the VPS option becomes compelling. A single Hetzner CX22 (~€4/month, 2 vCPU, 4GB RAM) can run:
- A self-hosted CI runner (unlimited minutes)
- A staging environment
- Cron jobs and background workers
- Monitoring dashboards
The Pieter Levels approach: one server, cron jobs for automation, healthcheck pages for monitoring, Telegram alerts for incidents. Simple systems that a solo developer can maintain.
CI Runner Economics
As of March 2026, GitHub charges a $0.002/min platform fee for self-hosted runners on private repos.
| Option | Compute cost | Platform fee | Total at 2,000 min/month |
|---|---|---|---|
| GitHub-hosted (free tier) | $0 | $0 | $0 (limit: 2,000 min) |
| GitHub-hosted (Pro) | $4/month | $0 | $4 (limit: 3,000 min) |
| Hetzner VPS + self-hosted | ~€4/month | $4/month | ~€8/month (unlimited) |
| Gitea (self-hosted, all) | ~€4/month | $0 | ~€4/month (no GitHub) |
| nektos/act (local) | $0 | $0 | $0 (no PR integration) |
The optimization path: Fit in free tier first (path filters, nx affected, E2E on main only). Self-host only when free tier can't cover the workload. See CI Cost Economics for the optimization playbook.
The Levels Principle
Pieter Levels runs multiple profitable products from a single VPS. The pattern:
- One box — VPS with everything on it. No microservices, no orchestration
- Cron jobs — Scheduled tasks replace most "infrastructure"
- Healthcheck pages — One URL that runs all critical checks, returns green/red
- Uptime monitoring — External service pings the healthcheck every minute
- Alerts to phone — Telegram bot for incidents
This works because most solo/small-team products don't need horizontal scaling. A single server handles thousands of concurrent users. The complexity of distributed systems costs more in maintenance than the scaling it enables — until it doesn't.
When to leave the single box: When traffic patterns require geographic distribution, or when a single failure takes down everything and the business can't afford downtime.
Context
- Dev Ops — CI/CD pipeline design, cost optimization
- Cloud Orchestration — Cloud provider comparison
- Testing Platform — Testing trophy, confidence per dollar
- Tech Stack Decisions — Decision process and checklist
- Pieter Levels — Solo dev philosophy
Links
- GitHub Actions Cost Reduction — Practical optimization guide
- GitHub Actions Monorepo Guide — Nx + pnpm + caching
- Hetzner Cloud GitHub Runners — Self-hosted setup
- Slash CI Bills with Hetzner — Real cost comparison
- GitHub Self-Hosted Runner Pricing — March 2026 changes
- Coolify — Self-hosted PaaS alternative
- Gitea — Self-hosted Git + CI
Questions
At what monthly revenue does it make sense to leave free tiers and own your infrastructure?
- What's the real cost of "free" — vendor lock-in, rate limits, cold starts, feature gates?
- If your VPS goes down at 3am and you're the only operator, what's the recovery plan?
- What would Pieter Levels cut from your current infrastructure bill?