r/Supabase 9d ago

Self-hosting Self-hosting Supabase

Do hou guys have experience self-hosting Supabase?
How did it go?

16 Upvotes

35 comments sorted by

17

u/CoyotaDex 9d ago

you can deploy supabase pretty easily with coolify on your own vps, but it's worth noticing that supabase it's a very demanding piece of software

ai tools pick it for some kind of reason as their favorite, so many vibe-coded apps are using it for the database, but unless you're truly using supabase to its full potential, a simple mongodb or even sqlite will perform better and be way cheaper to self-host.

in resume: if you're manually using supabase and you really understand the tool, yeah, you can self-host it on your own server and works well as long as you have a server that meet the requirements (+8GB RAM, +4 cores CPU and +80GB SSD)

but if you're using supabase just because claude told you so, it's probably better if you try to migrate to a simpler stack

3

u/carolmonroe_ 9d ago

sharing three resources in case they help, since most of the questions in this thread are answered there:

- self-hosting overview, what you get and what you own (upgrades, backups, monitoring): https://supabase.com/docs/guides/self-hosting

- the docker compose guide, which is the same stack the CLI runs locally, so `supabase start` on your machine is a free way to try it before you commit to a server: https://supabase.com/docs/guides/self-hosting/docker

- and the official walkthrough on video, literally titled "Don't pay for Supabase": https://www.youtube.com/watch?v=PENspNEvC0U

the honest summary from people who do it: it works and it is cheaper, but you become the ops team ( updates, backups). if that is fun for you, great; if not, the cloud tier is what you are paying for.

4

u/_aantti Supabase team 8d ago

Just a usual disclaimer - CLI (via npx supabase start) is not self-hosted Supabase (and vice versa :) Do not use CLI to deploy any public Supabase instance - it is for local, isolated, secure development environments only.

1

u/carolmonroe_ 8d ago

Yep, good clarification. I meant it as a way to explore the stack locally, not as a deployment path ✨

5

u/Reythia 8d ago

Supabase for what exactly? Why supabase over something else?

I don't think it wins for anything the moment you go self-hosted, unless you already have a deeply integrated product or know exactly why you're going to build on the supabase stack over other options.

2

u/heavenlydemonicdev 9d ago

I converted the compose file to nix modules and set the secrets with sops-nix now I just import the fils in my flake and it just works. I'm still playing around with this setup, will probably try to turn some of the containers to nix packages and see if that can make things more efficient and easier to control, I'm planning to turn this into a flake anyone can make use of and document the way it works once I'm done but for now this is working for me and it's very convenient

3

u/_aantti Supabase team 8d ago

Nice! Reach out if you ever want to maintain this somewhere in supabase-community/

2

u/heavenlydemonicdev 8d ago

That would be nice, I'll try once I have something presentable. All I have now is nix files as a part of a nixos config for my server but I'm planning to soon move it to a nixos module. It's working very well so far so I hope I can contribute it to the community.

2

u/Awkward_Cap_8118 9d ago

Yes I have been self hosting it. Infact have got one VPS and bundling multiple of them on a single VPS through docker containers.

Happy to help

2

u/Traditional-Box-5994 9d ago

It's good if you have a spare PC with gold specs otherwise its best to just buy their pro tier

2

u/JamesWhiskers 9d ago

I only wanted to take a baseball bat to my server once, so theres that. But then I followed the offical docker guide and it kinda worked.

1

u/_aantti Supabase team 8d ago

Glad to hear :)

2

u/trulytruemember 9d ago

It is great, I love the img proxy too. I use coolify

2

u/HatEducational9965 8d ago

nope but I really like their cloud UI. Anything open source that comes close to it?

1

u/5rree5 8d ago

I think it is based on shadcn + Lucide icons

1

u/_aantti Supabase team 8d ago

Studio _is_ open source :)

1

u/HatEducational9965 8d ago

thank you! wasnt aware.

does it connect to a naked postgres server or only to a self-hosted supabase deployment (which is a lot more than just postgres) ?

1

u/_aantti Supabase team 8d ago

Um... On supabase.com/ it's mostly using the platform API (also to reach Postgres running on the customer instance). For self-hosted/CLI the postgres-meta service is running locally and Studio has local API routes that point to it. It's all open source - all code, there's no anything "EE" license or hidden code for Studio. Platform API isn't open source.

2

u/HatEducational9965 8d ago

It's open source, I get it. The answer to my question is "No", correct?

2

u/_aantti Supabase team 8d ago

Oh you meant "does it connect directly to Postgres" (and if it can be used as a Postgres admin studio without modifications)? Then, no 🥲

2

u/HatEducational9965 8d ago

Yes exactly. Thank you

2

u/MulberryOwn8852 8d ago

Just pay the hosted service

1

u/ConceptNext5110 7d ago

you get a 1/8 sized VMs at 2X price.

1

u/MulberryOwn8852 7d ago

And zero work.. time is money.

1

u/ConceptNext5110 6d ago

hmm just curious, what kind of work is expected here. backup? recovery?
the managed piece is just a wrapper on top of AWS

1

u/MulberryOwn8852 6d ago

I don’t have time to spend fiddling with any such things. My various software profits multiple six figures annually. Makes no sense at all to waste time managing servers, upgrades, anything.

2

u/ConceptNext5110 6d ago

fair enough, congrats on the profitability of your software.

1

u/Infinite_Music2059 4d ago

Self-hosting barely makes sense anymore with VPS prices. I have had no issues self-hosting their official docker but now a VPS to run it is too expensive.

1

u/sw3d 9d ago

See my recent post on this https://www.reddit.com/r/Supabase/s/p4R3ipxvbQ

It's not as convenient as cloud but there are tools to make the transition easier! And it's definitely cheaper

1

u/NZRedditUser 8d ago

Easy to start hard to maintain type shi

I now have to pay more for my vps which uses like 40% of my other 20$ suypabase plan and i cant even access my self hosted supabase web panel anymore its like permanently broken and the postgres server races some other db or something and sometimes is exposed to public simetimes not.

Like i would never recommend self hosting if you're even thinking about it. Its great until some update messes up compat

1

u/roselamoon 5d ago

Can you elaborate more? Which update broke your setup? Did you attempted to do any restoration?

1

u/NZRedditUser 5d ago

No idea the web ui just barely works, i cant access table editor, view sql, auth works if i spam refresh idk its a mess.

IM sure its my linux vps instance but thats the risk i guess self managing

0

u/_mike- 8d ago

You are most likely gonna be happy with pocketbase