Hosting

Self-hosted Supabase vs Supabase Cloud

What the official self-hosting setup includes, what it leaves to you (backups, upgrades, HTTPS, auth emails, storage, the dashboard), what Supabase Cloud's plans cost, and how to choose between them.

TL;DR

  • Self-hosted Supabase (opens in a new tab) is the same open-source stack run with Docker (opens in a new tab) Compose on your own server: the software is free, the server and the work are yours.
  • The official guide leaves backups, high availability, monitoring, HTTPS and server security to you, and some platform features (branching, managed backups and PITR, the Management API) do not exist self-hosted.
  • Supabase Cloud: Free at $0 with 500 MB of database and projects paused after a week of inactivity; Pro from $25 a month with daily backups kept 7 days (November 2026).
  • A small app is usually cheaper and safer on Pro; self-host for data control, compliance, or large storage and traffic, and only if someone will run the backups and upgrades.
On this page

Self-hosted Supabase and Supabase Cloud run the same open-source software; the difference is who operates it. On Supabase Cloud, Supabase runs the servers, backs up the database on paid plans, upgrades the stack and gives you features that only exist on its platform. Self-hosted, you run the official Docker Compose setup on your own server and own everything that comes with it: backups, upgrades, HTTPS, email, security and monitoring. For a small production app, Cloud's Pro plan is usually cheaper once you count your time, and safer by default. Where the backend runs is one of the decisions on the production checklist for a vibe-coded app.

The facts here come from Supabase's self-hosting guide, the Compose file of release self-hosted/v0.8.4 and its pricing page, checked on 11 November 2026. I did not run the full self-hosted stack for this article; the Row Level Security behaviour discussed at the end was tested on PostgreSQL (opens in a new tab) and PostgREST, as described in the Supabase anon key article.

Supabase self-hosted vs Cloud, side by side

