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.
In This Guide
What does self-hosting Supabase actually run?
How do you install self-hosted Supabase with Docker Compose?
How do you back up self-hosted Supabase?
What breaks in self-hosted Supabase?
4 Tips to Get Started
Change every default secret in the .env before you expose the stack. The compose file ships with placeholder keys that are public.
Back up Postgres with pg_dump and the Storage volume separately. A database backup without the files restores broken image links.
Pin the image tags. Supabase ships often, and a floating tag can pull a breaking change on your next restart.
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
- Supabase Docs: Self-hosting
- Supabase Docs: Self-hosting with Docker
- PostgreSQL Docs: pg_dump
- Docker Docs: Compose file reference
roqy.io cites authoritative sources including engineering blogs, vendor documentation, industry surveys, and academic research to ensure accuracy.
Related Guides
How to Self-Host n8n on a VPS (Docker, Backups, What Breaks)
We run n8n self-hosted on a Hetzner VPS in production and replaced Zapier with it. Here is the Docker setup, the Postgres config, the backup story, and what actually breaks.
n8n vs Zapier: The Real Cost Math for a Self-Hosted Stack
Zapier charges $20-100+ a month by task volume. Self-hosted n8n on a $5 VPS is free after the box. Here is the honest cost math and when each one actually wins.
Dokploy vs Coolify: Which Self-Hosted PaaS Should You Run?
Dokploy and Coolify both turn a VPS into a Heroku. Here is how they differ on Docker, Traefik, databases, and backups, and which one fits a small team.
Fly.io vs Railway: Which Should You Deploy To?
Fly.io runs your app close to users on micro-VMs. Railway is a simpler PaaS with a nicer DX. Here is how they differ on pricing, networking, and databases.
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.