logoalt Hacker News

I run multiple $10K MRR companies on a $20/month tech stack

471 pointsby traderteftoday at 6:00 AM296 commentsview on HN

Comments

hackingonemptytoday at 8:06 AM

> The enterprise mindset dictates that you need an out-of-process database server. But the truth is, a local SQLite file communicating over the C-interface or memory is orders of magnitude faster than making a TCP network hop to a remote Postgres server.

I don't want to diss SQLite because it is awesome and more than adequate for many/most web apps but you can connect to Postgres (or any DB really) on localhost over a Unix domain socket and avoid nearly all of the overhead.

It's not much harder to use than SQLite, you get all of the Postgres features, it's easier to run reports or whatever on the live db from a different box, and much easier if it comes time to setup a read replica, HA, or run the DB on a different box from the app.

I don't think running Postgres on the same box as your app is the same class of optimistic over provisioning as setting up a kubernetes cluster.

show 10 replies
senkotoday at 8:52 AM

If this sounds like basic advice, consider there are a lot of people out there that believe they have to start with serverless, kubernetes, fleets of servers, planet-scale databases, multi-zone high-availability setups, and many other "best practices".

Saying "you can just run things on a cheap VPS" sounds amateurish: people are immediately out with "Yeah but scaling", "Yeah but high availability", "Yeah but backups", "Yeah but now you have to maintain it" arguments, that are basically regurgitated sales pitches for various cloud platforms. It's learned helplessness.

show 4 replies
KronisLVtoday at 9:09 AM

> I use Linode or DigitalOcean. Pay no more than $5 to $10 a month. 1GB of RAM sounds terrifying to modern web developers, but it is plenty if you know what you are doing.

If you get one dedicated server for multiple separate projects, you can still keep the costs down but relax those constraints.

For example, look at the Hetzner server auction: https://www.hetzner.com/sb/

I pay about 40 EUR a month for this:

  Disk: 736G / 7.3T (11%)
  CPU: Intel Core i7-7700 @ 8x 4.2GHz [42.0°C]
  RAM: 18004MiB / 64088MiB
I put Proxmox on it and can have as many VMs as the IO pressure of the OSes will permit: https://www.proxmox.com/en/ (I cared mostly about storage so got HDDs in RAID 0, others might just get a server with SSDs)

You could have 15 VMs each with 4 GB of RAM and it would still come out to around 2.66 EUR per month per VM. It's just way more cost efficient at any sort of scale (number of projects) when compared to regular VPSes, and as long as you don't put any trash on it, Proxmox itself is fairly stable, being a single point of failure aside.

Of course, with refurbished gear you'd want backups, but you really need those anyways.

Aside from that, Hetzner and Contabo (opinions vary about that one though) are going to be more affordable even when it comes to regular VPS hosting. I think Scaleway also had those small Stardust instances if you want something really cheap, but they go out of stock pretty quickly as well.

show 2 replies
f311atoday at 8:17 AM

There are zero reasons to limit yourself to 1GB of RAM. By paying $20 instead of $5 you can get at least 8gb of RAM. You can use it for caches or a database that supports concurrent writes. The $15 difference won’t make any financial difference if you are trying to run a small business.

Thinking about on how to fit everything on a $5 VPS does not help your business.

show 11 replies
gobdovantoday at 7:58 AM

Nice list! I'd say the SQLite with WAL is the biggest money saver mentioned.

One note: you can absolutely use Python or Node just as well as Go. There's Hetzner that offers 4GB RAM, 10TB network (then 1$/TB egress), 2CPUs machines for 5$.

Two disclaimers for VPS:

If you're using a dedicated server instead of a cloud server, just don't forget to backup DB to a Storage box often (3$ /mo for 1TB, use rsync). It's a good practice either way, but cloud instances seem more reliable to hardware faults. Also avoid their object store.