Supabase CloudSelf-hosted
Who runs servers and upgradesSupabaseYou
ProjectsSeveral (two active on Free)One per stack; Studio has no organisations or projects
BackupsDaily on Pro (7 days) and Team (14 days); none on FreeNot covered by the guide: yours to build
Point-in-time recovery$100 a month per 7 days of retentionNot available as a managed feature
Branching, Management API, ETL, analytics and vector bucketsAvailableNot available
HTTPSIncludedHTTP by default; you add a reverse proxy
Auth emailsA built-in sender for testing only (team members' addresses, a few an hour); production needs your own SMTPYour own SMTP server or provider
File storageIncluded, priced by usageThe server's disk by default, or your S3-compatible bucket
SupportBy planCommunity (GitHub (opens in a new tab), Discord (opens in a new tab), Reddit)
Data locationSupabase's regionsWherever your server is

What the self-hosting setup includes

The official route is Docker Compose; Supabase calls it "the fastest and recommended way to self-host". Kubernetes (opens in a new tab) options exist, maintained by the community. The Compose file of self-hosted/v0.8.4 starts these services:

ServiceWhat it doesImage in v0.8.4
StudioThe dashboardsupabase/studio
API gatewayRoutes requests to the services (Envoy; Kong as an option)envoyproxy/envoy:v1.39.6
AuthSign-up, sign-in, tokenssupabase/gotrue:v2.197.0
RESTThe Data API, PostgRESTpostgrest/postgrest:v14.18
RealtimeChange subscriptions over WebSocketssupabase/realtime:v2.148.3
StorageFiles, with imgproxy for image transformationssupabase/storage-api:v1.89.12
MetaPostgres management for Studiosupabase/postgres-meta:v0.100.0
Edge FunctionsDeno runtime for your functionssupabase/edge-runtime:v1.77.9
PostgresThe databasesupabase/postgres:17.6.1.136
SupavisorConnection poolersupabase/supavisor:2.9.13

Logs and analytics (Logflare and Vector) are not in the default configuration; an optional override adds them, and more memory use with them.

The server it needs: at least 4 GB of memory, 2 CPU cores and 40 GB of SSD; Supabase recommends 8 GB, 4 cores and 80 GB. You can remove services you do not use (Realtime, Storage, imgproxy, Edge Runtime) to save resources.

Setting it up, in the guide's order: clone the repository at the release tag (git clone --depth 1 --branch self-hosted/v0.8.4 https://github.com/supabase/supabase), copy docker/ into a project folder, copy .env.example to .env, run sh utils/generate-keys.sh and sh utils/add-new-auth-keys.sh to replace the example secrets, set SUPABASE_PUBLIC_URL, API_EXTERNAL_URL and SITE_URL, then docker compose pull and sh run.sh start. The guide is blunt about the defaults: "you should never start your self-hosted Supabase using these defaults". The self-hosted stack uses the new key format too: SUPABASE_PUBLISHABLE_KEY for clients and SUPABASE_SECRET_KEY for trusted servers, rotated with sh utils/rotate-new-api-keys.sh --update-env.

What it leaves to you

Supabase's overview lists the self-hoster's responsibilities: provisioning and maintaining the server, hardening it and patching the OS and services, configuring the services, maintaining Postgres, high availability and scaling, backups and disaster recovery, and monitoring and uptime. In practice:

  • Backups. The Docker guide does not cover them, and managed backups and point-in-time recovery are platform features. You need scheduled dumps or volume snapshots, copied off the server, and a restore you have actually tried. Backups you can restore covers that for a small server.
  • HTTPS. "By default, Supabase is accessible over HTTP." The guide recommends a reverse proxy such as Caddy (opens in a new tab) or nginx (opens in a new tab) in front. Deploying a web app to a VPS shows a Caddy setup with automatic certificates.
  • The dashboard. Studio is protected by HTTP basic authentication with one username and password from .env; change both. The Compose file publishes the API gateway (with Studio behind it) on port 8000 and the Supavisor pooler on the Postgres ports 5432 and 6543, on every network interface, and Docker routes published ports past a UFW firewall. Do not leave Studio or Postgres open to the internet: bind them to 127.0.0.1 or a private network, and put only the HTTPS proxy in front. Supabase's self-hosting overview points to a setup with NetBird that keeps them on a private network.
  • Upgrades. Supabase publishes stable snapshots of the Compose setup "approximately once a month". update.sh updates in place with a three-way merge, and single services can be moved to a new image tag. Each one is yours to schedule, read and test.
  • Auth emails. Sign-up confirmations and password resets need SMTP settings in .env (SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS, SMTP_ADMIN_EMAIL, SMTP_SENDER_NAME). The guide recommends AWS (opens in a new tab) SES.
  • Storage. Files go to the server's own disk through a bind mount by default. For durability, connect an S3-compatible backend (AWS S3, Cloudflare (opens in a new tab) R2, MinIO and others) and back that up too.
  • The server itself. Firewall, SSH and security updates are yours: see how to harden an Ubuntu server and Docker and UFW.
  • Monitoring. Nothing tells you the disk is full or the database is down unless you set it up: monitoring a small server.
  • Secrets. .env holds the database password, the JWT secret and the keys. Supabase "strongly" recommends a secrets manager in production.

And one trap: the Supabase CLI's local stack (supabase start) is a development tool. Supabase says it "is not hardened for production and must not be exposed to external traffic".

What Supabase Cloud costs

From Supabase's pricing page on 11 November 2026:

FreeProTeam
Price$0from $25 a monthfrom $599 a month
Compute creditsNone$10 of credits, one Micro instance (1 GB)$10 of credits
Database size500 MB8 GB per project, then $0.125 per GB8 GB per project, then $0.125 per GB
Egress5 GB250 GB, then $0.09 per GB250 GB, then $0.09 per GB
File storage1 GB100 GB, then $0.0213 per GB100 GB, then $0.0213 per GB
Monthly active users50,000100,000, then $0.00325 each100,000, then $0.00325 each
BackupsNoneDaily, kept 7 daysDaily, kept 14 days
InactivityPaused after 1 weekNot pausedNot paused

The compute credits cover a Micro instance; larger ones cost more (Small with 2 GB is $15 a month, Medium with 4 GB $60, Large with 8 GB $110). Spend caps are on by default on Pro; to pay for usage beyond the plan's limits, you turn the cap off in the dashboard. Free has no automatic backups, which rules it out for anything you cannot afford to lose.

Comparing the cost honestly

One small production app on Pro costs $25 a month, with backups, HTTPS and upgrades included. Auth emails need an SMTP provider either way: Supabase's built-in sender delivers only to your project team's addresses, at 2 messages an hour, and Supabase says it is not meant for production.

Self-hosting it needs a server that meets Supabase's recommendation of 8 GB and 4 cores. At Hetzner (opens in a new tab), the CPX32 (4 vCPU, 8 GB, 160 GB NVMe) listed €30.49 a month excluding VAT in Helsinki and €35.99 in Nuremberg on 11 November 2026, with 20 TB of traffic; the minimum-spec CPX22 (2 vCPU, 4 GB) was €16.99 in Helsinki. Hetzner's cheaper Cost-Optimized plans, such as the CX33 (4 vCPU, 8 GB) at €8.99, were marked not available that day. Add backup storage, and the hours for setup, upgrades and the occasional restore test. For one small app, self-hosting rarely saves money; Hetzner vs DigitalOcean compares the server prices in more detail.

The comparison changes with volume: Pro charges for egress and database size beyond its limits, while a server includes its traffic allowance and disk at a flat price. An app that serves a lot of files, or keeps a large database, can come out cheaper on its own server, provided the operations are covered.

Which one to choose

Choose Supabase Cloud when:

  • you have one or a few small apps, and nobody wants to be on call for a database;
  • you want backups, point-in-time recovery or branching without building them;
  • the app came from Lovable (opens in a new tab), Bolt (opens in a new tab) or another builder on top of Supabase, and the next priority is the frontend, not the backend.

Choose self-hosting when:

  • the data must stay on infrastructure you control, or a compliance rule excludes managed services;
  • your storage, traffic or database size makes usage pricing expensive;
  • you, or someone you pay, will run the backups, upgrades, monitoring and security of a stack of eleven containers.

Many people deploy the frontend to their own server first and keep Supabase Cloud, which is a sound first step.

The same rules apply in both

Self-hosting changes who runs Supabase, not how its security works. The publishable key is still public, every exposed table still needs Row Level Security, and the secret key still never reaches a browser; the Supabase anon key and RLS explains each. On your own server, you also own the network around it: the database port and Studio should not answer from the internet at all.

Doing this with OpsCrew

OpsCrew does not set up self-hosted Supabase. When your app already uses a hosted database, OpsCrew's interview asks whether to keep it or to run one on the server, and if you keep it, OpsCrew runs nothing for it; when the app stores files in Supabase Storage through an S3 client, keeping that storage is the default. Its free npx opscrew scan checks the repository for exposed Supabase data, such as tables without Row Level Security. If your app needs only a Postgres database, OpsCrew can run PostgreSQL 17 next to the app on the same server, with a generated password, no port open to the internet and snapshots you can restore; see databases.

Back to the checklist

Where the backend runs is one decision on the production checklist for a vibe-coded app. Whichever you choose, the checklist's security items, starting with Row Level Security and a secret scan, come before launch.

Key facts

FactValueSource
Supabase Pro plan25 USD per month, fromIncludes $10 of compute credits (one Micro instance), 8 GB database per project, 250 GB egress, 100 GB file storage, 100,000 monthly active users, daily backups kept 7 days.Supabase pricing (opens in a new tab)Verified on
Supabase Free plan limits500 MB database, 5 GB egress, 1 GB file storage, 50,000 MAUTwo active projects; paused after one week of inactivity; no automatic backups.Supabase pricing (opens in a new tab)Verified on
Point-in-time recovery on Supabase Cloud100 USD per month per 7 days of retentionSupabase pricing (opens in a new tab)Verified on
Self-hosting system requirements4 GB RAM, 2 cores, 40 GB SSD minimum; 8 GB, 4 cores, 80 GB recommendedSelf-Hosting with Docker (opens in a new tab)Verified on
Hetzner CPX32 (4 vCPU, 8 GB, 160 GB NVMe)30.49 EUR per month, excl. VATHelsinki; €35.99 in Nuremberg. The cheaper Cost-Optimized plans were marked not available on 11 November 2026.Hetzner Cloud, Regular Performance (opens in a new tab)Verified on

Frequently asked questions

Is self-hosted Supabase free?

The software is free and open source, and the official Docker Compose setup costs nothing to use. You pay for the server it runs on (at least 4 GB of memory, 8 GB recommended), for backup storage, and with your time for upgrades, security and monitoring.

Can I move from Supabase Cloud to self-hosted later?

Yes. Both run Postgres, so the database moves with standard Postgres dump and restore, and the client libraries work against either. Files in Storage, project settings such as SMTP and redirect URLs, and the API keys have to be moved or recreated separately.

Sources

  1. Self-Hosting (opens in a new tab), Supabase, accessed on
  2. Self-Hosting with Docker (opens in a new tab), Supabase, accessed on
  3. docker-compose.yml at self-hosted/v0.8.4 (opens in a new tab), Supabase, accessed on
  4. Supabase pricing (opens in a new tab), Supabase, accessed on
  5. Send emails with custom SMTP (opens in a new tab), Supabase, accessed on
  6. Hetzner Cloud, Regular Performance (opens in a new tab), Hetzner, accessed on
  7. Hetzner Cloud, Cost-Optimized (opens in a new tab), Hetzner, accessed on
  8. Databases (opens in a new tab), OpsCrew, accessed on
  9. Object storage (opens in a new tab), OpsCrew, accessed on
Edit this article
  • Hosting

    Heroku alternatives for apps that need a database

    Render, Railway, Fly.io, DigitalOcean App Platform, a self-hosted PaaS or a plain server, compared for a web process, a worker, cron jobs and PostgreSQL, with each provider's own prices.

    9 min read

  • Hosting

    Moving off Vercel, Heroku, Render or Railway to your own server

    The self-hosted alternative to a hosting platform: what you take over, when to stay, what a server costs, the three ways to run one, and a tested migration path to DNS cutover.

    11 min read

  • Deploying

    Migrate a Heroku app and its Postgres database to a VPS

    A tested migration from Heroku to your own server: the Procfile as Docker Compose services, config vars to a file, Scheduler to supercronic, Heroku Postgres restored with pg_restore, a DNS cutover and a way back.

    13 min read

Put OpsCrew to work on your app.

Run npx opscrew init in your app's repository. It checks your tools and tokens first, for free.