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.

Listen to this article4 min audio summary · AI voice
Read the script

This is a spoken summary of the guide to Django hosting cost. The formula, the assumptions, the cost tables and the four-step method are on the page.

The short answer. A production Django deployment, with Gunicorn behind Nginx and self-hosted Postgres, runs twelve dollars a month on a one V C P U, two gigabyte V P S. A managed Postgres add-on brings that to twenty-seven. The closest P A A S equivalent runs about thirty-two. The cheapest V P S tier, at four dollars, can't run it at all, because the worker memory alone exceeds its RAM.

This is a model, not a measurement from a production account. It is built from Gunicorn's own worker guidance and published list pricing, checked in August twenty twenty-six, so every number is reproducible from the formula. This article contains affiliate links, but compares providers on modelled cost only.

The assumptions. The worker formula is two times V C P Us, plus one. Each worker takes about two hundred megabytes. The operating system and Nginx take about three hundred. Self-hosted Postgres takes about four hundred. And a managed Postgres add-on costs fifteen dollars a month. The two hundred megabyte figure is an assumption, not a constant, so measure your own app before trusting totals near the edge of a tier.

Worker count decides RAM, not traffic. A one V C P U box runs three workers, six hundred megabytes, plus about three hundred for the system, so nine hundred. That is already more than the five hundred twelve megabytes of the cheapest tier. Shared hosting fails for a structural reason too: it rarely offers the persistent process or root access Django needs.

Self-hosted Postgres costs no extra dollars. It costs about four hundred megabytes of memory instead. On DigitalOcean list pricing: a one V C P U, five hundred twelve megabyte plan needs thirteen hundred megabytes and doesn't fit. One V C P U and two gigabytes fits for twelve dollars. Two V C P Us and four gigabytes, with five workers, fits for twenty-four. Four V C P Us and eight gigabytes, with nine workers, fits for forty-eight. The two gigabyte tier is the realistic floor.

Managed Postgres adds a flat fifteen dollars for backups, failover and no shared C P U. So twelve becomes twenty-seven, twenty-four becomes thirty-nine, and forty-eight becomes sixty-three.

The P A A S bill. The seven dollar entry tier hits the same ceiling as the cheapest V P S. The tier that fits, at two gigabytes, runs about twenty-five dollars, and a paid Postgres at about seven brings it near thirty-two. P A A S pricing moves faster than V P S pricing, and published figures for the same tier disagreed by as much as two times, so treat twenty-five to thirty-two as a starting estimate.

Where the real gap is. P A A S looks about two point seven times more expensive than self-hosting, until you compare it with the right thing. Against a V P S carrying the same fifteen dollar managed database, at twenty-seven, the gap is five dollars. Most of a P A A S premium is the database management fee you'd pay anyway.

To run it for your own app: count your V C P Us and apply the worker formula, measure RAM per worker under load, decide self-hosted or managed Postgres, and pick the smallest tier that clears workers, system overhead and Postgres with room to spare.

Which to pick. Comfortable with your own database: self-hosted on the two gigabyte tier at twelve dollars. Want backups and failover handled: add managed Postgres, twenty-seven total. No time for server or database administration: a P A A S at about thirty-two is a legitimate purchase, and a smaller premium than it looks. Shared hosting to save money: don't.

Costs are modelled. Latency and cold-start figures haven't been measured, and none are published until the test rig has been run.

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.
Hosting · Cost analysis

Django on a VPS: self-hosted vs managed Postgres

VPS onlyVPS + managed Postgres
1 vCPU / 2 GB+$15/mo managed Postgres
VPS only $12.00VPS + managed Postgres $27.00
2 vCPU / 4 GB+$15/mo managed Postgres
VPS only $24.00VPS + managed Postgres $39.00
4 vCPU / 8 GB+$15/mo managed Postgres
VPS only $48.00VPS + managed Postgres $63.00
DigitalOcean list pricing, August 2026. A 1 vCPU / 512 MB droplet does not fit: three workers need 1,300 MB.
Disclosure: some hosting links in this article are affiliate links. This article compares providers on modelled cost only. No provider reviewed here was given advance sight of the results, and no placement was paid for.

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.

Assumptions held constant across every configuration, checked August 2026.
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.

Self-hosted Postgres, DigitalOcean Droplet list pricing, August 2026.
VPS tier Workers RAM needed Fits? Monthly cost
1 vCPU / 512 MB31,300 MBNo—
1 vCPU / 2 GB31,300 MBYes$12.00
2 vCPU / 4 GB51,700 MBYes$24.00
4 vCPU / 8 GB92,500 MBYes$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 (roughly matching DigitalOcean's own managed Postgres entry tier) for automated backups, failover, and no shared CPU between your app and your database.

VPS + managed Postgres add-on, August 2026 list pricing.
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
modelled cost · self-hosted vs managed pg add-on
1 vCPU / 2 GB$27 / $12
2 vCPU / 4 GB$39 / $24
4 vCPU / 8 GB$63 / $48

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.

Verify before you commit. PaaS pricing moves faster than VPS pricing — one provider checked here changed its plan structure in April 2026, and published third-party figures for the same tier disagreed by as much as 2×. Treat the $25-32 range as a starting estimate and confirm against the provider's own current pricing page, the same caveat this site's cost calculator carries for every provider.

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.

  1. Count your vCPUs and apply the worker formula. (2 × cores) + 1 synchronous workers is Gunicorn's own starting recommendation.
  2. 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.
  3. 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.
  4. 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.
Costs are modelled; latency is not yet measured. Every figure above derives from Gunicorn's published worker guidance and dated list pricing — reproducible today. Request-latency and cold-start figures for Django specifically are a separate exercise, and none are published on this site until the test rig has actually been run.
Choosing between frameworks, not just tiers? The hosting pillar guide has the full decision path — shared vs VPS vs managed vs static — across every stack this site covers.
Related: Running a Next.js app instead? The same method is applied in the Next.js hosting cost comparison. Weighing an unmanaged server? See managed vs unmanaged VPS cost.

Badri Dutta

Software engineer · 20 years building for the web

20 years building for the web and 8 doing technical SEO, now working with Java, Python and AWS in production. These comparisons exist because the ones already online were written by people who never ran the arithmetic they were describing.

Full background →