You are responsible for security. I saw good devs skipping basic SSH hardening and get infected by bots in <1hr. My go-to move when I spin up servers is a two-stage Terraform setup: first, I set up SSH with only my IP allowed, set up Tailscale and then shutdown the public SSH IP entrypoint completely.

Take care and have fun!

show 9 replies
taffydavidtoday at 10:14 AM

> I bought a GitHub Copilot subscription in 2023, plugged it into standard VS Code, and never left. I tried Cursor and the other fancy forks when they briefly surpassed it with agentic coding, but Copilot Chat always catches up.

> Here is the trick that you might have missed: somehow, Microsoft is able to charge per request, not per token. And a "request" is simply what I type into the chat box. Even if the agent spends the next 30 minutes chewing through my entire codebase, mapping dependencies, and changing hundreds of files, I still pay roughly $0.04.

> The optimal strategy is simple: write brutally detailed prompts with strict success criteria (which is best practice anyway), tell the agent to "keep going until all errors are fixed," hit enter, and go make a coffee while Satya Nadella subsidizes your compute costs.

Wow. I'll definitely be investigating this!

show 3 replies
t_mahmoodtoday at 8:17 AM

SQLite is fine, but I have ran Postgresql on a $20 server without any issues, and I would suggest if you have to deal with concurrent users and tasks, Postgresql is the way to go. SQLite WAL works, but sometimes it caused some issues, when you have a lot of concurrent tasks running continuously.

And, not sure I'm correct, but I felt Postgresql has more optimized storage if you have large text data than SQLite, at least for me I had storage full with SQLite, but same application on Postgresql never had this issue

show 1 reply
nerder92today at 1:03 PM

This is supposed to be a contrarian opinion yet this is a retoric yapped non-stop in the “build in public” community. Of course lean is a good approach, it makes sense, and most engineers know this. Is not a new concept, we’ve been doing this for years in every branch of engineering.

The invented “people start with a k8s cluster for 5 users” doesn’t really exist. This is just a story repeated ad nauseam to fit a narrative that help them justify their choices. This position is just as dogmatic, if not more, than the alleged dogma it attempts to disrupt.

Smart technical leaders knows that technical decisions only matter in context never in absolutes. The right answer is always “it depends”.

I can agree that there is a tendency to prematurely optimize infra, as a direct consequence of lack of measuring especially in young busy startups. One could argue that premature optimization might be the smart choice when you don’t have enough data, as in the best case scenario (your startup do well) you’ve saved some time, worst case scenario you’ve lost some money that depending on the situation might be less valuable than time spent in maintaining, and later refactoring, infra.

show 3 replies
p4bl0today at 7:35 AM

Just in case, if there are others like me who where wondering what does "MRR" means, it seems to be "monthly recurring revenue".

show 2 replies
brkntoday at 8:55 AM

The text feels incoherent to me and lacks some nuance.

It starts about cutting costs by the choice of infrastructure and goes further to less resource hungry tools and cheaper services. But never compares the cost of these things. Do I save actually the upgrade to a bigger server by using Go and sqlite over let's say Python and postgres? Or does it not even matter when you have just n many users. Then I do not understand why at one point the convenience of using OpenRouter is preferred over managing multiple API keys, when that should be cheaper and a cost point that could increase faster than your infrastructure costs.

There are some more points, but I do not want to write a long comment.

show 1 reply
vxsztoday at 7:52 AM

I learned nothing. Most of this seems like common basic advice, wrapped up in AI written paragraphs...

Initially from the title, I thought it would be about brainstorming and launching a successful idea, and that sort of thing.

show 5 replies
aleda145today at 8:05 AM

Great stack! I'm doing a similar approach for my latest project (kavla.dev) but using fly.io and their suspend feature.

Scaling to zero with database persistence using litestream has cut my bill down to $0.1 per month for my backend+database.

Granted I still don't have that many users, and they get 200ms of extra latency if the backend needs to wake up. But it's nice to never have to worry about accidental costs!

