DEV Community

loading...

Discussion on: Self-hosting with Supabase

Collapse
chronsyn profile image
Scott Pritchard Author

You could realistically run the Supabase stack on a 2GB / 1 VCPU droplet, which costs $10 a month.

In terms of hosting multiple databases, if it was just postgres, you'd be able to create multiple databased on a server, but to get the Supabase stack to work, you'd potentially need to fork their code and make some adjustments and the manage creating the docker images yourself.

You could also create 1 droplet for each project, and this would be what I'd suggest, but the costs can be quite prohibitive. One possible solution is to host some projects on a free Supabase plan (i.e. on their managed platform), and some self-hosted.

Another option would be to think whether you need 6 independent projects. If money is an issue, thinking smart about how your tables are structured can significantly reduce your financial overhead. For example, if you have an app and an API, and both need database storage, you could prefix some tables with app_ and others with api_.

It's not something I'd recommend for most situations, but it's certainly an option.

Remember that you can run additional containers on your Supabase droplet. If you have an API that needs to access the database, instead of hosting it on a separate droplet, create a docker image of it and host it on the same droplet as Supabase. That saves you the monthly cost of 1 droplet.