we earn commissions when you shop through the links below

How to self-host Supabase

Supabase publishes an official Docker Compose setup that runs the whole stack on one server: Postgres, Studio (the dashboard), Auth, the REST API, Realtime, Storage and Edge Functions. On Linux, one script installs it and generates the secrets. Every command below comes from Supabase's self-hosting docs.

Steps and prices checked Dec 1, 2026 against the official docs (sources below). Supabase on GitHub: 116k stars, Apache-2.0 license, active, latest release self-hosted/v0.8.5 on Nov 23, 2026 (as of Nov 30, 2026).

Before you start: Supabase says self-hosted Supabase is community supported and that you are responsible for server maintenance, security updates, backups and uptime. Some managed-platform features are not available when self-hosting, including branching, managed backups and point-in-time recovery, and the Management API. If you just want a backend for an app, the hosted Free plan is the easier start.

Three ways to run it

OptionBest forCostHow
Railway (one click)No server to manage. Remove services you do not need.Hobby plan $5/month, includes $5 of usage; extra usage billed (memory about $10 per GB per month)A community template deploys the Supabase services with Postgres and an S3 bucket: deploy Supabase on Railway.
DigitalOcean DropletThe official Docker setup on a server you control.$24/month (4 GiB, 2 vCPUs, the minimum) or $48/month (8 GiB, 4 vCPUs, the recommended size)Create a Droplet at DigitalOcean, then follow the steps below. Supabase's own self-hosting demo uses a DigitalOcean Droplet.
Supabase CloudNot self-hosting at all.Free $0 (500 MB database, paused after 1 week of inactivity); Pro from $25/monthSign up at supabase.com.

What you need

Step by step (your own server)

  1. Create the server. Create a Droplet with at least 4 GiB of RAM and 2 vCPUs (the $24/month size) running Ubuntu or Debian, with SSH-key login. Pick the 8 GiB size if you want Supabase's recommended specs.
  2. Run the official install script. From the folder where you want the project, run Supabase's setup script. It installs git, openssl, jq and Docker if missing, downloads the Docker configuration into supabase-project, asks for your URLs, generates every secret and key (including a random dashboard password) and pulls the images. You can read the script at that link before you run it.
    curl -fsSL https://supabase.link/setup.sh | sh

    If the script installed Docker, log out and back in before the next step; otherwise the docker commands need sudo. Not on Linux? Supabase's docs also cover a manual install with git clone on any OS.

  3. Start Supabase. This starts every service and waits until they are healthy. Then check that each one shows Up (healthy):
    cd supabase-project && \
    sh run.sh start

    Check the status:

    docker compose ps
  4. Find your credentials. Your app needs the publishable key (safe for client code), the secret key (server-side only, never in client code) and SUPABASE_PUBLIC_URL. The dashboard login is DASHBOARD_USERNAME and DASHBOARD_PASSWORD. All of them are in .env, or print them with:
    sh run.sh secrets
  5. Open Studio. The dashboard is served through the API gateway on port 8000, at http://<your-server-ip>:8000. Log in with the dashboard username and password from the previous step. The APIs live under the same address: /rest/v1/, /auth/v1/, /storage/v1/ and /realtime/v1/.
  6. Turn on HTTPS. Point an A record for your domain at the server, then set the HTTPS URLs in .env (SITE_URL is your own app, where users land after signing in):
    SUPABASE_PUBLIC_URL=https://<your-domain>
    API_EXTERNAL_URL=https://<your-domain>/auth/v1
    SITE_URL=https://<your-app-domain>

    Turn on the bundled Caddy reverse proxy, which gets and renews a Let's Encrypt certificate automatically, and restart. Then curl -I https://<your-domain>/auth/v1/ should return a 401, which means Auth is reachable over HTTPS.

    sh run.sh config add caddy
    sh run.sh start
  7. Set up email. Auth needs a real SMTP server to send emails. Fill in these values in .env with your provider's details (Supabase suggests AWS SES), then run sh run.sh recreate so the services pick up the change:
    SMTP_ADMIN_EMAIL=admin@example.com
    SMTP_HOST=smtp.example.com
    SMTP_PORT=465
    SMTP_USER=your-smtp-user
    SMTP_PASS=your-smtp-password
    SMTP_SENDER_NAME=your-sender-name

Updating

Supabase publishes a tested snapshot of the Docker setup about once a month. Back up your database first: the update.sh script backs up your configuration files but not Postgres or Storage data. From the project folder, preview the update, apply it, then pull the new images and recreate the containers:

sh update.sh --dry-run
sh update.sh
sh run.sh pull
sh run.sh recreate

Backups

Self-hosting has no managed backups, so you set them up yourself. Back up the Postgres database (its data lives in volumes/db/data), the uploaded files in volumes/storage, and your .env, which holds every secret. For pg_dump, Supabase's docs say to use a direct Postgres connection, which is not exposed by default; see "Accessing Postgres" in the sources. If you expose it, restrict access with a firewall. Keep at least one copy off the server.

Uninstalling

Careful: this deletes all data, including the database and storage volumes.

sh reset.sh

What it costs

4 GiB / 2 vCPU DigitalOcean Droplet (Supabase's minimum)$24/month
8 GiB / 4 vCPU DigitalOcean Droplet (recommended)$48/month
Railway Hobby plan$5/month, includes $5 of usage; extra usage billed per second (memory about $10 per GB per month)
Supabase Cloud (for comparison)Free $0 (500 MB database, 50,000 monthly active users, 2 active projects); Pro from $25/month with daily backups kept 7 days
DigitalOcean Basic Droplet sizes and list prices
MemoryvCPUSSDPrice
512 MiB1 vCPU10 GiB$4/month
1 GiB1 vCPU25 GiB$6/month
2 GiB1 vCPU50 GiB$12/month
2 GiB2 vCPUs60 GiB$18/month
4 GiB2 vCPUs80 GiB$24/month
8 GiB4 vCPUs160 GiB$48/month

List prices checked Dec 1, 2026; they can change. Some hosting links on this page are affiliate links, which never change what we recommend.

FAQ

How much RAM does self-hosted Supabase need?

Supabase lists 4 GB of RAM, 2 CPU cores and a 40 GB SSD as the minimum for running all components, and recommends 8 GB+ RAM, 4+ cores and 80 GB+ SSD. On DigitalOcean that is the $24/month Droplet at minimum or the $48/month one for the recommended size. You can lower the requirements by removing services you do not use, such as Realtime, Storage, imgproxy or Edge Runtime.

Is self-hosted Supabase free?

The software is free and open source; you pay only for the server. Compare that with the hosted Free plan ($0, 500 MB database, projects paused after a week of inactivity) and Pro (from $25/month, daily backups kept 7 days).

What is missing when you self-host Supabase?

Self-hosted Supabase runs as a single project, so Studio does not support multiple organizations or projects, and most settings are environment variables. Supabase says branching, advanced metrics, managed backups and point-in-time recovery, analytics and vector buckets, ETL and the Management API are not available.

Does self-hosted Supabase send telemetry?

No. Supabase says self-hosted Supabase does not phone home or collect telemetry. The separate Supabase CLI does collect usage telemetry, and it can be turned off.

Can I use the Supabase CLI to self-host?

No. Supabase says the local stack that the CLI runs is for development and testing, is not hardened for production and must not be exposed to external traffic. Use the Docker setup in this guide.

Related

Sources

Commands are adapted from the official docs linked above (example domains replaced with placeholders). Spot something out of date? Tell us at hello@opensourceswap.com.