The $20 USD/mo problem
The issue is that right now I have a pre-revenue application built with Next.js hosted on Vercel for $20 USD per month, which comes to $28 CAD per month.
That works out to $336/year for an application with no revenue. The good news is that this bill already includes the cost of my Supabase database.
That said, if I build several applications over the course of a year, the cost of launching apps can climb fairly quickly.
So I tried 2 alternatives: Cloudflare and Render.
Trying Cloudflare
I tried the approach from Deploying Next.js on Cloudflare | The Vercel Better Alternative?,
but since I use "next": "^16.2.6" it is not possible to run my app with
OpenNext as of today.
Trying Render
Next, I tried Render. It uses a cold-start approach, which adds 50 seconds of waiting when a new visitor opens the application.
Trying to acquire users with a 50-second delay on every visit is really not a smart move.
The VPS option, like DigitalOcean or OVHcloud
DigitalOcean start at 4usd$/m OVH cloud start at 4cad$/m
Need to learn
- ssn tunnel
- linux distro
- package manager (apt, yum), vim,
- caddy or nginx
- setup a domain
- (app rebuilder )systemd - pm2 - forver
- automatethe deploy new updates, script
- docker & docker compose with github action
- Adding a load balancer (caddy, nginx)
- Code as a service Terraform
- k8s
Do this before you deploy to Vercel
There are far too many steps — I would rather keep hosting minimal.
I am staying on Vercel, but you have to configure as much as possible to avoid bills that blow up.
As a second option, I am looking at Railway.
What I learned
Vercel, the author of Next.js, has genuinely put in the effort to make deploying Next.js on Vercel easy — and that even makes migrating a Next.js app to another host very difficult.
Simplicity has a price:
- Vercel — $20 USD/mo, simple and stable, plus a whole set of integrations.
- Cloudflare — even with the OpenNext project, they struggle to support the latest versions.
- Render — the cold start slows down adoption.
If your time is worth more than $20/month right now, stay on Vercel and ship.