SaaS Business
Migrating From Vercel and Supabase to Self-Hosting: Real Costs, Outages, and Break-Even Math (2026)
Self-hosting cuts raw Vercel and Supabase bills by 73% to 95%, but DevOps labor flips the winner below $800/mo in managed spend. This study pairs our 2026 4-tier TCO dataset with 112 days of SaaSCity production incidents, founder reports, and hybrid stacks.

Contents (11)
- Headline findings
- When managed PaaS and BaaS pricing breaks down
- Managed PaaS vs hybrid vs self-hosting: real 2026 TCO math
- What you gain, what breaks, and where the hybrid stack fits
- 112 days in production: what happened when we migrated SaaSCity
- What real founders and engineering teams report on both sides
- Real risks and failure modes of self-hosting
- Decision framework: stay managed, go hybrid, or self-host
- How to migrate off Vercel and Supabase without dropping sessions or data
- Methodology and dataset
- FAQ
Migrating from Vercel and Supabase to self-hosting can cut a $3,970 monthly cloud invoice to $219 on bare metal, a 94.5% drop in raw hosting spend. It can also cost a two-person startup $400 more per month once you count five extra hours of Nginx, firewall, and Postgres upkeep at $125/hr. Drop Kong without auditing PostgREST grants, and it can expose every user email in your database four days after cutover.
All managed PaaS, BaaS, Cloudflare, and VPS rates below were checked against official vendor pricing pages on November 25, 2026 (EUR converted at 1.08 USD/EUR, excluding VAT). First-party migration metrics and the 18 production incidents come from SaaSCity's 112-day production soak from August 5 to November 25, 2026. Download the full 2026 TCO dataset (CSV).
Quick answer: Migrating from Vercel and Supabase to self-hosting cuts raw infrastructure bills by 73% to 95%, but at $125/hr for engineering labor, managed PaaS stays cheaper below roughly $800/mo in cloud spend. Between $200/mo and $800/mo, a hybrid stack (Cloudflare R2 plus Workers or a VPS with managed Postgres) removes egress and seat shock without owning database durability.
Headline findings
- Across 16 modeled workload scenarios checked November 25, 2026, Full Managed (Vercel plus Supabase Cloud) wins total cost of ownership at Tier 1 ($107.50/mo) and Tier 2 ($365.00/mo) at $125/hr DevOps labor. At Tier 2 ($240/mo raw), Lean Self-Hosted ($14.87, 6.0 hrs) only breaks even below $45.03/hr, and Self-Hosted Coolify ($26.21, 5.0 hrs) breaks even below $53.45/hr.
- The TCO crossover lands at Tier 3 (5 developers, 100k MAU, 2 TB egress, 50 GB database, 14-day PITR): Full Managed reaches $1,054.27/mo ($804.27 raw). Hybrid (Cloudflare Workers and R2 plus Supabase Cloud) wins overall at $877.57/mo, ahead of Lean Self-Hosted on a Hetzner AX52 ($920.62/mo) and Coolify ($960.42/mo).
- At Tier 4 (500k MAU, 10 TB egress, 100 GB database, 28-day PITR), Lean Self-Hosted on two Hetzner AX52 servers ($1,469.24/mo fully loaded; $219.24 raw) beats Full Managed ($4,345.29/mo; $3,970.29 raw) by $2,876.05/mo, saving $34,512.60/yr (-66.2%).
- Across
n = 60formerly active archived startups in SaaSCity's production cohort,HTTP 402 Payment Requiredis the #1 cause of post-launch death at 21.7% (13 of 60), ahead ofHTTP 404(15.0%),TLS_ERROR(11.7%), andDNS_NXDOMAIN(11.7%). - Even after Hetzner's two 2026 price hikes (+30% to +37% in April, plus +30% to +175% on new cloud orders in June) and OVHcloud's 5% to 11% increases, VPS RAM remains 5x to 15x cheaper per GB and over 100x cheaper per TB of egress than managed PaaS.
- In SaaSCity's 112-day post-cutover soak (899 commits, 95 SQL migrations), migrating off Supabase Cloud preserved 100% of data and all 1,199 active sessions with zero app code changes, but still took 14 new security hardening layers across 18 production incidents.
When managed PaaS and BaaS pricing breaks down
Managed hosting starts cheap: $0 on Hobby tiers, or $45/mo for one seat of Vercel Pro ($20) and a Supabase Pro org ($25). Invoices spike when several billing meters fire on the same request, or when flat seat and compliance tiers outrun revenue.
Vercel's 2026 billing mechanics and overage multipliers
Vercel replaced legacy wall-clock function billing with Fluid Compute, splitting execution into Active CPU ($0.128 to $0.221 per hour regionally, paused during database or LLM I/O wait) and Provisioned Memory ($0.0106 to $0.0183 per GB-hour). Vercel's Active CPU announcement cites up to an 85% reduction on I/O-bound routes compared to legacy serverless. The catch hits apps waiting on slow upstream APIs: Provisioned Memory ticks continuously during I/O wait until every concurrent request on that instance finishes (Vercel Functions Usage and Pricing).
The steeper multipliers sit outside CPU. Every deploying developer on Vercel Pro adds $20/mo. The included $20 usage credit is shared across the whole team and disappears quickly under real traffic, so five engineers pay $100/mo before serving a byte past quota.
Bandwidth and media stack multiple meters onto a single page load. Pro includes 1 TB of Fast Data Transfer, then bills $0.15 to $0.35 per GB regionally (Vercel Regional Pricing). Dynamic SSR responses and large RSC payloads add Fast Origin Transfer ($0.06 to $0.43/GB) and Edge Requests ($2.00 to $3.20 per 1M requests past 10M). Image Optimization bills across three axes: Transformations ($0.05 to $0.0812 per 1K), Cache Reads ($0.40 to $0.64 per 1M 8 KB units), and Cache Writes ($4.00 to $6.40 per 1M 8 KB units), plus delivery bandwidth.
Build Minutes catch monorepo teams off guard too: at $0.0035 per CPU-minute (~$0.007/min on a 2-vCPU machine), a repo without ignoreCommand rebuilds every app on every commit. Vercel Spend Management is free on Pro and can pause production at a hard budget cap, though auto-pause is opt-in and turns an AI bot surge into an outage.
Stepping up to Enterprise for SAML SSO, SCIM, and a 99.99% SLA hits a procurement wall. Benchmarks on Vendr and public founder reports place starting annual contracts around $20,000 to $25,000/yr and $30,000 to $45,000+/yr for growing teams.
Supabase Cloud's compute ladder, add-on stack, and compliance cliff
Supabase Cloud turns Spend Cap on by default on Pro, which stops hobby projects from running up surprise bills. Once you turn it off for production, Supabase's pricing scales along four separate billing axes.
Compute RAM carries the steepest markup. The $25/mo Pro org includes one $10/mo compute credit shared across the organization (covering a single 1 GB shared Micro instance), so every staging or second project pays full hourly compute.
Stepping up Supabase Compute runs from Micro ($10) and Small ($15, 2 GB) to Medium ($60, 4 GB), Large ($110, 8 GB), XL ($210, 16 GB), 2XL ($410, 32 GB), 4XL ($960), 8XL ($1,870), and 16XL ($3,730). A 16 GB Supabase XL instance ($210/mo) costs nine times a 16 GB Hetzner CAX31 ($23.21/mo) and three times a 64 GB DDR5 Hetzner AX52 bare-metal server ($69.12/mo).
Durability and routine add-ons stack fast on top of compute. Daily backups leave a 24-hour RPO; turning on Point-in-Time Recovery (PITR) requires Small compute or higher and adds $100/mo (7 days), $200/mo (14 days), or $400/mo (28 days). Add Custom Domain ($10/mo), Dedicated IPv4 ($4/mo), always-on Branching ($9.80/mo), and Log Drains ($60/drain), and a modest Medium database with 7-day PITR clears $240/mo before any overage.
Supabase Egress bills $0.09/GB uncached ($90/TB) and $0.03/GB cached past 250 GB/mo. Auth adds $0.00325 per MAU past 100,000, or $1,300/mo for 400k extra MAUs. If enterprise buyers ask for a SOC 2 Type II report or HIPAA BAA eligibility, the org floor jumps from $25/mo to the $599/mo Team plan ($7,188/yr), before compute or the sales-quoted HIPAA add-on (Supabase Discussion #35594).
Netlify, Render, Railway, Fly.io, Neon, Clerk, and Cloudflare in 2026
Vercel plus Supabase and raw Linux are only the two ends of the spectrum. Seven other platforms sit in between, each shifting where the bill spikes:
| Platform | 2026 Base & Seat Model | Compute / Usage Metering | Bandwidth & Egress Rate | Primary Billing Trap |
|---|---|---|---|---|
| Vercel | Hobby $0 (non-commercial, hard pause); Pro $20/seat/mo ($20 team credit) | Fluid Compute Active CPU $0.128-$0.221/hr + Memory $0.0106-$0.0183/GB-hr; Builds $0.0035/CPU-min | 1 TB Pro incl., then $0.15-$0.35/GB FDT + $0.06-$0.43/GB FOT | Per-seat tax, monorepo builds, 3-axis Image Optimization, opt-in pause |
| Supabase Cloud | Free $0 (pauses after 7d idle); Pro $25/org ($10 credit); Team $599/org | Hourly DB compute: $10 Micro (1 GB) to $210 XL (16 GB) and $410 2XL (32 GB); PITR $100-$400/mo | 250 GB uncached + 250 GB cached incl., then $0.09/GB uncached, $0.03/GB cached | High RAM markup, $100-$400 PITR floor, $599/mo SOC 2 cliff, $0.00325 extra MAU |
| Netlify | Free $0 (300 credits, hard pause); Personal $9; Pro $20/mo (unlimited seats, 3K credits) | Unified credit pool (~10 credits/GB-hr functions, ~20 credits/GB bandwidth) | Metered through credit pool | Credit burn on media or bot floods; cheaper than Vercel for 3-10 dev teams |
| Render | Hobby $0; Pro $25/mo (unlimited seats); Scale $499/mo (unlimited seats) | Fixed always-on instances: $7 Starter (512 MB) to $450 Pro Ultra (32 GB); Postgres from $6/mo | 25 GB Pro / 1 TB Scale incl., then $0.15/GB | $0.15/GB egress hurts media-heavy apps even with zero seat tax |
| Railway | Hobby $5 ($5 credit); Pro $20/mo ($20 credit, unlimited seats) | Per-second containers: $20/vCPU-mo + $10/GB RAM-mo | $0.05/GB flat egress | Always-on 24/7 RAM costs 5x-8x VPS memory, though egress is 3x cheaper than Vercel |
| Fly.io | Pay-As-You-Go $0 base (unlimited seats); optional support $29 or $199/mo | Per-second micro-VMs: shared-cpu-1x ~$2.19/mo, Performance from ~$33/mo | $0.02/GB (NA/EU), $0.04/GB (APAC/SA), $0.12/GB (Africa/India) | Multi-region Volume and self-managed Postgres ops complexity |
| Neon Postgres | Free $0 (100 projects, 100 CU-hrs); Launch $0 base minimum | Scale-to-zero ~$0.106/CU-hr (Launch) or ~$0.222/CU-hr (Scale; 1 CU = 1 vCPU, 4 GB RAM); storage $0.35/GB-mo | 500 GB/project incl., then $0.10/GB | Expensive if pinned 24/7 at high CU; $0.35/GB storage adds up on large tables |
| Clerk Auth | Hobby $0 (50k MRU); Pro $25/mo ($20 annual, 50k MRU); Business $300/mo | Per Monthly Retained User (returning >1 day after signup), ~$0.02/MRU overage | N/A | Consumer cliff: 50k extra MRUs cost ~$1,000/mo vs $162.50/mo on Supabase |
| Cloudflare Workers + R2 | Free $0; Workers Paid $5/mo (10M reqs, 30M CPU-ms, $0 seats); Pro WAF $20/mo annual | V8 Isolates on Active CPU only ($0.30/1M extra reqs, $0.02/1M CPU-ms); R2 $0.015/GB-mo past 10 GB | $0 egress across Workers, Pages, and R2 | 10 MB compressed bundle and 128 MB isolate RAM ceiling on OpenNext |
The HTTP 402 startup mortality cliff
Across n = 60 formerly active archived startups audited in SaaSCity's production directory database on November 23, 2026, HTTP 402 Payment Required was the single largest cause of post-launch death at 21.7% (13 of 60). More launched products went dark from unpaid Vercel, Replit, Lovable, or Railway platform walls than from HTTP 404 (15.0%), TLS_ERROR (11.7%), DNS_NXDOMAIN (11.7%), unreachable origins (10.0%), or Cloudflare HTTP 525 handshake failures (8.3%).
A flat $7-$12 VPS that holds five small side projects keeps them online indefinitely. Per-project cloud minimums and Hobby hard-pauses turn slow-growing tools into dead 402 pages the week a founder forgets to top up a card.
Post-hike 2026 VPS and bare-metal pricing
Any 2023 or 2024 guide quoting €3.79 for a Hetzner CAX11 or €4.51 for a CX22 is stale. Global DDR4/DDR5 and NAND shortages (dubbed the "RAMpocalypse" on ops forums) triggered two steep waves of VPS price hikes in 2026:
- Hetzner Wave 1 (effective April 1, 2026) raised cloud server prices 30% to 37% across new and existing boxes (Tom's Hardware).
- Hetzner Wave 2 (effective June 15, 2026) added another 30% to 38% on new CX/CAX orders and 110% to 175% on shared AMD (CPX) and dedicated vCPU (CCX) tiers (PrivateDevOps).
- OVHcloud lifted cloud rates 5% to 11% in 2026, and Netcup raised new G12/G12.5 VPS and Root-Server prices in autumn 2026 while grandfathering existing contracts.
Even after those increases, raw hardware stays far cheaper than managed compute. On November 25, 2026, Hetzner Cost-Optimized Cloud lists the ARM64 CAX11 (2 vCPU, 4 GB RAM, 40 GB NVMe, 20 TB EU traffic) at €6.49/mo ($7.01), the CAX21 (4 vCPU, 8 GB RAM, 80 GB NVMe, 20 TB) at €10.99/mo ($11.87), and the CAX31 (8 vCPU, 16 GB RAM, 160 GB NVMe, 20 TB) at €21.49/mo ($23.21). Extra traffic runs €1.00/TB (Hetzner Traffic Docs).
On bare metal, Hetzner AX42 and AX52 servers (8c/16t Ryzen, 64 GB DDR5, dual NVMe RAID-1, unmetered 1 Gbit/s port) run ~€54 to €99/mo plus setup. DigitalOcean Droplets cost more at $24/mo for 2 vCPU / 4 GiB RAM with 4 TB transfer. For backups and media, Backblaze B2 ($6.95/TB-mo, $0 egress through the Cloudflare Bandwidth Alliance) and Cloudflare R2 ($0.015/GB-mo, $0 egress) keep storage bills close to zero.
Managed PaaS vs hybrid vs self-hosting: real 2026 TCO math
Raw hosting invoices mislead founders whenever you put a $15 VPS next to a $240 managed stack and price the engineer maintaining Postgres, Nginx, TLS, fail2ban, and backups at $0. To find the actual break-even point, we modeled four traffic tiers across four architectures using official November 25, 2026 vendor pricing (EUR/USD = 1.08, excluding VAT). Every row adds recurring monthly DevOps hours priced at $125/hr, the midpoint of the $100-$150/hr senior engineer rate typically cited on Hacker News and r/startups.
| Tier & Workload Profile | Architecture | Raw Infra/mo | Ops Hrs/mo | Labor/mo ($125/hr) | Fully Loaded TCO/mo | Annual TCO |
|---|---|---|---|---|---|---|
| Tier 1: Pre-PMF / MVP (1 dev, 5k visits, 1k MAU, 30 GB, 0.5 GB DB) | Full Managed (Vercel + Supabase Cloud) | $45.00 | 0.5 | $62.50 | $107.50 | $1,290.00 |
| Tier 1: Pre-PMF / MVP | Hybrid (Cloudflare Workers/R2 + Supabase Cloud) | $30.00 | 1.0 | $125.00 | $155.00 | $1,860.00 |
| Tier 1: Pre-PMF / MVP | Self-Hosted Coolify (Hetzner CAX21 + CF + R2 + SES) | $12.07 | 3.5 | $437.50 | $449.57 | $5,394.84 |
| Tier 1: Pre-PMF / MVP | Lean Self-Hosted Hybrid (Hetzner CAX11 + CF + R2 + SES) | $7.21 | 4.5 | $562.50 | $569.71 | $6,836.52 |
| Tier 2: Growing SaaS (2 devs, 100k visits, 10k MAU, 300 GB, 8 GB DB, 7d PITR) | Full Managed (Vercel + Supabase Cloud) | $240.00 | 1.0 | $125.00 | $365.00 | $4,380.00 |
| Tier 2: Growing SaaS | Hybrid (Cloudflare Workers/R2 + Supabase Cloud) | $191.00 | 1.5 | $187.50 | $378.50 | $4,542.00 |
| Tier 2: Growing SaaS | Self-Hosted Coolify (Hetzner CAX31 + CF + R2 + SES) | $26.21 | 5.0 | $625.00 | $651.21 | $7,814.52 |
| Tier 2: Growing SaaS | Lean Self-Hosted Hybrid (Hetzner CAX21 + CF + R2 + SES) | $14.87 | 6.0 | $750.00 | $764.87 | $9,178.44 |
| Tier 3: Scaling SaaS (5 devs, 1.2M visits, 100k MAU, 2 TB, 50 GB DB, 14d PITR) | Full Managed (Vercel + Supabase Cloud) | $804.27 | 2.0 | $250.00 | $1,054.27 | $12,651.24 |
| Tier 3: Scaling SaaS | Hybrid (Cloudflare Workers/R2 + Supabase Cloud) | $565.07 | 2.5 | $312.50 | $877.57 | $10,530.84 |
| Tier 3: Scaling SaaS | Self-Hosted Coolify (2x Hetzner CAX31 + CF Pro + R2 + SES) | $85.42 | 7.0 | $875.00 | $960.42 | $11,525.04 |
| Tier 3: Scaling SaaS | Lean Self-Hosted Hybrid (Hetzner AX52 + CF Pro + R2 + SES) | $108.12 | 6.5 | $812.50 | $920.62 | $11,047.44 |
| Tier 4: High-Egress / Media-Heavy (5 devs, 5M visits, 500k MAU, 10 TB, 100 GB DB, 28d PITR) | Full Managed (Vercel + Supabase Cloud) | $3,970.29 | 3.0 | $375.00 | $4,345.29 | $52,143.48 |
| Tier 4: High-Egress / Media-Heavy | Hybrid (Cloudflare Workers/R2 + Supabase Cloud) | $2,371.00 | 4.0 | $500.00 | $2,871.00 | $34,452.00 |
| Tier 4: High-Egress / Media-Heavy | Self-Hosted Coolify (AX52 DB + CAX31 App + CF Pro + R2 + SES) | $173.33 | 11.0 | $1,375.00 | $1,548.33 | $18,579.96 |
| Tier 4: High-Egress / Media-Heavy | Lean Self-Hosted Hybrid (2x Hetzner AX52 + CF Pro + R2 + SES) | $219.24 | 10.0 | $1,250.00 | $1,469.24 | $17,630.88 |
Every line item behind all 16 rows (seats, FDT and Supabase egress overages, compute credits, PITR tiers, R2 storage, and Amazon SES relays) is published in the downloadable 2026 TCO CSV dataset.
Modeled monthly hosting bills (solid) plus DevOps labor at $125/hr (hatched) across four traffic tiers, checked November 25, 2026 (EUR/USD = 1.08). Managed PaaS wins Tiers 1 and 2; Hybrid wins the Tier 3 crossover; Lean Self-Hosted bare metal saves 66% at Tier 4.
Reading the break-even curve
At Tiers 1 and 2, managed PaaS beats self-hosting on total cost for any funded or time-constrained team. At Tier 2 (10k MAU, 2 developers, 7-day PITR), Lean Self-Hosted cuts the cash bill by 93.8% ($240.00 down to $14.87), but five extra monthly hours of patching, migrations, and backup verification at $125/hr push total cost to $764.87 vs $365.00. At Tier 2, Lean Self-Hosted ($14.87, 6.0 hrs) beats Full Managed only when you value marginal ops labor below $45.03/hr, while Self-Hosted Coolify ($26.21, 5.0 hrs) breaks even below $53.45/hr.
That $45.03/hr to $53.45/hr break-even band explains why indie solo founders and funded teams talk past each other online. A bootstrapped solo developer running six micro-SaaS tools on one shared box pays near-zero marginal ops cost per project. A seed-stage team burning runway on a $240 hosting bill loses money trading 40 hours of migration work for $200/mo in invoice savings. Check your cash burn in our burn rate and runway calculator before touching servers. If you run an AI product, run your token volume through the LLM API pricing calculator too, because inference bills regularly dwarf hosting bills below 100k MAU.
Tier 3 (~$804/mo raw managed spend) is the crossover point, and Hybrid wins it. At 5 seats, 100k MAU, 2 TB egress, and 14-day PITR, Full Managed reaches $1,054.27/mo ($804.27 raw). Moving web compute and media onto Cloudflare Workers, R2, and Pro WAF leaves Postgres and 14-day PITR on Supabase Cloud, cutting raw spend to $565.07 and total TCO to $877.57/mo. That beats both Coolify ($960.42/mo) and Lean Self-Hosted on a Hetzner AX52 ($920.62/mo) because you strip $239/mo in Vercel seat and egress fees for only 0.5 extra hours of monthly ops.
At Tier 4 (500k MAU, 10 TB egress, 100 GB database, 28-day PITR), managed unit economics break down. Full Managed climbs to $3,970.29/mo raw ($4,345.29 fully loaded), driven by $1,078.80/mo in Vercel FDT overage, $1,300.00/mo in extra Supabase Auth MAUs, and $800.00/mo for 2XL compute plus 28-day PITR. Hybrid shaves off $1,599/mo in web egress, but Supabase's MAU and 2XL/PITR floor still leaves it at $2,871.00/mo.
Two Hetzner AX52 dedicated servers (128 GB DDR5, primary/standby Postgres 17, unmetered 1 Gbit/s ports) paired with Cloudflare Pro, R2, and SES bring raw spend to $219.24/mo. Budgeting 10 senior SRE hours a month puts fully loaded TCO at $1,469.24/mo, saving $34,512.60/yr (-66.2%). Even at $150/hr engineering labor, Tier 4 Lean Self-Hosted still beats Full Managed by $2,701/mo.
What you gain, what breaks, and where the hybrid stack fits
Leaving Vercel and Supabase changes what happens on every git push, every image resize, every Postgres minor upgrade, and every bot flood.
| Capability | Vercel + Supabase Cloud | Hybrid (Workers/VPS + Managed DB) | Full Self-Host (VPS / Bare Metal) |
|---|---|---|---|
| Git push & PR preview deploys | Automatic out of the box | Automatic (Workers/Railway) or CI-scripted | Coolify/Dokploy give previews; bare PM2/Compose requires custom CI |
| Next.js ISR cache & Skew Protection | Global shared ISR + native Skew Protection on Pro | Local or R2/KV cache; manual build ID handling | Multi-replica needs Redis cacheHandler (cacheMaxMemorySize: 0); manual blue-green skew drain |
| Next.js Image Optimization | Off-box Edge pipeline (3-axis metered billing) | Offloaded to R2 + Cloudflare Images/CDN | In-process sharp spikes CPU and C++ heap; you patch libvips CVEs |
| Postgres upgrades & PITR | One-click minor upgrades; managed 7/14/28d PITR ($100-$400/mo) | Inherited from Supabase/Neon/RDS | You own pg_upgrade, image pinning, pg_dump or WAL-G/pgBackRest, and restore drills |
| Auth (GoTrue, OAuth, Turnstile) | Managed Dashboard, built-in rate limits & CAPTCHA wiring | Inherited if staying on Supabase Auth / Clerk | You own GoTrue env vars, Nginx brute-force limits, Turnstile proxy enforcement, and SMTP relay |
| Realtime, Storage & Edge Functions | All managed, billed per egress/invocation | Media offloaded to R2 ($0 egress); DB/Realtime managed | Full 12-container Compose needs 8 GB+ RAM, or strip unused services manually |
| Global edge CDN & tail latency | Global CDN; serverless cold starts 400-1,500 ms+ P99 | Global Workers edge or Cloudflare CDN in front of VPS | Cloudflare CDN + permanently warm Node (<50 ms) + sub-ms loopback DB queries |
| WAF, DDoS & IPv6 rate limiting | Managed L3/L4/L7 WAF and rate rules | Cloudflare WAF + rate limiting on edge | Hetzner filters L3/L4 only; you lock IPv4 + IPv6 firewalls and Cloudflare-verified Nginx IP maps |
| SOC 2 / HIPAA compliance inheritance | Inherited on Supabase Team ($599/mo) + Vercel Enterprise | Database controls inherited if on compliant tier | Zero inherited controls; full startup audit, pentest, and evidence scope |
| Hard monthly billing cap | Opt-in pause on Vercel (causes downtime); default cap on Supabase Pro | Zero web/media egress cliff; DB tier capped | Flat hardware invoice + 20 TB to unmetered EU traffic; degrades via CPU/queue, never $96k bills |
Inside the 12-container self-hosted Supabase stack
The official self-hosted Supabase Docker Compose stack orchestrates 12+ containers: supabase-db (PostgreSQL), supabase-kong (API gateway), supabase-auth (GoTrue), supabase-rest (PostgREST), supabase-realtime (Elixir), supabase-storage plus imgproxy, supabase-pooler (Supavisor), supabase-studio, supabase-meta, supabase-edge-functions (Deno), and supabase-analytics (Logflare plus Vector).
Supabase lists 4 GB RAM / 2 vCPU as an entry floor, which only holds if you disable Logflare and Vector (those two consume 500 MB to 1.8 GB on their own). Production stacks need 8 GB+ RAM because supabase-kong has documented memory inflation up to 2.5 GB under load (Supabase Discussion #26159).
Upgrades carry real blast radius. When upstream switched the default Compose template from Postgres 15 to Postgres 17, teams running unpinned pulls broke live data volumes immediately because PG 17 cannot mount a PG 15 data directory (Supabase Discussion #46080). Supavisor updates have also triggered recurring Ecto schema_migrations restart loops (Supabase Issue #30210). Self-hosted Supabase omits multi-project Studio, Database Branching, managed PITR, and the Management API too. Auth emails will not send at all until you configure external SMTP or route confirmations through an API mailer.
What changes when you self-host Next.js
Vercel improved standalone self-hosting in Next.js 15 and 16 (Next.js Self-Hosting Guide; The New Stack), and Next.js 15.2+ added full Node.js Middleware so self-hosted apps can call native Postgres or Redis drivers directly inside middleware. Five operational changes still fall on your team:
- Local
.next/cachedisappears on every container rebuild and diverges across replicas unless you wire a shared RediscacheHandlerand setcacheMaxMemorySize: 0. next/imagerunssharpinside your Node process using native C++ memory, so unthrottled bot traffic hitting dynamic image widths can OOM-kill the web server.- Without Vercel's Skew Protection, active browser tabs hit missing chunk 404s or invalid Server Action IDs across deploys unless you pin
generateBuildIdto Git SHAs and drain blue-green upstreams gracefully. - Running
next buildon a 4-8 GB server alongside Postgres triggers Linux OOM kills; build Docker images in GitHub Actions or a separate CI runner. - Reverse proxies (Nginx, Caddy, Traefik, or
kamal-proxy) must forward verifiedX-Forwarded-ForandX-Forwarded-Protoheaders, or Server Action origin checks and IP rate limiters fail or log internal bridge IPs.
The "Boring Hybrid" middle ground and orchestration choices
Two hybrid patterns cut most cloud waste without putting everything on one box. An Edge/Container Hybrid keeps Postgres and PITR on Supabase Cloud or Neon and moves media to Cloudflare R2 ($0 egress) or Backblaze B2 behind Cloudflare. Next.js then runs on Cloudflare Workers via OpenNext ($5/mo, $0 egress, $0 seats, within its 10 MB compressed bundle and 128 MB isolate RAM cap) or on Railway or Fly.io ($0.02-$0.05/GB egress, unlimited seats).
The second pattern, Boring Hybrid Self-Hosting, leaves commodity edge and delivery services managed (Cloudflare CDN, WAF, and Turnstile, R2 storage and backups, Stripe, Resend or SES email, and Sentry). Stateless app compute, Postgres, PostgREST, and GoTrue move onto flat VPS or bare-metal hardware.
Full Managed PaaS versus the Boring Hybrid self-hosted pattern: commodity edge, R2 object storage, billing, email, and error tracking stay managed while flat VPS hardware runs Nginx, Next.js, GoTrue, PostgREST, native PostgreSQL 17, and bridge-isolated Realtime without Kong, Supavisor, Studio, or Logflare.
For deployments, Coolify and Dokploy replicate Git webhooks, PR previews, Traefik SSL, and database templates at ~1.5-2 GB of control-plane RAM headroom. Teams wanting zero server-side control-plane attack surface lean toward Kamal 2 (37signals' stateless CLI with kamal-proxy, ~512 MB overhead), Dokku, or Git-tracked Docker Compose and Nginx. For a tool-by-tool breakdown of Coolify, Dokploy, Appwrite, and PocketBase, read our companion guide on self-hosting tool alternatives to Vercel and Supabase.
112 days in production: what happened when we migrated SaaSCity
In February 2026, our earlier tools roundup called self-hosting "a VPS, Docker, and an afternoon." Six months later, we ran the migration in production ourselves. Between December 22, 2025 and November 25, 2026, SaaSCity logged 2,129 commits on main and 156 SQL migrations. Next.js moved off Vercel onto a German VPS behind Nginx and Cloudflare in late January 2026. Supabase Cloud stayed in place until an August 7, 2026 HTTP 402 billing cliff forced a 36-hour cutover sprint across August 4-5.
Over the next 112 days (899 post-cutover commits, 95 new SQL migrations, and 53 dedicated infrastructure, security, auth, and performance commits), we shipped 14 security hardening layers and debugged 18 production incidents.
What we cut, what stayed managed, and how cutover went
We skipped the 12-container official Supabase Compose stack and dropped five subsystems: Kong, Supavisor, Supabase Studio, Logflare/Analytics, and Deno Edge Functions. Production runs five processes on a single multi-tenant German VPS that already hosts four isolated PostgreSQL clusters and six production web apps, so leaving Supabase Cloud added $0 in marginal compute cost:
- Next.js 16.4.6 (
next startbound to loopback behind Nginx, supervised by PM2) - GoTrue v2.190.0 (native binary under PM2, SMTP disabled, legacy HS256 JWT secret preserved)
- PostgREST 14.13 (native binary under PM2,
db-pool=20,openapi-mode="disabled") - Supabase Realtime v2.123.3 (Docker bridge mode, localhost-published, one narrow
iptablesrule to Postgres) - PostgreSQL 17.10 (native systemd cluster with
wal_level=logical,pg_cronbackground workers, andwal2json)
Cloudflare proxy and Turnstile, Cloudflare R2 ($0 egress), Zoho MX split from Resend on a dedicated sending subdomain, Stripe, OpenAI Moderation, and Sentry (/monitoring tunnel) stayed managed. Cutover finished at 13:08:57 UTC on August 5, 2026 with exact row parity: 1,312 launches, 1,197 public.users, and 1,199 auth.users moved with zero launches, zero users, and zero purchases lost (one cosmetic activity_logs row arrived post-dump). Keeping the existing HS256 JWT secret left all 1,199 active sessions logged in, and the app needed zero code changes at cutover beyond pointing NEXT_PUBLIC_SUPABASE_URL at our own domain.
Four engineering wins from owning the box
Right before cutover in July, /saascity was pulling ~1.7 MB per visit from Supabase REST, and two sponsor components had fired 1.5 million polling calls since launch. Worse, a React dependency bug was recreating a Realtime channel every 10 seconds, writing ~800,000 realtime.subscription rows that ate 67% of total Postgres CPU. Moving to CDN-cached local API proxies and loopback Postgres killed both the egress bill and the network round trip.
Persistent .next/cache disk on the VPS also let us build a server-side WebP logo-atlas packer. It collapsed ~1,400 separate logo fetches into 1 manifest and 2 WebP sprite sheets (~1.5 MB total), dropping Chrome dropped frames from 868 down to 30 (2x DPR) and from 365 down to 0 (1x DPR). Paired with upload-time 320px WebP compression, stored R2 logo bytes fell 94%, from 115.3 MB down to 6.7 MB.
Switching package management from npm to Bun cut warm deploy installs from 37 seconds to 1.5 seconds. We kept next build and next start on Node because bun --bun next build crashed prerendering /_global-error (React dispatcher null). Stripping stray force-dynamic exports from blog and marketing routes and bumping homepage ISR from 60s to 300s also eliminated a 1.2s TTFB regeneration tail that had pushed mobile LCP past 2.5s.
The 18 production incidents across 112 days
All 18 production incidents logged across 112 days and 899 post-cutover commits (Aug 4 to Nov 25, 2026): 7 security and auth fixes, 6 availability and OOM incidents, and 5 backup or toolchain scars, with zero user or launch data loss.
Days 0 to 4: cutover blockers and No-Kong leaks
A pre-cutover adversarial audit on August 5 returned NO_GO and caught seven launch blockers before DNS moved. ALTER ROLE ... IN DATABASE binds to a database's numeric OID, so every restore-and-rename swap silently wiped supabase_auth_admin's search_path and 500'd every login (column users.aud does not exist). Separately, information_schema.role_table_grants hid column-level pg_attribute.attacl grants, causing 404s on public pages and 403s for owners editing listings until we built a 2,502-grant column parity diff. The same audit caught bare PostgREST serving a 172 KB unauthenticated OpenAPI schema dump at /rest/v1/ (blocked before cutover with openapi-mode="disabled" and an Nginx 401), pg_restore || true swallowing restore failures, 18 unpinned SECURITY DEFINER functions, and Realtime running in --network=host mode on wildcard IPv6 with no ip6tables.
Four days after cutover, on August 9, we learned what dropping Kong still leaves exposed. Bare PostgREST leaked 114 rejected drafts, 7 pending drafts, and Stripe checkout session IDs to anon, and exposed all 1,242 user email addresses to any throwaway signup because public.users still carried table-wide SELECT. Locking those down took split RLS policies and strict column-level SELECT allowlists.
Day-0 ops scripts added three quieter bugs. Our healthcheck expected HTTP 200 on PostgREST / (which returns 404 once OpenAPI is off) and spammed Discord every five minutes. Five early dumps landed in the wrong R2 bucket, and a write-only R2 token silently broke our pruning script ("0 pruned" forever) until retention moved to R2 lifecycle rules.
Days 5 to 63: serverless habits crashing a persistent VPS
Fixing July's egress bill introduced a classic serverless-to-VPS memory leak. Server-side Next.js API routes instantiated default supabase-js clients without { auth: { autoRefreshToken: false, persistSession: false } }, spawning an un-cleared 30-second setInterval timer on every request. At ~30,000 daily hits, ephemeral Vercel functions recycle fast enough to hide that leak. On a persistent PM2 process, next-server OOM-killed every 3 to 4 hours for roughly ten weeks until we patched it on September 27.
On September 10, Next.js SSR calls to our public Supabase subdomain hairpinned out to Cloudflare and back over IPv4, stalling ~20 seconds per request and flooding pages with 504s. Switching server calls to a loopback Nginx listener cured the stall, right after tripping over an sb-* cookie-name mismatch that logged users out and causing GoTrue to record every visitor as 127.0.0.1. Then on October 2, next start -H 127.0.0.1 paired with NODE_OPTIONS=--dns-result-order=ipv6first made Next.js rewrites resolve localhost to ::1, returning 500 on every unprefixed English URL in production while local dev passed.
PostgREST also echoes long .in(...) queries into Content-Location headers, overflowing Nginx's default 8k proxy buffers (502 on map views until we raised them to 256k). Self-fetching forwarded HTTPS origins 500'd behind Nginx on .md routes until pointed at the local listener, and in-place builds overwrote .next under live workers, causing brief 502s and manifest errors on PM2 restarts. Our self-hosted Firecrawl build omitted Playwright screenshots, forcing a separate Chromium /shot companion service. We also owned every runtime CVE patch directly: four libvips CVEs in sharp (CVE-2026-33327/33328/35590/35591), Next.js security updates (16.2.12, 16.4.6), undici, and zod.
Days 64 to 112: auth abuse, firewalls, and Day-2 ops drift
In late October and November, the worst gaps showed up in auth and firewall rules. Because GOTRUE_RATE_LIMIT_HEADER was unset, GoTrue's per-IP rate limiter had been completely off for nearly three months. Worse, with the public anon key sitting in client JS, bots could POST directly to /auth/v1/(signup|recover|resend) and bypass Cloudflare Turnstile altogether. We added a dedicated Nginx /auth/v1/token limit (5 req/min, burst 10, IPv6 /64 bucketing, with a refresh-token exemption replayed against 7.5 days of production logs) and blocked all six direct public GoTrue auth paths in Nginx with 403.
Password resets had never worked either, because admin generateLink returns a non-PKCE URL fragment that /auth/callback (?code=) cannot read. Moving to /auth/confirm (verifyOtp) fixed resets alongside a supabase-js Web Lock timeout that stopped backgrounded Android tabs from wedging every open tab. Trying to cut spam signups with a 138,000-domain GitHub disposable-email list backfired within minutes by blocking namecheap.com, seomoz.org, Spectrum, and Tutanota; we reverted to a curated 9,965-domain auth.users trigger with an allowlist for Apple, DuckDuckGo, SimpleLogin, and Proton Pass relays.
Origin firewall rules hid two severe holes. Whenever port 443 answers direct HTTPS connections, trusting raw CF-Connecting-IP lets attackers spoof any IP and bypass rate limits sitewide. At the same time, our fail2ban scanner jail had no Cloudflare ignore list, risking a 24-hour ban on a Cloudflare edge PoP that would knock every site on the box offline. We closed both with trusted Cloudflare client-IP maps, a daily validated Cloudflare CIDR sync cron (sanity-checking drops and adds, testing Nginx and fail2ban configs, and auto-rolling back on error), and a default-DROP IPv6 /etc/iptables/rules.v6 firewall on November 24.
Day-2 upkeep settled into 14 active scheduled tasks: 8 /etc/cron.d/ jobs, 2 app-user crontabs, 3 pg_cron jobs, and certbot.timer, plus manual renewal tracking on our Cloudflare Origin CA cert. Backups run every 6 hours via pg_dump -Fc (26 MB, 1,442 TOC objects), checked with pg_restore -l (>= 100 objects and >= 500 KB) before uploading to tiered R2 retention (3-day 6h/, 30-day daily/). A weekly RSA-4096/AES-256 encrypted archive backs up configs and globals using a private key that never touches the box, watched by an hourly staleness check.
Even with that machinery running, our October audit caught real drift: a 3.5-month-dead cron holding plaintext secrets, ~85 production env keys sprawled across six config files, a co-tenant backup bloating R2 to 10.40 GB, a live migration (141) rolled back in 19 minutes, and a stale local cloud pooler URL waiting to trap stray psql sessions.
What real founders and engineering teams report on both sides
Public postmortems across Hacker News, r/nextjs, r/Supabase, r/selfhosted, r/SaaS, and r/Hosting follow the same divide. Steady, high-bandwidth apps save serious money off managed PaaS, whereas small teams still hunting for distribution often regret taking on Linux and Postgres upkeep early.
When leaving managed PaaS paid off
At enterprise scale, David Heinemeier Hansson documented 37signals / Basecamp leaving AWS and GCP for owned Dell PowerEdge R7625 servers in Deft colocation. Cloud spend dropped from $3.2M-$3.4M/yr to $1.3M/yr (a locked S3 commitment), paying back $700,000 in hardware in Year 1 and pushing projected five-year savings over $10M. Median latency fell from 67 ms to 19 ms with zero added ops hires (DHH on HEY; Basecamp Cloud Exit). On heavy web-crawling workloads, Ahrefs calculated US$400M saved over three years by staying in Singapore colocation.
Bill-shock incidents drove smaller teams off serverless PaaS just as fast:
- When viral artist migration pushed Cara (founded by Jingna Zhang) from 40,000 to over 650,000 users in June 2024, ~56M daily Vercel serverless invocations triggered a $96,280 single-week over-usage alert (TechCrunch; InfoQ).
- In February 2024, a DDoS hammering a 3.44 MB MP3 on a ~200 visitor/day static site burned 190 TB in four days and produced a $104,500 Netlify invoice (Netlify Answers #113392; Cybernews). Support first discounted it to $5,225 before public backlash prompted CEO Matt Biilmann to waive it to $0.
- In late 2025, Kvetoslav Novak reported AI bots sending 100,000+ daily visits to Eurlexa (150,000+ EU legal pages on Vercel Pro). His $40 Spend Management cap stopped a runaway invoice by taking production offline, which pushed him to self-host (DEV.to).
- On Vercel Community #34129, a six-app Next.js monorepo with under $1.00 in actual runtime received a $602.21 bill ($601.52 for 79 build hours) and moved to Railway in an afternoon for under $35/mo.
- On
r/vercel, an API-heavy ~600 DAU Next.js SaaS hit $1,800/mo ($1,400/mo after tuning) before moving to an €11/mo Hetzner VPS with Coolify for $25-$40/mo total.
Solo and privacy-focused founders back up those numbers over multi-year runs. Pieter Levels reports running a $200k-$250k/mo SaaS portfolio on Hetzner VPS monoliths at ~94.5% profit margins (levels.io), and Plausible Analytics hosts its analytics business on European Hetzner servers plus Bunny CDN.
European B2B compliance pushes some teams off US clouds even before the bill hurts. Hosting inside a US hyperscaler's Frankfurt region still falls under the US CLOUD Act because the corporate parent is US-domiciled, so public-sector, finance, and healthcare buyers increasingly ask for EU-owned providers like Hetzner or OVHcloud. The EU Data Act cloud-switching rules (in force since September 2025, with a mandatory ban on cloud egress and switching fees taking full effect in January 2027) also lower the legal cost of leaving US clouds (European Datarooms).
Real scars, security incidents, and migrations back to PaaS
On January 8, 2026, Coolify disclosed 11 critical flaws (CVE-2025-66209 through 66213, CVE-2025-64419 and 64420, rated up to CVSS 10.0) across backup commands, Postgres init scripts, and proxy configs that allowed container escape, root RCE, and root SSH private key exfiltration (The Hacker News). Researchers spotted over 50,000 public Coolify panels online, and October 2026 brought another advisory for PHP2Shell (CVE-2026-109618 / 109619, Coolify Security Advisory). Running a GUI PaaS creates a high-value root control plane that belongs behind Tailscale or a strict VPN allowlist, never on the public internet.
Publishing docker run -p 5432:5432 punches straight through UFW: Docker injects iptables NAT rules before UFW's chains, exposing Postgres and Redis to scanners while ufw status still prints DENY (Milan Jovanović). On Hetzner, public IPv6 subnets widen the hole whenever ip6tables is left open (Hetzner IPv6 Guide).
On the backup side, GitLab's January 31, 2017 outage still haunts every self-hosted DBA: after an accidental rm -rf, all five backup mechanisms failed at once (pg_dump 9.2 silently failed against Postgres 9.6 while DMARC dropped error emails), wiping six hours of production data. Modern cron scripts repeat that mistake whenever pg_dump | gzip runs without set -euo pipefail.
Some engineers who went all-in on self-hosting have also written about reversing course. Hamilton Greene dropped Coolify for Ansible and Tailscale in August 2025 over UI configuration drift and maintainer bus factor (hamy.xyz). Matt Crandell moved off a VPS back to Vercel in July 2025 after Nginx, SSL renewals, Docker networking, and patching turned into a draining second job (mattcrandell.com), a story repeated across r/Hosting and r/startups.
Hetzner's built-in DDoS mitigation stops L3/L4 volumetric floods, but unproxied dynamic routes stay exposed to L7 bot floods. New VPS accounts block outbound port 25 and VPS IP ranges routinely land on spam lists, so auth email still requires Amazon SES ($0.10/1K emails), Postmark, or Resend. Self-hosting also strips inherited compliance: funding SOC 2 Type II readiness yourself typically runs $5,000-$15,000/yr for compliance tooling (Vanta or Drata), $3,000-$8,000 for pentests, and $7,000-$20,000+ for CPA audits, more than Supabase Team's $7,188/yr inherited baseline.
Real risks and failure modes of self-hosting
Every failure mode below either hit SaaSCity in production or recurs across 2024-2026 self-hosting postmortems.
| Failure Mode | Risk for Small Teams | Blast Radius | Early Warning Signal | Concrete Mitigation |
|---|---|---|---|---|
| Silent broken Postgres backups | High | Total permanent data loss | 0-byte dumps, missing cron alerts, untested restore scripts | Use set -euo pipefail, pg_restore -l object/size gates, offsite R2/B2 upload, hourly dead-man watchdog, quarterly restore drills |
Shared-VPS OOM kills (next build, sharp, timer leaks) | High | Simultaneous app + Postgres crash (502 sitewide) | Rising RSS memory over hours, Linux oom-killer in dmesg | Build in CI only, pass { autoRefreshToken: false, persistSession: false } in server supabase-js, cap container RAM with cgroups |
| Docker UFW bypass & open IPv6 firewall | High | Publicly exposed Postgres, Redis, or Realtime ports | Port scan / ss -tulpn showing 0.0.0.0 or :: bindings | Never publish DB ports on 0.0.0.0, bind internal services to 127.0.0.1, enforce provider Cloud Firewall + ip6tables INPUT DROP |
| Direct-to-origin IP spoofing & fail2ban self-DoS | Medium-High | Rate-limit bypass or 24h ban on Cloudflare edge PoPs | Origin access logs showing non-Cloudflare IPs or sudden regional 522s | Enforce Cloudflare-verified client IP maps synced daily, ignore Cloudflare CIDRs in fail2ban, or use Authenticated Origin Pulls / Tunnel |
| No-Kong PostgREST leaks & GoTrue Turnstile bypass | High | Exposed PII/drafts, credential stuffing, spam signups | Full schema JSON at /rest/v1/, direct POSTs to /auth/v1/signup | Set openapi-mode="disabled", enforce column SELECT allowlists + RLS, block public GoTrue auth paths in Nginx, add IPv6 /64 rate limits |
| Control-plane zero-day CVEs (Coolify/Studio) | Medium-High | Full root RCE and SSH key compromise | Public admin dashboard on port 8000/443, lagging patch cadence | Put Coolify/Dokploy/Studio behind Tailscale or VPN allowlists, subscribe to CVE feeds, or use stateless Kamal 2 / Ansible |
| Transactional/auth email spam-folding | Medium | Broken signups, password resets, and customer lockouts | High bounce/spam rates, GoTrue SMTP timeouts on port 25 | Never run SMTP on VPS IP space; split root MX from a dedicated sending subdomain via Resend, Postmark, or Amazon SES |
| Solo-founder 3am pager fatigue & bus factor | High | Burnout, slow shipping, hours-long downtime on vacation | Only one person holds SSH keys, DNS access, or rebuild steps | Keep config and runbooks in Git, automate encrypted config backups, avoid single-host tinkering when PaaS spend is under $250/mo |
| Enterprise SOC 2 / HIPAA audit scope expansion | Medium (B2B) | Stalled enterprise deals or $15k-$40k+ unplanned audit bills | Security questionnaires asking for subprocessor SOC 2 / BAA | Stay on Supabase Team + managed PaaS or Hybrid managed DB until revenue justifies dedicated security compliance overhead |
Before putting a self-hosted stack on the public internet, audit RLS, headers, and rate limits against our pre-launch security checklist, and check domain reputation and email deliverability risks before wiring auth emails. If you sell to regulated B2B buyers, review the SOC 2 and GDPR compliance checklist before dropping inherited controls.
Decision framework: stay managed, go hybrid, or self-host
Use your monthly invoice, egress volume, compliance pipeline, and ops bench to pick the right tier:
| Decision Factor | Stay Managed (Vercel + Supabase) | Go Hybrid (Best for Most Growing SaaS) | Go Full Self-Host (VPS / Bare Metal) |
|---|---|---|---|
| Monthly PaaS invoice | Under $250/mo | $250/mo to $1,000/mo | Consistently above $800-$1,000/mo |
| Monthly egress / bandwidth | Under 500 GB | 500 GB to 3 TB (especially media/assets) | Above 2-5 TB or relentless AI bot traffic |
| Engineering team size | 1 to 2 developers | 3 to 8 developers (Vercel seat tax hurts) | Any size with at least one real Linux/Postgres owner |
| Business & PMF stage | Pre-PMF, validating distribution | Post-PMF, growing MRR, lean ops capacity | Predictable scale, margin pressure, or multi-app portfolio |
| Linux, Nginx & Postgres comfort | Minimal or zero | Basic Cloudflare/Docker fluency; no DBA on staff | Comfortable with pg_dump, iptables, systemd, and incident debugging |
| Compliance (SOC 2 / HIPAA / EU) | Need inherited SOC 2 / BAA fast | Need managed DB compliance while cutting web egress | Need strict EU-owned sovereignty (GDPR / Schrems II) or already run own SOC 2 |
| Workload shape | Bursty, low-traffic, preview-heavy | Media-heavy frontend + standard transactional DB | High DB RAM (16-64 GB+), heavy APIs, steady traffic, high consumer MAUs |
| Acceptable pager tolerance | Zero 3am server pages | Minimal (managed DB handles failover/PITR) | Ready to own uptime, patching, backups, and on-call drills |
When staying on Vercel and Supabase is the right engineering call
If your combined monthly bill sits below $250/mo, you are still hunting for distribution, or nobody on the team wants to debug pg_hba.conf and ip6tables at midnight, stay managed. Pre-PMF founders can ship for near zero on a $0 free-tier developer stack and defer server ownership until paying customers make the invoice hurt.
If you stay on managed PaaS, apply four guardrails in one afternoon so you never land in a $96,000 billing postmortem:
- Turn on Vercel Spend Management budget alerts and webhooks immediately, and decide explicitly whether to enable auto-pause.
- Leave Supabase Spend Cap turned ON until revenue covers metered egress and disk growth.
- Configure
ignoreCommandin every monorepo project so documentation or sibling-app commits never burn build hours. - Place Cloudflare Free or Vercel WAF rate limits in front of public SSR routes and image endpoints to blunt AI bots.
How to migrate off Vercel and Supabase without dropping sessions or data
If your invoice, egress, or EU sovereignty requirements clear the self-hosting threshold, work through these seven steps in order.
1. Decompose the invoice before touching servers
Break your last three monthly bills into seats, bandwidth egress, build minutes, database RAM, PITR, and auth MAUs. Before provisioning a VPS, confirm whether one misconfigured cache or monorepo build rule is driving 80% of the overage.
2. Test the hybrid offload first
Move static media and uploads to Cloudflare R2 ($0 egress) and turn on aggressive CDN caching on read-heavy endpoints. Test whether moving web traffic to Cloudflare Workers, Railway, or Fly.io fixes the bill without taking on database operations.
3. Rehearse a full pg_dump and column-privilege diff
Dump the live database with pg_dump -Fc and restore it onto target hardware. Pin search_path on every SECURITY DEFINER function, re-apply role search_path settings after any database rename (because ALTER ROLE ... IN DATABASE binds to OID), and diff pg_attribute column privileges directly because information_schema.role_table_grants hides them.
4. Preserve JWT signing keys and decouple transactional email
Keep the existing HS256 JWT secret intact so active browser sessions survive cutover without forced logouts. Disable raw GoTrue SMTP on VPS IP space and route confirmation and password-reset emails through Resend, Postmark, or Amazon SES on a dedicated sending subdomain.
5. Lock down origin traffic, IPv6, and public auth routes before DNS cutover
Block public exposure of database and Docker bridge ports, enforce default-DROP IPv6 host firewall rules, and disable PostgREST OpenAPI dumps (openapi-mode="disabled"). Restrict Cloudflare proxy IP trust to daily refreshed CIDRs, and put Nginx rate limits and Turnstile guards in front of GoTrue auth endpoints.
6. Automate encrypted offsite backups with a dead-man watchdog
Schedule pg_dump -Fc backups to R2 or Backblaze B2 with set -euo pipefail, and check object count and file size with pg_restore -l. Encrypt config and role globals with asymmetric keys the server cannot decrypt, add an hourly staleness watchdog, and run a real restore drill before launch.
7. Run a low-TTL DNS cutover and watch memory and 5xx logs for 72 hours
Lower DNS TTL 24 hours ahead, freeze writes briefly during the final dump and parity check, and switch NEXT_PUBLIC_SUPABASE_URL. Confirm active sessions and webhooks work immediately, then monitor Node heap growth, Postgres connections, and origin error logs continuously for three days.
Two scripts that prevent the worst soak failures
Disable session persistence and refresh timers on every server-side supabase-js client so long-lived Node processes never leak setInterval handles into OOM crashes:
import { createClient } from '@supabase/supabase-js';
export function createServerSupabase(url: string, key: string) {
return createClient(url, key, {
auth: {
autoRefreshToken: false,
persistSession: false,
detectSessionInUrl: false,
},
});
}
Never trust a bare pg_dump pipe in cron either. Fail loudly on pipe errors, keep table and column grants intact (never strip them with --no-owner --no-acl), back up roles and password hashes separately via pg_dumpall --globals-only, and validate every archive with pg_restore -l before uploading to R2 or Backblaze B2:
#!/usr/bin/env bash
set -euo pipefail
STAMP="$(date -u +%Y%m%dT%H%M%SZ)"
OUT="/tmp/app_${STAMP}.dump"
trap 'rm -f "$OUT"' EXIT
# Keep owners and table/column ACLs intact; archive roles separately via pg_dumpall --globals-only
pg_dump -Fc -n public -n auth -n private "$DATABASE_URL" > "$OUT"
BYTES="$(wc -c < "$OUT")"
OBJECTS="$(pg_restore -l "$OUT" | grep -cvE '^(;|$)')"
if [ "$BYTES" -lt 512000 ] || [ "$OBJECTS" -lt 100 ]; then
echo "Backup integrity gate failed: bytes=$BYTES objects=$OBJECTS" >&2
exit 1
fi
# Upload "$OUT" to write-only offsite R2 or Backblaze B2 bucket here
Run a real restore drill from that archive into a clean staging Postgres instance every quarter, and prune stale local .env cloud pooler URLs right after cutover so nobody runs a migration against the frozen cloud database by accident.
Methodology and dataset
All 16 rows in the TCO model use official public pricing pages checked on November 25, 2026 across Vercel, Supabase Cloud, Cloudflare (Workers, R2, Pro), Hetzner Cloud and Dedicated, and Amazon SES, with Euro rates converted at 1.08 USD/EUR excluding VAT. DevOps maintenance hours reflect recurring monthly patching, migrations, backup checks, and incident handling priced at a $125/hr blended engineering rate (with labor sensitivity tested at $0/hr, $45.03/hr, $53.45/hr, and $150/hr).
First-party operational numbers (2,129 commits, 112-day soak, 1,199 preserved sessions, 18 incidents, 14 hardening layers, 94% logo reduction, and n = 60 archived startup HTTP 402 mortality) come directly from SaaSCity's production repository and database records. External case-study figures are attributed to each company or founder's published post or thread. We publish the full benchmark dataset under CC BY 4.0: download the 2026 TCO CSV dataset.
Once your hosting stack is stable and you are back to shipping distribution, you can audit your live product metadata through SaaSCity's keyless MCP server or submit your product to SaaSCity.
FAQ
How much can you save by migrating from Vercel and Supabase to self-hosting?
On raw hosting bills checked November 25, 2026, self-hosting cuts monthly spend by 73% to 95%, from $240/mo down to $15-$26/mo at 10k MAU and from $3,970/mo down to $173-$219/mo at 500k MAU. Once you price engineering labor at $125/hr, managed PaaS stays cheaper at 1k and 10k MAU. Full self-hosting saves 13% at 100k MAU and 66% ($34,513/yr) at 500k MAU.
At what monthly bill or traffic level does self-hosting beat Vercel and Supabase?
With engineering time valued at $125/hr, the crossover sits near $800/mo in managed raw spend (roughly 5 seats, 100k MAU, 2 TB egress, and 14-day PITR). Below $250/mo, 4 to 6 hours of monthly patching and debugging wipes out the invoice savings; at 10k MAU ($240/mo managed), Lean Self-Hosted ($14.87, 6.0 hrs) only breaks even below $45.03/hr and Self-Hosted Coolify ($26.21, 5.0 hrs) below $53.45/hr.
What is the best hybrid alternative to full self-hosting?
Move media and high-bandwidth assets to Cloudflare R2 ($0.015/GB-mo, $0 egress), run Next.js on Cloudflare Workers ($5/mo, $0 seats, $0 egress) or Railway/Fly.io, and leave Postgres on Supabase Cloud. That cuts raw bills by 20% to 40% across our four modeled tiers (20.4% at Tier 2, and 30% to 40% at Tiers 1, 3, and 4) without taking on database durability, and at 100k MAU it wins total cost of ownership at $877.57/mo.
How much RAM and server capacity does self-hosted Supabase need?
Official self-hosted Supabase runs 12+ Docker containers and lists 4 GB RAM / 2 vCPU as a minimum only when Logflare and Vector are disabled. Stable production needs 8 GB+ RAM / 4 vCPU because Kong spikes up to 2.5 GB and Analytics uses 500 MB to 1.8 GB. Dropping Kong, Supavisor, Studio, and Logflare for native Postgres 17, PostgREST, GoTrue, and bridge-isolated Realtime fits comfortably on 4-8 GB.
Can you migrate off Supabase Cloud without logging out active users?
Yes. If you preserve the exact HS256 JWT signing secret from your Supabase Cloud project in your self-hosted GoTrue and PostgREST configuration, existing access and refresh tokens remain valid across the cutover. During SaaSCity's August 5, 2026 cutover, all 1,199 active auth users kept their sessions with zero app code changes beyond switching NEXT_PUBLIC_SUPABASE_URL.
What Next.js features break or change when you leave Vercel?
Leaving Vercel removes automatic Skew Protection, off-box Edge image resizing, and zero-config global ISR synchronization. Self-hosted Next.js needs output: 'standalone' (or careful PM2 deploys), a shared Redis cacheHandler with cacheMaxMemorySize: 0 for multi-replica ISR, in-process sharp memory budgeting, manual SIGTERM draining, and CI-built images so next build never starves production Postgres of RAM.
What are the biggest hidden risks of self-hosting a production SaaS?
The biggest failures are silent broken Postgres backups, Docker bypassing UFW firewall rules on IPv4 and IPv6, and exposed PostgREST schemas or unprotected GoTrue auth endpoints once Kong is gone. Long-lived Node memory leaks that ephemeral serverless containers hide and control-plane zero-days, like Coolify's January 2026 disclosure of 11 critical CVEs rated up to CVSS 10.0, round out the main risks.
Is Coolify or Dokploy enough to replace Vercel and Supabase for a small team?
Coolify and Dokploy replicate Git push deploys, preview URLs, Traefik TLS, and one-click Postgres templates well, cutting setup time sharply compared to bare Ansible or Nginx. They still leave you responsible for OS security, database upgrades, backup restore drills, and control-plane vulnerabilities; any self-hosted PaaS admin UI must sit behind Tailscale or a strict VPN allowlist, never on the public internet.
Does self-hosting hurt SOC 2 compliance for B2B SaaS?
Self-hosting shifts the entire infrastructure audit scope onto your team. Supabase Team ($599/mo, or $7,188/yr) includes inherited SOC 2 Type II and ISO 27001 reports plus HIPAA BAA eligibility. On your own servers, you fund compliance automation ($5,000-$15,000/yr), penetration testing ($3,000-$8,000), CPA Type II audits ($7,000-$20,000+), and ongoing evidence collection yourself.
When should a SaaS founder stay on Vercel and Supabase instead of self-hosting?
Stay managed when your combined Vercel and Supabase bill is under $250/mo, you are still searching for product-market fit, nobody on the team has real Linux and Postgres operations experience, or enterprise buyers require SOC 2 Type II or a HIPAA BAA immediately. Turn on Vercel Spend Management alerts, leave Supabase Spend Cap on, and ship product until the invoice justifies the ops workload.
Ready to put your product on the map?
Claim a permanent building on SaaSCity so founders and software buyers can discover your product on the live map. Pay once from $19.99, live within 24 hours.


