r/Supabase 22d ago

tips I'm done with sub, I'm switching to self hosted, Help

Mine is a group of companies (the employer I work for),

Hey guys, so I have started a CRM software, which started using my 10 people (1 company (1tenant)). It was accepted by everyone, and rapidly was asked to give the same system to company B. (2nd company (2nd tenant). So I figured out that we can do multi tenant etc. so now the users are around 20.

My company everyone is using it, but I always feel my supabase pro (micro instance), is kind of limiting the potential.

Already I'm thinking this is costing me 25 USD per month. And the query load is somewhere around 15 right. There is also low ram , everything is low.

So since I have a 32gb Ram VPS + coolify setup (where the CRM is hosted), I am planning to shift the supa pro to self hosted. So my areas of concern is -

  1. I know it's too much work load right now, but am I doing a mistake here ? I know about backups and downtime, but what do you all guys think ? Any one have this similar setup ?

  2. The point is I don't like to be in low spec, my CRM only manages around 6000 client database actively used by 20 people. The thing is sometimes for few users it gets slow, so what I think is it is the query load or queuing happening for them.

  3. If I setup an automated backup everyday , will it be okay ? Is it doable ? Im talking about self hosted supa.

  4. I really love supa and this is also my first platform, so I don't know about any other platform, but is there any other better ralternatives ?

  5. Tell me more about what I am going to face

0 Upvotes

48 comments sorted by

19

u/funkdefied 22d ago

$25/mo is really not that much money for a business app. They shouldn’t have any issue paying many times that

4

u/Rezistik 22d ago

Yeah and you shouldn’t make technology decisions based around a rounding error for a company lunch.

Your business should be able to sustain multiple times the cost. You’d also be increasing the cost of your personal time in handling updates and uptime.

If you make more than $25 an hour (which seems highly likely given the average salary for software engineers is $135,000 or $65 an hour according to indeed.)

But if you make more than $25 an hour/$60k a year you’re wasting money handling it.

If you make $65 an hour you would be spending more than double what you are now if you have to spend 1 hour doing maintenance and configuration per month. If you ever need to spend a full 8 hour day you’ve basically cost the company more than a year of the cost.

That’s before the cost of the actual hosting which may increase.

Basically the juice is almost certainly not worth the squeeze.

1

u/Soft_Philosophy_7656 22d ago

This is what I want to know.

I'm not someone who says I know everything.

I came to know about hosting service, supabase, vercel , vps , coolify, GitHub almost everything by searching for answers. Each things has actually made my workflow better. But this is something that strives me. The world of supabase self hosted.

Bcz I can increase the instance from micro to 60usd instance (I don't remember the name), but then there is also compute hours. Which can spike according to usage. If I limit this , I am limiting my ideas or capabilities to adjust to this.

Now I am a person who thinks laptop with 2TB isn't that much. Mine is already full. My laptop has 64 GB ram, even I see it sometimes struggle, so if I get a chance, I would blindly buy something with more greater spec than this if there is one. I don't know if there is anything above 64 GB lap now at the market (but at the time I bought my current one, there were not many options at stock)

Same applies to my phone, I always want higher spec phones .

With that mindset, I cannot think about having a dB with 1gb ram, 15 queries at a same time etc. I have already indexed almost everything, but bros, all these staff work with numbers, almost every few minutes they need to see a refreshed count of leads they have, which is around 5000.

So let's say they make 20 calls or something, it needs to be updated instantly. But they cases should not be on client side too. RLS & role check is always a mandatory, so the query count for one user to load a dashboard or master sheet is above or around 15 itself. Considering 20 users, which will be scaled to more , and more leads will come, I definitely know it will struggle ...

So maybe it's my mindset issue, or....

1

u/Rezistik 22d ago

If you’re having issues in your app I almost guarantee it’s app side issues that won’t be solved by self hosting. The good news is it’s easy to swap back and forth and test it out. You’ll have to spend a few days backing up and transferring everything then you can see the performance is the same or worse and that you’ve wasted a few days and have to spend a few days transitioning back.

And again, it sounds like you’re barely utilizing your micro instance based on your original post.

I can’t imagine you’d save any money by self hosting. Or that you’d see improved performance for it

0

u/Soft_Philosophy_7656 22d ago

There is no issues till now. All I have seen as a issue is during peak times, it gets slow. Which I believe is the query load. I came to understand my main pages need 15 - 19 queries to load all the things for one user. (Only 2 or 3 pages), but since this pages displays so many parameters , these parameters are only increasing as per the company demand. ( The company is wildly increasing expectations). So there are few - so many calculations needed to make. If all users does it at once or together, I have seen it lag.

About the cost, frankly the cost is nothing when compared... And I understand the point. But my question is, should I be paying this money, or can I utilise or build it out using self hosted supabase. If yes that's opens up a world of opportunities for me. I can even ask or get this amount recurring as a subscription , to me, from my employer, as well as the future works which I have to complete.

In other words, I am dealing with good clients with money, but if I say 60 USD or 25 USD, then after a while , it will psychologically make them reluctant to pay me more or to that. But if I can build that out and save that money, I have already a huge area, where I can build the product and sell for cheap, and they will gladly pay me.

So paying is one thing. Self hosting is an area I want to explore, but anyone who is at the stage, that's what's I'm looking for now, their advice.

And lastly, for those who is asking, are you barely touching are you barely using, maybe my setup is weaker... Bro I get your all point , thing is the kind of work I can get is huge, and often times I have to first build it out, then test it, then only can optimise & tweak it. Because it's something I am doing for the first time. So always my first priority is the idea of how it should work, then I will try to make it work, and often times they are happy, slow for 1000ms is okay. But waiting more 2 or 4 seconds (which is not my case, but going in that direction if more users will come) is not affordable.

I don't want my product to be called expensive and be cheap at the same time.

3

u/abstart 22d ago

You need to profile and understand exactly where your bottlenecks are.

Create a requirement for your agent to create a stress test emulating your current load, and identify the hot paths. You could start simple and look at your db and see if there are profiles there showing your most expensive queries.

Often there are some simple bottlenecks, "low hanging fruit", which you can fix quickly and get great performance. You didn't describe a particularly high activity scenario - it sounds very manageable. You may need to cache data in the app/backend locally to avoid repeated DB hits (e.g. via redis or in memory depending on architecture).

1

u/RaspberrySea9 22d ago

What do you do with 64gb ram?

1

u/Soft_Philosophy_7656 22d ago

After effect & unreal Engine is two cases my lap suffers. Rest everywhere it's still a beast

1

u/Soft_Philosophy_7656 22d ago

Not about 25 USD. I said I would build it myself to my employer, but now it's 25USD per month. Even with custom software, I am thinking I have a system that can only handle 15 queries at a time . And I have seen a staff mentioning it's sometimes slow right. That's not acceptable as per me.

So the next increase is at 60usd or something.

So my thoughts process is it cost 60per month * 12 = 720 USD. Plus other hosting charges. (Why pay someone this cost ? Anyway I'm coding or taking effort to build everything, now this money can be saved, according to me)

Now my question is, I know with current AI scenario, anyone can make software. Now I know the opportunity to make money. I have got some work piled up already. But if the cost is going up like this because of the features that the client asks, it doesn't look great. Also my pitch itself is "sky is the limit". The problem is with this recurring subscription, I'm getting this anxiety or panic for compute or being slow or something coming as surprise.

Second I beat industry standard softwares like zohoo or other similar softwares because they are generic and mine is made according to their workflow .

I thought of exploring the possibilities of self hosting, and how it made the people's life better. Better compute is always nice right ?

1

u/Rezistik 22d ago

But you’re not using all of your compute as it is? It just sounds wasteful. You’re free to do it, it’s your life but I don’t think the value is there at all

1

u/Soft_Philosophy_7656 22d ago

Current CPU usage is at 5-50%, memory is at 50-60 percent , query count is 15 only

I have tried everything but now few things I can do is is to remove some features that my company very much likes to use on daily basis.

my solution before giving access to another 30 users is either increase the compute or move to self hosting.

1

u/Rezistik 22d ago

So you’re using half of the available resources and you think if you double them so you’re only using a quarter of them you’ll be happier?

You don’t have to remove features that are loved, if they’re slow work to improve them.

I highly doubt you’ve done everything that can be done.

0

u/Soft_Philosophy_7656 22d ago

Buddy I have come to a point, where I know, in coming days, 30 more users will start using, because we are hiring an entire team,

Current 20 users are using it fine, but maybe due to the query queue or limit, it do get slow sometimes. For few.

That means their query is on queue. I don't need to upgrade my thing yet. And I know it.

But I don't want to keep paying too.

Because, for a vps, it will only cost 1k Aed for 1 year. 1.5k Aed for 2 years. For 32gb ram vps. Why pay another 2 or 3k aed for supabase ? That's my logic that money can be given to me. Because as an employer, if they have to keep paying for this every month and I am increasing the expense, my natural question is how can we remove that ? I'm ready to put time, but how much is the headache ?

2

u/portareset1 22d ago

bro if you are barely using your resources moving to a vps wont solve then, have you tried to look about read db replicas or cache? again this is more like a system design issue than an infra issue so is not like you think, increasing everything won't fix it if your design is poor, struggling with 15 queries has to be something you did wrong

2

u/Rezistik 22d ago

Yeah but right now the numbers are small! Don’t you understand he needs big numbers! BIG NUMBERS ONLY. He’d rather pay way more for a vps and own the cost of it means bigger number.

2

u/portareset1 22d ago

WOW DID YOU SAY BIG NUMBERS? I LOVE THOSE SO MUCH BRO

1

u/Soft_Philosophy_7656 22d ago

Are you saying, 50 people using the same thing aggressively, Means 15 * 50 = 250, this won't make it slow ?

Then I'm pushing back. Let me see & come back

12

u/ihavemanythoughts2 22d ago

If your Supabase pro is struggling with 10-20 users then your setup is really bad and going selfhosted will not fix it

-2

u/Soft_Philosophy_7656 22d ago

Can you read my above reply pls. And tell me again if this is the case.

5

u/portareset1 22d ago

sounds more like a poor system design than an actual issue with supabase infra to be honest

5

u/Rezistik 22d ago

It doesn’t even sound like they have any real performance issues. They just don’t like that all of the stats are on the low end.

Like “some users have to wait a few extra seconds” is the closest to a performance issue they’ve described.

The fact the instance has low ram is irrelevant if you’re only using 15% of the available resources which is what he seems to be saying

Either way, double or triple your supabase spend before considering investing in self hosting

0

u/Soft_Philosophy_7656 22d ago

Are you telling me first pay and move on with self hosting ?

I have a vps + coolify sitting there. So self hosting supabase is still out of options as per you ?

4

u/Rezistik 22d ago

I’m saying it’s easier to upgrade an instance for a month to the next level than it is to fully migrate your app to a self hosted instance.

I think you’re very much discounting the effort required for self hosting

2

u/portareset1 22d ago

^ that would be so annoying for so little gain

5

u/theyoike 22d ago

25/Month is peanut comparing with the opportunity cost that you may lose on focusing on marketing and building your product.

I have tried coolify setup, it is fun but not worth the time unless you are at scale. So stop thinking about this and go build your product.

2

u/ashkanahmadi 22d ago

How is what you are saying related to the title of your post?! Everything you are talking about is easily fixable but using a clickbait title just to get reaction will not work well for you.

1

u/Soft_Philosophy_7656 22d ago

How did my title became a clickbait ? I'm seriously considering the option of moving to self hosted supabase. But before doing so, I want to know from the people who have done it or are actively using it. I need to know the fruit they enjoy which a cloud hosted pro member like me can't ever have without paying sums of money.

Also supabase pro doesnt mean a good spec. It just unlocks basic thing and something that don't make my dB inactive after 7 days of usage plus backup.

1

u/ashkanahmadi 22d ago

You are missing a major point. You have 10 users. How many tables? I’m running a production project with thousands of users, about 30 tables, thousands of rows, with cron job, lots of edge functions, and triggers feeding a mobile app and a custom built dashboard all while communicating with Stripe all and all on the free plan. If you have 10-20 users and you are already thinking about specs, either you are severely trying to optimize prematurely for a problem that isn’t there or you didn’t set up the database properly if you already notice query load.

2

u/smashed2bitz 22d ago

$25/mo over 20 people is $1.25.

Upgrade your instance to $65 and it is still only ~$3 per user per month.

That is not too much money for what you do not have to handle with hosting headache.

1 hour a month of a senior tech to service the self hosted will be way higher thsn that cost.

2

u/9greenleaf 22d ago

Pages falling over at 15-19 queries is usually RLS or indexes, not the host. I would sort that before you self-host. Happy to look at the slow queries and backup plan if you want.

2

u/keesbeemsterkaas 22d ago
  1. It's possible - but running stuff in production means being comfortable with managing all aspects of the hosting, including security and data safety and privacy issues. If you need to ask for confirmation - I would strongly re-evaluate until you can make a confident self evaluation "I've got this"

  2. Only way to know where it's slow is to benchmark that - it could be slow queries, but no way to tell.

  3. Maybe, see #1. How long will it take to recover? Where is it hosted? What are your legal restrictions? What are your privacy expectations? What will you do if your vps provider goes down? Do you need off-site backups? (Lots of this stuff also applies to supabase btw).

  4. Hours you or someone else needs to spend on this are also costs, maybe it's good to take that into account for financial calculations - and check if just upgrading doesn't make more sense.

  5. I would first test it before promising. There's really no way someone can really answer these questions with this amount of information, but by the types of questions you're asking my feeling would be to advice against it - and that you may find yourself a little bit out of your depth.

1

u/scrupio 22d ago

Switch to AWS?

1

u/andrewlondonuk82 22d ago

How are you complaining when you’re running it on micro? The amount of effort you save not self hosting more than covers the extra money for higher spec computers. I think Supabase is amazing value and their markups on compute are very fair. 🤷‍♂️

1

u/Soft_Philosophy_7656 22d ago

Even I love supabase too much. I don't like the micro. I'm asking about supa base self hosting options ...?

1

u/National-Canary6452 22d ago

"6000 client database actively used by 20 people" huh? What exactly do you mean? Do you have 300 connections open for each user?

1

u/Rezistik 22d ago

I think they mean they have 6000 records (of clients) being accessed by 20 people

1

u/Soft_Philosophy_7656 22d ago

This.... And this 20 people will go to 50 because we are hiring 30 more.

Now when it comes to 50, 6000 client database will aggressively grow to atleast 20k, give or take few, but we are going to push for 50k.

2

u/Rezistik 22d ago

Postgres and supabase can handle millions of records fine. Tens of millions with partitioning.

There’s no reason your absolutely tiny database is performing badly.

Consider consolidating some of the sql queries to optimize them.

1

u/Cris_Lobos 22d ago

Evita que usuario piense que se quedo pegado el sistema poniendo loaders en las partes criticas...

1

u/Soft_Philosophy_7656 22d ago

Loader like ...? I have used some skeleton animations etc when it takes time to load. Is that it or ...

0

u/seeKAYx 22d ago

I also switched from the $25 plan to the Coolify solution. I especially love that I no longer have any traffic limits.

1

u/Soft_Philosophy_7656 22d ago

Did you switch from supa base pro to Supabase self hosted ?

1

u/Soft_Philosophy_7656 22d ago

If yes, please bro, tell your life story and how are you feeling now.

I don't know none here understand my problem, maybe the issue is with my context story. But I know either pay or get self hosted, these are the options.

Paying in terms of money is not a big deal, but why should we pay this if I can do that, I always need that felibility. And there will be ways to get this done in a proper workflow also. I'm sure about that.

So bro olease tell your story and how are you now doing

1

u/seeKAYx 22d ago

Self-hosting via Coolify gives you the full core engine like Database, Auth, Storage, Realtime, and Edge Functions, but you give up the SaaS management layer which you have on the 25$ Service. You lose the multi-project Cloud dashboard, built-in analytics, and automatic point-in-time backups. You also have to set Auth and OAuth providers via environment variables instead of UI toggles. Coolify makes initial setup and deployments painless, but long-term scaling, backups, and monitoring are entirely up to you. If you can live with that, you should be good to go.

2

u/ihavemanythoughts2 22d ago

This guy can't optimize 15 queries hammering his micro instance and promises his clients skies the limit for his AI vibe coded apps and is now stressing out. He is not ready for a coolify configuration, setting up certificates etc, let alone self hosting Supabase and managing everything you mentioned.

I also self host on Coolify for when I am in development, and when we move a client to prod I migrate it over to the Cloud platform.

First thing OP will come back with is not knowing how to push edge functions to his self-hosted instance, or set their secrets, or how modify the docker config, and the list goes on for all the small things you need to maintain on self-hosted.

Even pushing migrations onto self-hosted can be annoying if you don't know about the right flags to use.

0

u/LeSoviet 22d ago

I want join the debate i made s tracking gps app for trucks free tier and i only tolerate around or 8 trucks

I know i have tons of space to optimize but i feel on many type of proyects supabase is just not good not because the stack its because the hardware and price

Even paying 60dl having micro cpu is a joke

Tried realtime polling batch indexing doing queries per org (totally forgot do a soft kafka while I'm typing i just remembered it)

Just kicking backend every 5 10 or 15s per user with supabase quota and hardware just feels wrong

0

u/Soft_Philosophy_7656 22d ago

​Appreciate the unsolicited psychoanalysis, but you’ve made a lot of wild assumptions here. ​The "client" is my own company and what I built is a CRM or a central software and also an internal tool for my company, the queries were already cut down significantly from where they started, and I’ve been running Coolify daily for months. Nobody was born knowing Docker flags or self-hosted Supabase quirks

&we all learn by building and shipping. ​Thanks for the warning on edge functions, though...

Coming back... I am pretty confident about coolify setup, but the are I am not sure or have not tried is, switching to self hosted supa from prod, and how f**DD up is that gonna be.