A production Django deployment — Gunicorn behind Nginx, self-hosted Postgres — runs $12/month on a 1 vCPU / 2 GB VPS. A managed Postgres add-on brings that to $27; the closest PaaS equivalent runs about $32. The cheapest VPS tier ($4/month) can't run it at all — the worker math alone exceeds its available RAM.
Key takeaways
- Worker count decides RAM, not traffic. Gunicorn's own formula — (2 × vCPU) + 1 — sets your memory floor before you've written a line of view code.
- The cheapest VPS tier structurally fails. $4/month buys 512 MB; a 1 vCPU worker set plus OS overhead already needs 900 MB.
- Self-hosted Postgres costs $0 extra — it costs roughly 400 MB of headroom instead, which is fine once you're on a $12+ tier.
- Managed Postgres isn't the expensive part of a PaaS bill. Compared against a VPS with the same $15 Postgres add-on, the PaaS premium shrinks to about $5/month.
- Shared hosting isn't a cost decision at all. Django needs a persistent process and usually root access — most shared hosting provides neither, regardless of price.
What was modelled
This is a model built from Gunicorn's own worker-count guidance and published list pricing, not a measurement from a production account — stated plainly, the same way the cost calculator on this site discloses its assumptions. Every number below is reproducible from the formula, not proprietary data.
| Assumption | Value |
|---|---|
| Worker formula | (2 × vCPU) + 1 |
| RAM per worker | ~200 MB |
| OS + Nginx baseline | ~300 MB |
| Self-hosted Postgres baseline | ~400 MB |
| Managed Postgres add-on | $15/mo (entry tier) |
The 200 MB-per-worker figure is a stated assumption, not a universal constant — it's a reasonable settle point for a Django app carrying Django REST Framework, Pillow and a handful of ordinary dependencies, measured with a warm process under load. An app doing heavier per-request work (large ORM query sets held in memory, in-process image processing) will sit higher. Measure yours with ps or docker stats before trusting any of the totals below at the edge of a tier.
The shared-hosting ceiling
A 1 vCPU box runs 3 Gunicorn workers by the standard formula — 600 MB, plus roughly 300 MB for the OS and a reverse proxy, comes to 900 MB. That's already more than the 512 MB the cheapest VPS tier provides, before Postgres is even part of the conversation. Shared hosting fails for a structural reason on top of that: it rarely offers the persistent process or root access Django's WSGI server needs to run at all.
The self-hosted Postgres bill
Running Postgres on the same box as your app costs nothing extra in dollars — it costs memory instead, roughly 400 MB for a small database's default-ish working set. Whether that fits depends entirely on which VPS tier you're already on for Gunicorn.
| VPS tier | Workers | RAM needed | Fits? | Monthly cost |
|---|---|---|---|---|
| 1 vCPU / 512 MB | 3 | 1,300 MB | No | — |
| 1 vCPU / 2 GB | 3 | 1,300 MB | Yes | $12.00 |
| 2 vCPU / 4 GB | 5 | 1,700 MB | Yes | $24.00 |
| 4 vCPU / 8 GB | 9 | 2,500 MB | Yes | $48.00 |
The 1 vCPU / 2 GB tier is the realistic floor. It clears the self-hosted total with 748 MB to spare — enough headroom to raise Postgres's shared_buffers past its bare-minimum default without immediately planning a resize.
The managed Postgres add-on bill
Add a managed Postgres instance instead of self-hosting and the VPS tier requirement doesn't change — you were never memory-constrained by Postgres on the 2 GB tier to begin with. What changes is a flat $15/month for automated backups, failover, and no shared CPU between your app and your database.
| VPS tier | VPS | Managed Postgres | Total |
|---|---|---|---|
| 1 vCPU / 2 GB | $12.00 | $15.00 | $27.00 |
| 2 vCPU / 4 GB | $24.00 | $15.00 | $39.00 |
| 4 vCPU / 8 GB | $48.00 | $15.00 | $63.00 |
Bar length = VPS + managed Postgres add-on cost. List pricing August 2026.
The PaaS bill
The entry-level PaaS web service tier — $7/month, roughly 512 MB / 0.5 vCPU on the providers checked — hits the same structural ceiling as the cheapest VPS: it can't fit even 3 Gunicorn workers alongside the platform's own overhead. The tier that can, at 2 GB / 1 vCPU, runs about $25/month; add a paid Postgres instance at roughly $7/month and the realistic PaaS total lands near $32/month.
Where the real cost gap sits
PaaS looks roughly 2.7× more expensive than self-hosting until you compare it against the right thing. Against a bare self-hosted VPS at $12, the $32 PaaS bill looks steep. Against a VPS carrying the same $15 managed-Postgres add-on — $27 — the gap is $5. Most of a PaaS premium is the database management fee you'd pay anyway, not the convenience of not managing a server.
How to run this for your own app
Four steps, about fifteen minutes, using numbers you measure rather than assume.
- Count your vCPUs and apply the worker formula. (2 × cores) + 1 synchronous workers is Gunicorn's own starting recommendation.
- Measure RAM per worker under load. Don't reuse the 200 MB figure above blind — run your app with realistic concurrency and read it off ps or docker stats.
- Decide self-hosted or managed Postgres. Self-hosted trades roughly 400 MB of headroom for $0; managed trades a flat monthly fee for that headroom back plus backups and failover.
- Match the total to a VPS tier. Pick the smallest tier that clears worker RAM + OS overhead + Postgres overhead (if self-hosting) with room to spare — not the tier that just barely fits today.
- Gunicorn worker
- A separate OS process Gunicorn forks to handle requests, each running its own copy of your Django application in memory. More workers mean more concurrent requests handled, at the cost of RAM multiplied by worker count — which is why the worker formula, not the framework, is what actually sets your hosting floor.
Which one to pick
- Comfortable running your own database: self-hosted Postgres on a 1 vCPU / 2 GB VPS at $12/month is the real production floor, not a compromise.
- Want backups and failover without managing them: add the $15 managed Postgres tier — $27/month total, and you're not paying a platform premium on top.
- No time for either server or database administration: a PaaS at ~$32/month is a legitimate purchase, and per the gap above, a smaller one than it first looks.
- Evaluating shared hosting to save money: don't. The worker math fails before the Postgres question is even relevant.