pull/this/repo
RoundupGit, GitHub and developer tools#self-hosting#docker#open-source#linux

How to self-host Supabase with Docker

By Pull This RepoPosted 5 min read

Short answer

To run Supabase self-hosted, install Docker, clone the supabase/supabase repo at a self-hosted tag, copy its docker folder into a new project folder and copy .env.example to .env. Run sh utils/generate-keys.sh to replace the default secrets, then sh run.sh start. Studio opens at port 8000 with the dashboard password you set. Plan on at least 4 GB of RAM.

RoundupHow to self-host Supabase with Docker

You can run Supabase self-hosted on your own server with Docker, and Supabase's docs call Docker "the fastest and recommended way" to do it. You get the same building blocks as the hosted service: a Postgres database, auth, a REST API, file storage, realtime and edge functions, plus the Studio dashboard. This guide follows Supabase's own self-hosting docs and the supabase/supabase repo, read on 22 November 2026, from hardware to first login, and is honest about what the self-hosted version leaves out.

What do you get with Supabase self-hosted?

On 22 November 2026 the supabase/supabase repo had 115,320 stars and an Apache-2.0 licence. The self-hosting docs say self-hosted Supabase "does not phone home or collect any telemetry," and that it is "community-supported," through GitHub Discussions, GitHub Issues, Discord and Reddit.

Supabase platform (hosted)Supabase self-hosted
Who runs the serversSupabaseYou
Projects per StudioMany, in organizationsOne project, per the docs
BranchingYesNot available
Managed backups and point in time recoveryYesNot available; you back up yourself
Logs and AnalyticsBuilt inOff by default; opt in
API key rotationIn the DashboardIn your .env file
SupportSupabase plansCommunity

Supabase itself recommends the managed platform if you are new to Linux administration, Docker and networking. Self-hosting fits when you need full control over your data, have compliance rules that rule out managed services, or want an isolated environment.

What hardware do you need?

The Docker guide lists:

MinimumRecommended
RAM4 GB8 GB or more
CPU2 cores4 cores or more
Storage40 GB SSD80 GB SSD or more

On a small server, trim the stack. The guide says unused services such as Realtime, Storage, imgproxy and Edge Runtime can be removed from docker-compose.yml to reduce requirements. If your app only needs a database, auth and the REST API, removing the rest frees memory for Postgres, which is where it matters most.

You also need Docker with Docker Compose, and Git. On an Ubuntu server, our guide to installing Docker on Ubuntu gets you there, and installing Git covers the other half.

How do you install Supabase self-hosted?

Step 1: Get the files

Supabase publishes stable self-hosting snapshots as tags. On 22 November 2026 the docs used self-hosted/v0.8.4, the newest such tag in the repo:

terminal
git clone --depth 1 --branch self-hosted/v0.8.4 https://github.com/supabase/supabase
mkdir supabase-project
cp -rf supabase/docker/. supabase-project
cd supabase-project && cp .env.example .env
docker compose pull

The shallow clone keeps the download small. Your project now lives in supabase-project, separate from the cloned repo.

On Linux, the docs also offer a setup script that automates the install, generates secrets and asks for your URLs: curl -fsSL https://supabase.link/setup.sh | sh. The page says you can inspect the script before running it, which is worth doing with any piped install.

Step 2: Replace every default secret

This step is not optional. The docs say "you should never start your self-hosted Supabase using these defaults." The .env.example file ships with placeholder values for keys such as POSTGRES_PASSWORD, JWT_SECRET, ANON_KEY, SERVICE_ROLE_KEY, SUPABASE_PUBLISHABLE_KEY, SUPABASE_SECRET_KEY, DASHBOARD_PASSWORD, SECRET_KEY_BASE, VAULT_ENC_KEY and others.

The project includes scripts to generate them:

terminal
sh utils/generate-keys.sh
sh utils/add-new-auth-keys.sh

The first generates secrets; the second adds the new API keys and an asymmetric key pair. Then open .env and set the rest by hand:

  • DASHBOARD_PASSWORD (and optionally DASHBOARD_USERNAME) for logging in to Studio. The docs say the password must include at least one letter, must not be numbers only, and must not contain special characters.
  • POSTGRES_PASSWORD: the docs advise letters and numbers only, to avoid URL encoding problems.
  • SUPABASE_PUBLIC_URL, API_EXTERNAL_URL and SITE_URL: the addresses your instance and your app will be reached at.

