$osscostcalc.comSelf-hosting cost intelligence

Supabase Self-Hosted vs Managed: When Each Actually Wins

10 min read·1,720 words·Comparison

TL;DR

Managed Supabase wins below roughly 50k MAU or whenever your team lacks a dedicated Postgres babysitter. Self-hosting on a Hetzner CX32 or a $24 DigitalOcean droplet starts paying off once your managed bill crosses ~$100/mo, but Realtime CPU and Storage egress are the two line items that quietly flip the math.

TL;DR

Managed Supabase is cheaper than it looks until you hit the Pro tier's compute add-ons or push real Realtime traffic. Self-hosting the docker-compose stack on a Hetzner CX32 (~€7/mo) or a $24/mo DigitalOcean droplet works well for internal tools, side projects, and B2B SaaS under ~50k MAU, but you absorb the on-call burden for Postgres, PgBouncer, GoTrue, Realtime, and Storage. The deciding factors are almost never raw compute price; they are Postgres connection limits, Realtime CPU per concurrent client, and Storage egress.

What you're actually buying with managed Supabase

Managed Supabase bundles Postgres 15/16, PostgREST, GoTrue (auth), Realtime, Storage (S3-backed), Edge Functions (Deno Deploy-style), and the Studio UI behind a single project. The Free tier gives you a shared 500 MB Postgres database, 1 GB file storage, 5 GB egress, 50k MAU, and pauses the project after a week of inactivity. Pro is $25/project/month and unlocks 8 GB database, 100 GB storage, 250 GB egress, 100k MAU, daily backups for 7 days, and removes the auto-pause.

The $25 number is the bait. The real bill is the compute add-on. The default "Micro" instance behind a Pro project is shared 2-core / 1 GB RAM with a hard cap of around 60 direct Postgres connections and ~200 via the pooler. The moment you outgrow it, you are on a stair-step:

Compute size vCPU / RAM Approx. $/mo Direct conn cap
Micro (default) 2 shared / 1 GB included ~60
Small 2 / 2 GB ~$15 ~90
Medium 2 / 4 GB ~$60 ~120
Large 2 / 8 GB ~$110 ~160
XL 4 / 16 GB ~$210 ~240
2XL 8 / 32 GB ~$410 ~380

Add point-in-time recovery ($100/mo for 7 days), read replicas (a full compute charge per replica), branching ($0.32/branch/hour for the compute), and the per-project $25, and a "Pro" project running a Medium compute with PITR is closer to $185/mo before you ship a single byte over the egress quota.

Egress over the included 250 GB is roughly $0.09/GB. Storage past 100 GB is around $0.021/GB/month. Auth MAU past 100k is about $0.00325/MAU. Edge Functions are billed per invocation past 2M/month (~$2 per additional million) and have a hard 50-second wall-clock and 256 MB memory limit per call.

What self-hosting actually costs

The official supabase/supabase repo ships a docker-compose file that brings up Postgres + PgBouncer-ish (Supavisor), Kong, GoTrue, PostgREST, Realtime, Storage, imgproxy, Studio, and a meta service. On a single VM, expect the idle footprint to be ~2.5 GB RAM and ~5% of two cores before any traffic.

Realistic VM sizing using 2026 list pricing on the providers compared in the osscostcalc calculator:

Provider Plan vCPU / RAM / NVMe Price Good for
Hetzner CX22 2 / 4 GB / 40 GB ~€4.5/mo Dev / staging only
Hetzner CX32 4 / 8 GB / 80 GB ~€7/mo <10k MAU, light Realtime
Hetzner CCX13 (dedicated) 2 / 8 GB / 80 GB ~€13/mo Production, predictable CPU
DigitalOcean Basic Premium AMD 2 / 4 GB / 80 GB $24/mo Small prod, US/EU regions
DigitalOcean General Purpose 4 / 16 GB / 200 GB ~$126/mo Real production w/ Realtime
Linode Shared 4 GB 2 / 4 GB / 80 GB $24/mo Small prod
Linode Dedicated 8 GB 4 / 8 GB / 160 GB $72/mo Prod, consistent CPU

For most teams the sweet spot is one production VM (Hetzner CCX13 or DigitalOcean Premium AMD 4 GB) plus a separate cheap box for nightly pg_dump to off-site S3-compatible storage. Hetzner's Storage Box at €3.20 for 1 TB or Backblaze B2 at $6/TB/mo handles the backup target cheaply.

The headline: a self-hosted stack roughly equivalent to a managed Pro + Medium compute + PITR project is around €13-30/month on Hetzner or $24-72/month on DigitalOcean/Linode. That is a 5-10x cost reduction at the cost of you owning every failure mode.

The four numbers that decide it

1. Postgres connection limits

Every Supabase service opens its own Postgres connections. PostgREST defaults to 10, GoTrue 10, Realtime 10, Storage 5, plus whatever your app uses. Managed Micro's ~60 direct connection cap is gone before you blink, which is why Supabase pushes you onto Supavisor (their pooler) for serverless workloads.

Self-hosting, you set max_connections yourself. A 4 GB VM comfortably runs Postgres with max_connections = 200 and shared_buffers = 1GB. You still want PgBouncer or Supavisor in transaction mode in front of any serverless or edge runtime, but you are not paying $60/mo just to lift the cap from 60 to 120.

2. Realtime CPU cost

