← All logs
How-to

4 min read

Why I self-host Supabase

Supabase is part of my usual stack, and I run it on my own servers. Here's why, what that involves, and whether you should too.

PaulTeacher, musician, now builder

Follow on X
Why I self-host Supabase

What Supabase does

Supabase (like similar services such as Firebase and Convex) provides the data side of an app. For me and the apps I build, it has everything I need: the obvious stuff, like tables and queries (it’s Postgres underneath, a long-established database), plus authentication (essential when people log into an app and should only reach what they’re allowed to see), storage, and the option to hook up S3 storage to keep costs down. It’s a complete tool, with no need for a separate login provider.

Why I run my own

I’ve tried the hosted version of Supabase, and it’s really excellent. But one significant question when you build apps is who actually owns the data. I’ve found that businesses prefer to keep control of their own data (data governance) by running their own servers. Thankfully, today that’s not as complicated as it might seem.

Hosted Supabase gives you its MCP server (a way for your agent to manage the database directly), which can be extremely useful, and I definitely weighed it up. For me, though, self-hosting was the way to go.

One other thing I found with hosted Supabase is that the pricing was a little confusing, although in fairness, I didn’t examine it too closely. The headline price (from $20 a month when I used it; it’s from $25 now) was correct, but my first bill was around $40, and I wasn’t sure why.

Coolify and my servers

I have my own instance of Coolify, which I truly love using. It’s open source and free, and it manages your apps, sites and databases on servers you rent. Like anything, there’s a learning curve to understanding what it does, but once you’re through it, it’s the ultimate way of managing apps and sites under your own control.

The costs come from the server it runs on and then (one of the best parts) any other servers you connect to it, so your hosting can grow almost without limit. I use a Hostinger VPS (a virtual private server: your own slice of a server, rented by the month) for my main Coolify instance, and whenever I need a server in the UK. Where I don’t need a UK server, I use Hetzner for excellent value for money.

Paul's setup: one Coolify instance on a Hostinger VPS in the UK, connected to Hostinger servers when data must stay in the UK and Hetzner servers for value, each running Supabase and apps, with room for the next server when it is needed.

Should you self-host?

Self-hosting is the perfect solution when you know how, but it’s probably not the best place to start if you’ve never done it before. That said, everyone has to start somewhere!

Having an agent on hand makes it far less daunting than it was even 12 months ago. Agents are quick to give useful feedback, can read documentation (and explain it “like I’m 9 years old!”) and can produce resources tailored to you. As I’ve said before, the official docs are your best friend, and getting your agent to summarise them into something you can keep and organise is a really efficient way to learn.

I’m very visual, and I like HTML documents I can come back to. To get them, I keep a prompt template to hand, something like:

Please create an interactive HTML document that organises the information into clear and well-organised sections. Keep the language informal and the writing concise (TL;DR), defining technical jargon when appropriate. Where tasks exist, provide a checkbox to mark them complete. Provide direct links where appropriate. Where you write text or commands, make them copyable, and flag where they need to be pasted or entered. Any commands you provide should be RAG-rated, with a short description of what each does and any information I need about its blast radius.

RAG-rated means red, amber or green by risk. A command’s blast radius is everything it could affect if it goes wrong.

If self-hosting seems right for you, I highly recommend starting with Coolify. Start small (and cheap: Hetzner is highly recommended!). This approach is designed to scale, and that’s the beauty of it. A small project can start on a fairly low-powered, cheaper server and move up over time, so if you’re building an app over 12 months, you aren’t paying $25-plus a month from day one.

And if you’re already using hosted Supabase, it’s worth considering whether self-hosting would suit you better.

Got a question about self-hosting, or want to show me your setup? Bring it to the Lab: ask it in Ask anything, or share it in Show your build. And follow me on X for the next log.

Keep reading

More worth trying

All logs

How-to

How I’d start

You've decided to build it yourself. Here's the method I use on every build, and the tools, channels and courses I'd point you to first.

5 min read

Tools

Nuxt, Supabase and a tool I’d never heard of

Where do I start building my app? Should I just let an agent start and hope for the best? I've seen this asked in groups, and been asked it directly, and I'm more than happy to share my approach. But every project demands something different, so I still ask an agent first. Here's how that conversation goes.

9 min read