What is the best way to go about self hosting supabase?
I see that supabase studio only give us the dashboard to create our tables, storage, etc, etc. But it does not however give us the UI to put the dashboard behind an authentication UI.
I am looking for guidance on best practices, thanks! :supafire:
9 Replies
I use nginx in front of the containers running on a VPS.
Depending on your needs, you could start with basic http auth in the nginx config to protect the studio UI
hi @jensen , thanks for the response. custom ui for auth -> supabase studio dashboard, will the studio handle the the lifecycle of the token?
how would the dashboard redirect to login based on expired token, would i need to fork the repo (to add this logic) or is this built in?
Are you asking about setting up supabase auth to protect the studio?
yeah
or I am guessing the auth would be in the nginx layer. https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/
Restricting Access with HTTP Basic Authentication
Control access using HTTP Basic authentication, and optionally in combination with IP address-based access control.
Well it is totally up to you I think.
I think the quickest is nginx.
I guess technically you could secure a proxy that has access to the studio stuff. I haven't tried that. I just hid it behind basic auth since my self hosing were only used to test out some changes to some of the internal stuff. I ended up hosting 3 instances of self hosted supabase behind one nginx config
this is good advice, i appreciate the input and help @jensen
If you run into trouble with the details let me know.
hi, is that any featured reduced when self hosting, i mean we can use storage how many our vps left ?