Cost Engineering: Running 28 Production Services for $31/Month
The Bill
Let's start with the numbers:
| Item | Monthly Cost | Notes |
|---|---|---|
| VPS | $30 | PureVoltage, 4C/8G, Ubuntu 22.04 |
| Domain | ~$0.08 | tianlizeng.cloud, registered with Cloudflare |
| Total | ~$31 |
No Vercel Pro, no AWS Lambda, no Supabase, no Render. Every service runs on one machine.
How 28 Services Fit on a Single VPS
systemd Services (24)
Grouped by purpose:
- Web apps (6): personal site, dashboard, docs site, n8n, proxy manager, status page
- API services (4): irrigation calculator, search, contact form, webhook receiver
- Automation (8): briefing generation, data sync, certificate renewal, log rotation, backup, etc.
- Infrastructure (6): Nginx, Node.js runtime, Python services, monitoring, etc.
Each service is its own systemd unit — auto-restart on crash, logs go to journald.
Docker Containers (4)
Services that need environment isolation run in Docker: n8n (workflow engine), Uptime Kuma (status monitoring), and a couple others.
Key Decisions
Why Not Serverless
- Predictable latency: Node.js processes on a VPS stay resident in memory — no cold starts
- Predictable cost: $30/month flat, no surprise bill from a traffic spike
- Full observability:
journalctl -u xxxshows the logs — no CloudWatch needed - SSH access: When something breaks, log in and investigate directly instead of guessing
The Power of Cloudflare's Free Tier
- DNS + CDN: Global edge network, free
- SSL: Origin Certificate, free and automatic
- CF Access: Zero-trust authentication, no need to roll your own login system
- Origin Rules: Route to port 8443, with Nginx as the unified entry point
Nginx as the Unified Gateway
All services are exposed through an Nginx reverse proxy on a single port 8443. Subdomains route to different upstreams:
docs.tianlizeng.cloud → localhost:3001
status.tianlizeng.cloud → localhost:3002
n8n.tianlizeng.cloud → localhost:5678
Resource Usage
Actual utilization on the 4C/8G box:
- CPU: 5-10% on typical days, peaks around 60% during builds
- Memory: 3.2 GB resident, with 4.8 GB headroom
- Disk: 18 GB used out of 40 GB
- Network: ~2 GB outbound per day
Scaling Plan
When one VPS isn't enough:
- Vertical: Bump to 8C/16G (about $60/month) — covers most scenarios
- Horizontal: Move compute-heavy services (builds) to a second box
- Cloud services as last resort: Only when a single service genuinely needs elastic scaling
Takeaway
Indie developers don't need "cloud-native." A single VPS plus Cloudflare's free tier is enough to build a reliable production environment. The point isn't picking the most cutting-edge stack — it's that every dollar lands where it earns its keep.