1
0 Comments

Self-hosting a Next.js SaaS on a home server with PM2 – what actually bit me

Hey IH —

Forge Regex (https://regex.ststudio.top) runs on my home server: Next.js + PM2 + SQLite.

Why self-host early: cost control, full control of SQLite files, and I already had a box on the LAN.

What works fine

  • pnpm build + pm2 restart
  • rsync deploy of src/ (careful with --delete)
  • SQLite for auth sessions, quotas, subscriptions, shares

What bit me

  1. Orphan next-server holding :3000 after a bad restart → EADDRINUSE. Fix: stop PM2, fuser -k 3000/tcp, restart.
  2. Broad rsync --delete once wiped ecosystem.config.cjs while PM2 still “remembered” the process.
  3. Mixing server-only .env.production with local secrets — never sync env blindly.

Tradeoff

Self-host is great until DNS / power / upload bandwidth becomes the product problem. I’m accepting that while validating demand.

Ask

At what MRR (or pain level) would you move this off a home server to a VPS / PaaS?

on August 6, 2026
Trending on Indie Hackers
I built a startup-idea scanner. It just told me none of my 3,400 ideas are easy wins. User Avatar 83 comments I Just Discovered My Analytics Numbers Are Mostly Fake. Here Is Why. User Avatar 77 comments “I’ll just post on Upwork” is not a client strategy. Here’s what I built instead. User Avatar 62 comments Co-founders suck… User Avatar 53 comments The Capture Trap User Avatar 34 comments Solo-built Pistly for months. Launching on PH this week and I still don't know if the market wants it. User Avatar 33 comments