The docs are blunt about the secret key: "Never expose this in client code." Also never commit .env to Git.

Step 3: Start the stack

terminal
sh run.sh start

The docs say this is "equivalent to docker compose up -d --wait": it starts every service and waits until they report healthy. The first start takes a while. Check what is running with:

terminal
docker compose ps

To see your generated credentials again later:

terminal
sh run.sh secrets

How do you open Supabase Studio?

Go to port 8000 on your server in a browser:

text
http://localhost:8000

From another machine, use the server's address instead of localhost. Studio is protected by HTTP basic authentication with the dashboard username and password from .env. The same port serves the APIs:

APIPath
REST/rest/v1/
Auth/auth/v1/
Storage/storage/v1/
Realtime/realtime/v1/
Edge Functions/functions/v1/hello (the sample function)

Point the Supabase client libraries at your public URL with the publishable key, and your app talks to your own instance.

How do you put it on the internet safely?

The docs recommend HTTPS through a reverse proxy for production, and say it matters especially for OAuth providers. The docker folder in the repo includes compose override files for Caddy and Nginx alongside the default Envoy gateway, with Kong as an optional override. Keep port 8000 closed to the public and expose only the proxy on 443.

Connections to Postgres go through the Supavisor pooler by default.

How do you stop, update or remove it?

terminal
sh run.sh stop

To update, run update.sh from your project folder. The docs say it performs a three way merge of the latest self-hosted/v* configuration, that stable snapshots come out "approximately once a month," and that images "may lag behind the latest updates on Docker Hub." Mixing image versions by hand is possible, but compatibility "is not guaranteed."

To enable logs and analytics, which are not in the default setup:

terminal
sh run.sh config add logs

The docs note this increases resource needs.

To tear it all down, sh reset.sh removes the stack and resets .env. The docs warn this "destroys all data, including the database and storage volumes!" Our Docker commands cheat sheet helps when you need to look at logs or volumes directly.

What if a service will not start?

Start with docker compose ps to see which container is unhealthy, then read its logs with docker compose logs and the service name. The docs mention one specific cause: if the API gateway fails with an entrypoint error, check for CRLF line endings in the docker/ folder. Wrong or missing secrets in .env are the other usual suspect after an edit.

What is the catch?

Self-hosted Supabase is one project, with no branching, no managed backups or point in time recovery, no ETL and no Management API, and it is community supported. Backups, security updates and uptime are yours. It is a good fit for an internal tool, a side project you want to own end to end, or data that has to stay on your hardware. For a business app with a small team, compare the cost of your time against the hosted plans before you commit.

Pull it. Stash it.

Questions people ask

Is self-hosted Supabase free?

Yes, the software is. The supabase/supabase repo is licensed Apache-2.0, and the self-hosting docs say self-hosted Supabase does not phone home or collect any telemetry. You pay for the server it runs on and the time to look after it, and support comes from the community rather than Supabase.

What are the hardware requirements for self-hosted Supabase?

Supabase's Docker guide lists a minimum of 4 GB of RAM, 2 CPU cores and 40 GB of SSD storage, and recommends 8 GB or more of RAM, 4 or more cores and 80 GB or more of SSD. You can lower the needs by removing unused services such as Realtime, Storage, imgproxy or Edge Runtime.

What is missing from self-hosted Supabase?

The docs say self-hosted Supabase runs as a single project, so Studio does not support multiple organizations or projects. Branching, advanced metrics beyond logs, managed backups and point in time recovery, ETL and the Management API are not available. Logs and Analytics are off by default.

How do I update self-hosted Supabase?

Run the update.sh script in your project folder. The docs say it does a three way merge of the latest self-hosted configuration, and that stable snapshots come out roughly once a month. Back up your database and your .env file before updating, since your data lives in the Docker volumes.

Can I use the Supabase client libraries with a self-hosted instance?

Yes. Point the client at your instance's public URL instead of a supabase.co project URL and use the publishable key from your .env file. The REST, Auth, Storage, Realtime and Edge Functions APIs are all served through the same gateway on port 8000.

Sources

  1. 1Supabase Docs: Self-Hosting with Docker (read 2026-11-22)
  2. 2Supabase Docs: Self-Hosting (read 2026-11-22)
  3. 3supabase/supabase

Get tomorrow's repo in your feed

One free, open source repo a day as a short video, shown working, with the catch named. Pull it. Stash it.