Show HN: We Self-Hosted an App for $2/Month Using an M1 Mac Mini
lab.workhub.so
lab.workhub.so
Performance:
- 1,500-2,000 QPS achieved for SSR and API endpoints during load tests - 50% max CPU utilization hit during viral traffic (350k reddit post views/48h) - System Specs: M1 Mini w/ 8GB RAM, running headless Linux
Tech Stack:
- Docker containers optimized for ARM - Cloudflare Zero Trust Tunnel for connecting to the public internet - Grafana/Prometheus/Loki for monitoring - PostGIS for geographical queries - Custom ARM64 PostGIS image
Monthly Costs Comparison:
Cloud Hosting:
- Compute: $20-30/month - Database: $15-20/month - Storage: $5-10/month - Total: $40-60+/month
Self-Hosted M1 Mini:
- Hardware: $250 (one-time) - Electricity: $1-4/month - Total Reoccurring Costs: ~$2/month
Key Challenges:
- ARM compatibility for PostGIS (built custom image) - Monitoring implementation (self-hosted Grafana stack) - Third-party API costs during traffic spikes - Single point of failure (power outage took us down for a couple hours)
The setup handles our current scale well, with room for optimization. Containerized architecture means cloud migration is straightforward if/when needed. Happy to share implementation details or answer questions about any aspect of the setup. Full technical details: https://lab.workhub.so/running-your-app-on-pocket-change
I host these types of things on a single vps - actually I have a few projects on one vps using different domains, so if you amortize the cost, it's probably $5/mo per - the total vps being around $20/mo although it has less compute than you'd have here, it is in a datacenter which I like.
They are mostly idle and you can run the webapp, nginx, and db all on the same host without any problem.
If the project were more serious or had decent traction then I'd probably first move it to VPS and then start considering cloud options. That's actually been kinda the point of this though: keep it simple and cheap early and if it gets some traction then ramp up the infrastructure beyond being selfhosted, but in the meantime selfhosting it is so cheap: it can just run @ the cost of the power it uses, which the M1 uses very little power.
Part of the choice to self host was to see if we could, but also the costs remain mostly fixed till the hardware maxes out, which we actually see as a feature for this stage of this particular side project.