2026-04-12 / 3 min
Shipping .NET and Next.js on a Linux VPS
How I deploy full-stack apps on a custom Linux VPS using Nginx, PM2, and a few boring tricks that just work.
Shipping .NET and Next.js on a Linux VPS
When I started shipping client projects, I tried every "modern" PaaS. They all worked — until the free tiers got in the way. So I went back to basics: a Linux VPS, Nginx, and a small toolbox of commands I now know by heart.
The setup
- Nginx as the reverse proxy, handling SSL via Let's Encrypt
- systemd for .NET services, PM2 for Node.js apps
- MySQL on the same box for smaller projects, managed otherwise
- Git pull + build + reload for deploys — no fancy CI unless the project earns it
Why this still wins
- You understand every layer. When something breaks, you know where to look.
- No surprise bills. The VPS is fixed-cost.
- It's fast. Real SSDs, a single hop between app and database, no cold starts.
What I wish I knew earlier
- Keep your Nginx config in version control from day one
- Set up automated backups before you need them
- Use
pm2 save+pm2 startupso your apps survive reboots - Monitor disk space — the one thing that will actually bite you
This isn't glamorous, but it's reliable. And for client work, reliable wins every time.
