How Much Does a PostgreSQL Database Actually Cost?
What a PostgreSQL database really costs in 2026: self-hosted on a VPS vs managed (Supabase, Neon, RDS), with real numbers and the hidden costs.
The honest cost of PostgreSQL in 2026: from $0 on your own VPS to $100+/month managed. What you actually pay for, and the hidden costs nobody lists.
The two ways to pay
- Self-hosted on a VPS — the database engine is free; you pay for the box and your ops time.
- Managed — a vendor runs it; you pay a monthly fee plus storage/IO/connection pricing.
PostgreSQL itself is $0 either way — this is a comparison of operations, not license.
Self-hosted: real numbers (on a shared VPS)
Your app VPS already pays for the box; Postgres just uses its RAM/disk:
| Setup | Box | DB cost |
|---|---|---|
| Small app + Postgres share a CX22 (4 GB) | $4.49 | $0 (shared) |
| Dedicated DB box (CX22) | $4.49 | ~$4.49 |
| Dedicated DB for heavier data (CX32, 8 GB) | $8.49 | ~$8.49 |
| + NVMe volume (100 GB) | +$5–6 |
Verified (2026-08): Hetzner CX22 = $4.49, CX32 = $8.49, 100 GB volume ≈ $5.50.
Hidden costs of self-hosting: your time for upgrades (minor versions), pg_dump backups, monitoring disk, and restoring when something breaks. Estimated: 2-4 hours/month of ops.
Managed: real numbers (verified 2026-08 pricing)
| Provider | Entry | What you get | Notable pricing |
|---|---|---|---|
| Supabase | $25/mo Pro | 8 GB DB, autoscaling, dashboard, auth | Inactive project pauses after 1 week! |
| Neon | $19/mo Launch | 10 GB, branching, autoscaling compute | Storage +$3.50/GB extra |
| RDS (AWS) | ~$15/mo | t3.micro 2GB, 20GB gp3 | +IO +snapshots billed separately |
| DigitalOcean Managed | $15/mo | 1 GB RAM, 10 GB | +$1.28/GB storage |
| Cloud SQL (GCP) | ~$30/mo | micro instance | Smallest useful config |
Entry costs are $15–30/month — and the smallest tier on every provider is too small for a real workload. The “useful” configuration (4 GB RAM, 50 GB) lands at $40–80/month.
The real comparison table
| Self-hosted (CX22) | Managed (Supabase/Neon) | |
|---|---|---|
| Monthly base | $4.49 | $25–40 |
| Backups | Your script (~1h setup) | Built-in |
| Scaling | Buy bigger box | Autoscale (pricey) |
| High availability | DIY (replica/failover) | Built-in (usually) |
| Migrations | You | You (same SQL) |
| Exit | Move the dump anywhere | Export + move (easy for Supabase/Neon — pure Postgres) |
| Pause/risk | Never | Supabase pauses inactive projects |
The cost curve (real workloads)
| Workload | Self-hosted/mo | Managed/mo |
|---|---|---|
| Hobby (100 MB) | $4.49 | $0 (free tier) |
| Side project (1 GB) | $4.49 | $19–25 |
| Product (10 GB, 1M rows) | $8.49 | $40–70 |
| Serious (50 GB, reporting) | $17 (CX32 + volume) | $80–150 |
Self-hosting wins on cost at every non-zero scale; managed wins on your time and sleep.
The decision that actually matters
- Choose managed when: you’d otherwise skip backups, your time is billable, or you need point-in-time recovery/HPA without studying it.
- Choose self-hosted when: you run a budget operation, you’re comfortable with pg_dump + a cron, and a couple of hours of setup saves you $300/year per project.
Our recommendation
Our recommendation for most readers: start free-tier managed (Supabase/Neon free), move to self-hosted on your own VPS the moment the free tier starts hurting. At ~$8 a month on a dedicated CX box you match managed pricing while owning the data entirely.
Common problems
- The free tier that pauses: Supabase pauses inactive projects after 7 days — a surprise 20-second cold start on first visit every week.
- “Storage is cheap”: managed storage overages ($3.50/GB on Neon) sneak into bills faster than compute.
- One-click backup is not a backup: test the restore, on self-hosted and managed.