show 1 reply
ianpurtontoday at 8:09 AM

When he switches from Kubernetes in the cloud to Nginx -> App Binary -> Sqlite he trades operations functionality for cost.

But, actually you can run Kubernetes and Postgres etc on a VPS.

See https://stack-cli.com/ where you can specify a Supabase style infra on a low cost VPS on top of K3s.

show 1 reply
Gooblebraitoday at 9:41 AM

I know this article is about the stack, but I'd like to point out that the success of the author has probably more to do with their marketing/sales strategy than their choice of technical infrastructure.

Something to remind to many tech folks on HN

show 3 replies
wg0today at 10:47 AM

Anyone doing per tenant database with SQLITE + Litestream? Please share your experiences and pain points. I know migrations are one. The other challenge is locating the correct database from incoming request. What else?

show 1 reply
AlexSalikovtoday at 1:27 PM

Similar approach here. I run a side project on Next.js + Vercel (free tier) + Neon Postgres (free tier). Total hosting cost: $0/month.

The one place I'd push back on SQLite: if your app has any write concurrency from external processes (cron jobs, webhooks), WAL mode helps but you still hit lock contention. I have data collection scripts running every 30 minutes that write to the same DB the web app reads from. Postgres handled that cleanly from day one. Neon's free tier is 512MB with connection pooling — more than enough for a side project with real data.

skeeter2020today at 1:14 PM

