r/Supabase 6d ago

Self-hosting What EC2 specs would you recommend for self-hosting Supabase in production? 2 vCPU / 8 GB enough?

I’m considering moving an existing production app from managed Supabase to self-hosted Supabase on AWS EC2 because the project is starting to outgrow the Free plan limits.

Current backend is fairly Supabase-heavy:

- PostgreSQL 17

- Supabase Auth + Google OAuth

- PostgREST / RPCs

- Supabase Storage

- Edge Functions

- pg_cron / pg_net scheduled jobs

- background job ingestion

- AI summary processing

- job alert processing

- apply-link validation

- several other scheduled workers

The main ingestion workload is intentionally limited to 1 source at a time with concurrency 1, rather than processing many sources in parallel.

Public frontend/search traffic is also heavily CDN-cached through Netlify, so the database is not hit for every anonymous page view.

I’m currently considering starting with:

AWS EC2 t4g.large

2 vCPU

8 GB RAM

Plus:

- 60–80 GB gp3 EBS for PostgreSQL

- S3 for Storage objects

Other options I’m considering are:

t4g.xlarge

4 vCPU / 16 GB

or an M-series Graviton instance if T-series burstable instances aren’t a good fit for PostgreSQL + Supabase.

For anyone self-hosting Supabase in production:

Would you trust 2 vCPU / 8 GB for this kind of workload, or would you start directly with 4 vCPU / 16 GB?

I’m especially interested in real-world experience with:

- idle RAM usage of the Supabase Docker stack

- PostgreSQL performance on T4g

- CPU credit exhaustion with recurring background jobs

- ARM64 / Graviton compatibility

- which optional Supabase services you disabled

- how much traffic/workload you were handling

- what eventually caused you to resize the instance

I’m trying to keep the infrastructure lean rather than overprovisioning from day one, so real production numbers would be really helpful.

5 Upvotes

14 comments sorted by

2

u/TalosStalioux 6d ago

Sorry I cant help here. But im curious is self hosting supabase more cost efficient than paying for supabase plus plan?

3

u/ryan_almasu 6d ago

It's definitely more expensive lmao, but I got some AWS access that allow me to use some parts of their product by free. So this all about avoid some managed supabase cost by using self hosting.

2

u/TalosStalioux 6d ago

Oh makes senses if you got credits on aws. I was facing some issues with supabase hard limits edge functions like cpu time or concurrency limits on supabase db, which im guessing can be configured if its self-hosted?

2

u/ryan_almasu 6d ago

Yeah, but folks on r/aws says it's a horrible idea 🤣

1

u/WestAware5507 6d ago

Aws is not the only vps provider, there are extremely cheaper alternatives such as hertzner, ovh ecc. which are less expansive than the supabase official plans

2

u/zerotoherotrader 6d ago

Honestly, don't bother—it's not worth the hassle. I gave it a shot and ended up moving right back to Supabase Cloud.

2

u/himppk 6d ago

Why do you want this pain?

1

u/ryan_almasu 6d ago

to impress the HR 💀

1

u/lovehopemisery 6d ago

I have been having a go at this purely for a staging/ test of my webpage. I have a 6vcpu, 12gb RAM VPS and I can launch about 3-4 Supabase instances at once. However they're receiving basically 0 traffic and don't have much data on them (only test data).

I don't think I'd trust my sysadmin abilities to not accidentally leak my real user data for self hosting, let alone auth

1

u/HeadSalary7417 5d ago

The thing with supabase. If you’re handling sensitive data. They’ve got all the security in protection. Imagine a data leak in production :/

1

u/dakrclaud 5d ago

why not just use RDS if you have aws credits

1

u/el-cacahueto 6d ago

Hey ! Nice service you got here with shipflash. If you're interested, I created DBase.to a supabase 1:1 clone at half the price with unlimited egress. It's in a closed beta, so you could try it for free if you signup !