r/Supabase • u/reiggg • 4d ago
tips How I self-host Supabase on a cheap VPS with HTTPS and scheduled backups
Disclosure up front: I built the tool this setup uses (ShipperKit, open source and MIT licensed). Mods, remove this if it doesn't fit here.
Getting Supabase running is the easy part. Keeping it running is where I kept losing evenings: the self-hosted Compose stack is a dozen containers, and you have to generate the JWT secret and API keys yourself. This is the setup I use now on a single VPS.
What you need
- A server running Ubuntu 22.04/24.04 or Debian 12/13, x86-64 or ARM64
- 4 GB of RAM to be comfortable
- Ports 80, 443 and 8080 open
- A domain with an A record pointing at the server, like
supabase.yourdomain.com
1. Install ShipperKit
curl -fsSL https://shipperkit.dev/install.sh | sudo bash
Open the address it prints, paste the setup token and create your account.
2. Deploy Supabase
Open the Service Library, search for Supabase and select it. Enter supabase.yourdomain.com as the domain and deploy. The secrets and database passwords are generated for you, and HTTPS comes from Let's Encrypt automatically.
3. Set up backups before you put real data in
Add a backup schedule for the Postgres database and the storage volume. You can store backups on the server itself or in any S3-compatible bucket (Backblaze B2, Cloudflare R2, Wasabi). Restore one as a separate copy once, so you know the restore actually works before you need it.
Supabase-specific things to watch for
- Plan for 4 GB of RAM.
- Studio is exposed on your domain, so lock it down.
Repo: https://github.com/matyas-toth/shipperkit Site: https://shipperkit.dev
Happy to answer questions about running Supabase on it, or about self-hosting Supabase in general.
1
u/Dependent_Fee5330 4d ago
What counts as cheap here? The compose stack alone wants 4 GB to be comfortable, so I'd like the actual monthly figure. And scheduled backups only mean something once youve restored one.
1
u/ashkanahmadi 4d ago
Thanks for sharing. I saved this post and started the repo on gh. I hope I remember when I decide to self host one day
1
u/nutin2chere 3d ago
Wow. This is sweet. Def on my radar for air gapped use cases. But also, how did you build this demo vid - it claps!
1
u/Embarrassed_Machine5 1d ago
How do you keep the Postgres backup and Storage volume in sync? If they're backed up separately while uploads are running, can a restore leave missing files?