I get that the focus of this article is on the tech portion, but I don't know anyone pitching today (aside from OpenAI) who is asking for big funding for the tech costs. It doesn't really matter if you built a system that costs you $200/month or $20/month if your lifetime value is $1000 and CAC is only $10 but you've got no money. That's what people want to fund. VC funding is gasoline you pour on a fire (or fuel for you rocket if you're being charitable) - it makes you go faster; a pitch that focuses on "slightly lower monthly op costs" is not attractive.

yoasotoday at 11:28 AM

I'm taking the opposite approach - managed services all the way, and my monthly infrastructure costs are higher than what's described here.

No regrets. Infrastructure isn't the problem I'm trying to solve. The problem is: who's actually going to pay for this?

Optimizing infrastructure before you have customers is like designing a kitchen before you've written the menu. I launched within 72 hours of starting development and went straight to customer validation. The market feedback started coming in immediately.

Infrastructure costs show up in your bill. The cost of slow customer validation doesn't show up anywhere - until it's too late. That's the number I watch.

show 3 replies
plommetoday at 1:54 PM

The biggest cost when bootstrapping always seemed to be your salary to me, not infra costs. How long can you pay your mortgage and feed your kids off what should be your retirement or rainy day funds?

firefoxdtoday at 7:59 AM

I was writing about this recently [0]. In the 2000s, we were bragging about how cheap our services are and are getting. Today, a graduate with an idea is paying $200 amounts in AWS after the student discounts. They break the bank and go broke before they have tested the idea. Programming is literally free today.

[0]: https://idiallo.com/blog/programming-tools-are-free

hackingonemptytoday at 7:32 AM

> If you need a little breathing room, just use a swapfile.

You should always use a swap file/partition, even if you don't want any swapping. That's because there are always cold pages and if you have no swap space that memory cannot be used for apps or buffers, it's just wasted.

show 1 reply
peter_retieftoday at 1:45 PM

AWS is not value for money, I do have a DO account that is great but my development is mostly hosted locally with tunnels from cloudflare, it is remarkable how far you (I) can get with that setup.

show 1 reply
the__alchemisttoday at 1:26 PM

I concur with some of the commenters that this read as a bit of a brain dump. It has a thread connecting several loosely-related topics.

Observation #1: You can also solve the tech stack problem with Heroku. I think the author's stack probably has a steeper learning curve, but is a cheaper option. I think it's a bit of an odd comparison (I won't say straw-man, as I don't doubt some people do this) to go from a fully-controlled simple setup to using AWS with a pile of extra crap. You can also, for example, run something similar to what he or she is describing on AWS, Heroku etc. (I.e. without the things in the AWS diagram he indicated like kubernetes and load balancers.)

Observation #2: I have not found WAL mode is an antidote to SQLite locks during multiple concurrent writes. (This is anecdotal)

I think regarding Go vs Python/Ruby etc. I completely get that. I would now like to check out Go on web. I use Rust for most of my software writing, but am still on Python for web servers, because there is nothing I can use for Rust that is as powerful and easy as Django.

prakhar897today at 8:11 AM

Do these things actually work? I've seen way too many gurus on twitter claiming to make 10K+ MRR every month. And then they quietly start applying for jobs. or selling courses instead of cashing in.

show 2 replies
thibaultmoltoday at 8:03 AM

Pretty sure this is just written by AI... Why else would someone call "Sonnet 3.5 Sonnet and gpt 4o' high end models.

show 3 replies
jstanleytoday at 8:09 AM

The most interesting thing in here is https://github.com/smhanov/laconic which is the author's "agentic research orchestrator for Go that is optimized to use free search & low-cost limited context window llms".

I have been doing this kind of thing with Cursor and Codex subscriptions, but they do have annoying rate limits, and Cursor on the Auto model seems to perform poorly if you ask it to do too much work, so I am keen to try out laconic on my local GPU.

EDIT:

Having tried it out, this may be a false economy.

The way it works is it has a bunch of different prompts for the LLMs (Planner, Synthesizer, Finalizer).

The "Planner" is given your input question and the "scratchpad" and has to come up with DuckDuckGo search terms.

Then the harness runs the DuckDuckGo search and gives the question, results, and scratchpad to the Synthesizer. The Synthesizer updates the scratchpad with new information that is learnt.

This continues in a loop, with the Planner coming up with new search queries and the Synthesizer updating the scratchpad, until eventually the Planner decides to give a final answer, at which point the Finalizer summarises the information in a user-friendly final answer.

That is a pretty clever design! It allows you to do relatively complex research with only a very small amount of context window. So I love that.

However I have found that the Synthesizer step is extremely slow on my RTX3060, and also I think it would cost me about £1/day extra to run the RTX3060 flat out vs idle. For the amount of work laconic can do in a day (not a lot!), I think I am better off just sending the money to OpenAI and getting the results more quickly.

But I still love the design, this is a very creative way to use a very small context window. And has the obvious privacy and freedom advantages over depending on OpenAI.

show 1 reply
jmward01today at 9:05 AM

The basic premise, try to be lean, is a good one. The implementation will clearly be debated with everyone having their own opinion on it but the core point is sound. I'd argue a different version of this though: keeping things lean forces simplicity and focus which is incredibly important early on. I have stepped into several startups and seen a mess of old/broken/I don't know what it does so leave it/etc etc. All of that, beyond the cost, slows you down because of the complexity. Regular gardening of your tech stack matters and has a lot of benefits.

ilikestarcrafttoday at 1:04 PM

One thing that I noticed was the mention of Claude 3.5 Sonnet or GPT-4o as cutting-edge models when the blog was written 25 days ago. This sadly makes me suspect that this was written by a LLM instead of a person...

poncotoday at 8:33 AM

Always good to challenge the narrative - but I don't pay for RDS Postgres because of the WAL, replication, all the beauty of pg etc. I pay RDS because it's largely set and forget. I am gladly paying AWS to think about it for me. I think at a certain scale, this is a really good tradeoff. At the very beginning it could be overkill, and at the top end obviously its unsuitable - but for most of us those tradeoffs are why it's successful.

ilikestarcrafttoday at 1:04 PM

One thing that I noticed was the mention of Claude 3.5 Sonnet or GPT-4o when the blog was written 25 days ago. This sadly makes me suspect that this was written by a LLM instead of a person...

pdimitartoday at 11:37 AM

I do appreciate the technical simplicity argument and I'm always advocating for it. And the few neat tricks i.e. Copilot.

That being said, I'd much rather read a few ideas for good recurring passive income. Instead, the author kind of flexes on that, then says "I get refused VC money because they don't see how their money would be useful for me" -- which is one more flex -- and moves on to the technical bits.

It's coming across as bragging to me.

ronbentontoday at 10:01 AM

I want to know how he’s identifying and monetizing businesses

shireboytoday at 12:44 PM

This is my life goal right now. I have a bajillion ideas, know how to code them (even faster now), and just not enough time due to day job. A few questions:

How do you market them?

Is customer support an issue?

Do you see risk since ai makes it so easy to build/copy?

jjjgggggggtoday at 12:34 PM

Where do you get your eh-trade.ca stock price data? Given the licensing fees, that seems like one of the greater challenges of bootstrapping anything with market data.

BobBagwilltoday at 12:13 PM

Modern tech stacks always remind me of this cartoon:

https://www.toontales.net/short/lumber-jerks/

Acme Toothpicks

pelorattoday at 9:17 AM

This is how every website used to be run before everyone fell four the cloud trap.

show 1 reply
cagztoday at 8:11 AM

Nice tech read, but without information about which companies, doing what, just feels way too click-baity.

WolfOlivertoday at 10:08 AM

20$ vs 300$ does not really matter if you have multiple 10K MRR.

show 2 replies
iamflimflam1today at 10:27 AM

Would be handy to actually see what these companies do…

podlptoday at 10:51 AM

I love SQLite and have ran it even on networked drives with queued writes for read-heavy applications. It’s an incredibly robust piece of software that’s often cost me pennies per month to serve 100k+ monthly users. But there’s definitely a time and place for solid, dedicated database servers like Postgres.

gloomydaytoday at 9:01 AM

I think newer developers really need to learn that you can actually do production stuff using bare tools. It is not crazy, especially in the beginning, and it will save you a ton of money and time.

cmiles8today at 11:54 AM

The biggest risk to cloud revenues is that everyone wakes up and realizes they could slash their cloud bills by 60+% quite quickly with just some minimal leaning.

mstaorutoday at 8:56 AM

While I applaud the acumen, this reads like watching a kid standing on the 3rd floor balcony shouting "look what I can do!"

$20/month. Yeah. Great, but why? You get a lot of peace of mind with "real" HA setup with real backups and real recovery, for not much more than $20, if you are careful.

Another half of article is about running "free, unlimited" local AI on a GPU (Santa brought it) with, apparently, free electricity (Santa pays for it).

xxxxxxxxtoday at 11:17 AM

This is similar to what I do. Linode, Debian, Go, HTMX, SQLite (with modernc.org/SQLite so I have no CGO dependency) and Caddy. If I have apps that need a lot of storage, I just add an S3 bucket.

sourcecodeplztoday at 11:24 AM

I do it even more simpler: build in PHP and webhosting from Hetzner. All managed: email, sub-domains, name-servers, OS updates/patches etc.

I really started to enjoy managed servers/instances.

44za12today at 8:18 AM

I read it as an article in defence of boring tech with a fancier/clickbaity title.

Here’s the more honest one i wrote a while back:

https://aazar.me/posts/in-defense-of-boring-technology

show 1 reply
krypttttoday at 10:52 AM

We have gone full circle haven't we?

jofzartoday at 9:08 AM

I decided to look at their website halfway through the post,

https://imgur.com/a/7M4PdO6

This is really what 10k mrr can get you? A badly designed AI slop website that isn't even mobile correctly compatible. The logo is white background on black website like a university project.

I can't believe that people are willingly spending money on this.

show 2 replies
Myzel394today at 9:22 AM

Does anybody know a good service to self host Ai? My graphics card is shit, I want to rent hardware to run my own models

🔗 View 27 more comments