1
0 Comments

How I'm cutting down my infra costs by 80%

I'm cutting my monthly costs by more than 80% by self-hosting everything

I started indiehacking a year ago & was using mostly free services for my projects:

  • Vercel
  • Supabase
  • PostHog analytics
  • AWS EC2 first year free for micro instance

But over the last year, my projects have finally started getting some more traffic + my free credits on AWS ran out. I am looking to scale even more so I know costs can get out of hand pretty quickly (+ I have seen some scary stories here recently).

Monthly, I would have, on average:

  • $50 for Supabase (5+ projects)
  • $45 for my AWS EC2 instances
  • variable costs for renting GPU for my AI projects
  • I also just surpassed the limits of the free plan on Vercel in terms of bandwidth, Image Optimization & Speed Insight points

The only project that's (finally) making some money so far is ImagenMIA, and with only 60% margins or so due to high model training costs (+ still early phase).

On the one hand I am super happy that ImagenMIA is starting to generate some money on its own (all organic, SEO-based traffic) but on the other hand, infra costs are starting to climb up and are only going to get worse as it scales.

Luckily I saw a post on Twitter mentioning Hetzner and Coolify. So I started digging into it and have migrated the first couple of projects to test everything out.

Here is my setup:
- One small VPS (€3.98) for Coolify

  • 2vCPU
  • 4GB RAM
  • 40GB SSD
  • 20 TB Egress traffic

A bigger one (€14.51) to host all my projects:

  • 8 vCPU
  • 16 GB RAM
  • 160 GB SSD
  • 20 TB Egress traffic

I will be self hosting everything:

  • Supabase
  • Front-end
  • NodeJS Express API Endpoints
  • N8N
  • PostHog

I was a bit afraid but tbh, Coolify makes things so much easier (OS alternative to Vercel/Netlify) + now I no longer have to worry about extreme bandwidth costs in case of traffic spikes!

Very happy I built all my projects around OS software. This is what's allowing me to just self-host everything instead of being stuck & having to pay. Looking to migrate my bigger projects over there hopefully the next couple of days!

on March 2, 2024