Realtime (the Elixir/Phoenix service) is the line item that surprises people. Each connected client holds a websocket and consumes both memory and a slice of CPU on every broadcast. As a rough rule, one shared vCPU sustains ~2-5k idle Phoenix channel clients but only ~500-1,000 with chatty Postgres-changes subscriptions on busy tables.

On managed Supabase, a chat app pushing 50 messages/sec to 2,000 subscribers will pin a Micro compute and force you up to Medium ($60/mo) or Large ($110/mo). On self-hosted, the same workload runs fine on a CCX13 (€13/mo) with room to spare, because you give Realtime dedicated cores instead of sharing them with Postgres.

If your product uses Realtime heavily, self-hosting is the obvious win. If you only use it for the occasional presence indicator, the managed Micro is fine.

3. Storage egress

Supabase Storage proxies through its API and bills egress at managed-cloud rates (~$0.09/GB over the included 250 GB). A modest image-heavy app serving 2 TB/month of thumbnails will run up ~$160/mo in egress alone on top of the base bill.

Self-hosted Storage on Hetzner is the brutal comparison: Hetzner egress is included up to 20 TB/month per VM, then €1/TB. DigitalOcean droplets include 4 TB/mo and bill ~$0.01/GB past that. Linode droplets include 1-5 TB depending on plan. Putting Cloudflare in front of the Storage endpoint (free tier, unmetered egress for cacheable assets) effectively zeroes out this line.

For anything image, video, or download-heavy past ~500 GB/mo egress, self-hosted + Cloudflare is a no-brainer.

4. Edge Functions

Managed Edge Functions are convenient but constrained: 50s wall-clock, 256 MB RAM, 2M free invocations, then ~$2/million. There is no self-hosted Edge Functions runtime that matches the managed dev loop one-for-one — you get the edge-runtime container, but the deploy UX is rougher.

If you live in Edge Functions and use them as your main API surface, managed is genuinely easier. If you use them sparingly and have a Node/Bun/Go API elsewhere, self-hosting loses nothing meaningful here.

Side-by-side: where the break-even sits

The honest break-even points, assuming a competent operator on the self-hosted side:

Workload profile Managed cost Self-hosted cost Winner
Side project, <1k MAU, no Realtime $0 (Free) €5/mo (CX22) Managed
Internal tool, 5k MAU, light Realtime $25 (Pro, Micro) €13/mo (CCX13) Toss-up; managed if you value time
B2B SaaS, 30k MAU, moderate Realtime, 500 GB egress ~$130/mo ~€20/mo Self-host
Consumer app, 100k MAU, heavy Realtime, 2 TB egress ~$400-600/mo ~$72/mo (Linode Dedicated 8 GB) + Cloudflare Self-host, clearly
Compliance-heavy, needs read replicas + PITR + branching $300-800/mo ~$150/mo (2 VMs + WAL-G to S3) Self-host if you have the ops capacity

You can run your own numbers against Hetzner, DigitalOcean, and Linode using the comparison tool on this site — the calculator handles the egress tier crossovers that catch people out.

What self-hosting actually costs you (the non-dollar bill)

Three things you are taking on:

  • Postgres upgrades. Supabase managed handles minor versions transparently and major versions with a one-click flow. Self-hosting, you script pg_upgrade or do logical replication for a zero-downtime cutover. Plan one afternoon per year minimum.
  • Backups you actually test. pg_dump to S3 is not a backup until you have restored it on a fresh VM and confirmed the app boots. WAL-G or pgBackRest with point-in-time recovery is the real answer, and configuring it correctly is half a day.
  • Auth security patches. GoTrue and PostgREST have had CVEs. You need a monthly docker compose pull && docker compose up -d cadence with a rollback plan. Set a calendar reminder or your stack will drift a year out of date.

If nobody on the team will own these three things, pay for managed. The $25-200/month is genuinely cheaper than a breach or a corrupted database with no working restore.

Hybrid setups that work

You do not have to pick one. Two patterns that production teams actually run:

  • Managed Postgres, self-hosted everything else. Use Supabase managed for the database + auth, run your own Realtime and Storage containers pointed at the managed Postgres. Captures the hardest-to-operate piece (Postgres HA) while killing the egress and Realtime CPU bills.
  • Self-hosted prod, managed preview branches. Run prod on a Hetzner box, but use managed Supabase branching for PR previews. You pay $0.32/branch-hour only when a PR is open.

Decision checklist

Run through this before you commit:

  • Do you have someone who can debug a stuck VACUUM at 2am? If no, managed.
  • Is your projected egress >500 GB/mo? If yes, self-host (with Cloudflare in front of Storage).
  • Do you have >1,000 concurrent Realtime subscribers on busy channels? If yes, self-host.
  • Do Edge Functions handle >30% of your request volume? If yes, managed is meaningfully easier.
  • Do you need SOC 2 / HIPAA paperwork without doing the work yourself? Managed (Team tier, $599/mo).
  • Is your monthly managed bill already past $150 and growing? Model the self-hosted equivalent in the osscostcalc calculator and budget a one-week migration sprint.

The default answer for most pre-revenue or early-revenue teams is managed Pro until the bill crosses ~$100/mo, then a hard look at a Hetzner CCX13 or a DigitalOcean 4 GB Premium droplet. The default answer for any product where Realtime or Storage egress is core to the experience is self-hosted from day one.

supabaseself-hostingpostgreshetznerdigitalocean