Self-Hosting7 min readUpdated November 23, 2026

How Do You Self-Host Supabase?

Supabase is a bundle of services, not one app. Self-hosting means running Postgres, GoTrue, PostgREST, Storage, and the rest, and owning the backups.

Self-hosting Supabase means running its Docker Compose stack: Postgres, GoTrue for auth, PostgREST for the API, Storage, Realtime, and Kong in front. The install is a compose up. The real work is backups, upgrades, and the fact that you now own the database.

Self-hosting Supabase runs a set of services, not one binary. Postgres is the database. GoTrue handles authentication. PostgREST turns your tables into a REST API. Storage serves files. Realtime pushes changes over websockets. Kong sits in front as the API gateway.

What does self-hosting Supabase actually run?

Self-hosting Supabase runs a set of services, not one binary. Postgres is the database. GoTrue handles authentication. PostgREST turns your tables into a REST API. Storage serves files. Realtime pushes changes over websockets. Kong sits in front as the API gateway.
The Docker Compose file wires all of these together with the right connections. You clone the repo, edit the environment file, and run docker compose up. In a few minutes you have the same API surface the hosted product exposes. The important shift is ownership. The hosted version manages backups, upgrades, and monitoring for you. Self-hosted, those become your job. The stack is the easy part. The operations are the real work.

How do you install self-hosted Supabase with Docker Compose?

You install it by cloning the Supabase repo, copying the example environment file, and running docker compose up. The compose file pulls the images and starts every service. Before you expose it, edit the environment file and replace every default secret.
The defaults matter. The example file ships with placeholder keys for the JWT secret, the anon key, and the service role key. Those placeholders are public. If you expose the stack without changing them, anyone can mint a valid token. Then put the stack behind your own reverse proxy with TLS. Kong listens on a local port; your proxy terminates TLS and forwards to it. Do not open the raw ports to the internet. The install is a compose up, but the hardening is the part that keeps it safe.

How do you back up self-hosted Supabase?

Back up two things: the Postgres database and the Storage volume. The database holds your schema, rows, and auth users. The Storage volume holds the uploaded files. A database backup alone restores a working app with broken image links.
Use pg_dump for the database on a schedule and copy the dump off the server. For Storage, snapshot the volume or sync the files to object storage. Keep both in the same backup set so a restore brings back a consistent state. This is the work the hosted version did for you. It is also the work most people skip. Test a restore into a throwaway stack once a quarter, because a self-hosted Supabase without a tested backup is one disk failure away from losing everything.

What breaks in self-hosted Supabase?

The first thing that breaks is an upgrade. Supabase ships often, and a Postgres major version bump needs a migration path. If you run a floating image tag, a restart can pull a new version and fail to start. Pin your tags and read the release notes before you bump.
The second is disk. The Storage volume grows with every upload, and Postgres grows with every row and every WAL segment. Watch disk usage and set an alert. A full disk stops Postgres and takes the whole stack down. The third is a missing environment variable. A service that cannot find its config exits on start, and the stack comes up half-broken. Keep your environment file in version control, minus the secrets, so a rebuild has every variable it needs.

4 Tips to Get Started

1

Change every default secret in the .env before you expose the stack. The compose file ships with placeholder keys that are public.

2

Back up Postgres with pg_dump and the Storage volume separately. A database backup without the files restores broken image links.

3

Pin the image tags. Supabase ships often, and a floating tag can pull a breaking change on your next restart.

4

Put Kong behind your own reverse proxy with TLS. Do not expose the raw ports to the internet.

Ready to Stop Worrying About Infra?

Knowledge is the first step. Get a free 1-hour diagnostic and see where your infrastructure leaks time, money, and focus.

Sources & References

roqy.io cites authoritative sources including engineering blogs, vendor documentation, industry surveys, and academic research to ensure accuracy.

R

Ron Cohen — Founder & DevOps Engineer

Content reviewed by the roqy.io team. Our guides are based on publicly available data and cited sources above.

Disclaimer: This content is for informational and educational purposes only. It does not constitute professional advice or a guarantee of specific results. Infrastructure needs vary by team, stack, and stage. Consult a qualified engineer for advice tailored to your situation.

Frequently Asked Questions

Can you self-host Supabase?

Yes. Supabase publishes a Docker Compose stack you can run on any VPS. It includes Postgres, GoTrue for auth, PostgREST for the REST API, Storage, Realtime, and Kong as the gateway. You run it with docker compose up after editing the environment file.

Is self-hosted Supabase the same as the hosted version?

The core is the same open-source services, but the hosted version adds managed backups, point-in-time recovery, monitoring, and one-click upgrades. Self-hosting gives you the same API surface and puts the operational work, especially backups, on you.

How do I back up self-hosted Supabase?

Back up the Postgres database with pg_dump and the Storage volume with a file-level copy. The database holds your schema and data, and the volume holds the uploaded files. Store both off the server and test a restore, because the hosted version did this for you.

What breaks in self-hosted Supabase?

The common issues are a Postgres upgrade that needs a migration, a Storage volume that fills the disk, and a service that fails to start because an environment variable is missing. Pin your image tags and read the release notes before you upgrade.

Get the DevOps Ecosystem Behind You

One accountable engineer. Full platform behind him. Month-to-month, no lock-in.