Why I Switched from Vercel to VPS + Coolify: Save 80% on Hosting Costs
Self-Hosting Next.js: Why Vercel Became Too Expensive
Short answer: At scale, serverless bills spike with traffic and bandwidth. A VPS with Coolify gives predictable monthly cost and faster API responses for many Indian startups.
Self-hosting has made a massive comeback in the Node.js and Next.js ecosystem. While managed platforms like Vercel, Netlify, and Heroku are incredible for early-stage prototyping and MVP launches, their pricing models can become punitive at scale—especially for Indian startups operating on tight budgets.
When working with 10-50 person teams in India, budget predictability is non-negotiable. I've watched too many founders experience the shock of this transition:
- Month 1-2: Running on Vercel's free tier (~$0)
- Month 3-4: First paid plan ($20-25/mo)
- Month 5: Traffic grows, serverless invocations spike → $150-300/mo bill
- Result: Startup runway just got 2 months shorter.
The culprit? Vercel's pricing is built on serverless compute and bandwidth usage—two variables you can't always predict.
The Serverless Pricing Trap
Short answer: You pay for invocations, egress, and connection churn, so monthly cost can jump without product growth.
Here's why serverless became expensive for us:
1. Unexpected Bandwidth Charges
Each Next.js API route, image optimization, and user request counts against your bandwidth limit. A single viral feature can cost hundreds.
2. Cold Start Latency
Serverless functions "wake up" on demand, adding 100-500ms to first requests. This affects user experience on traffic spikes.
3. Per-Function Pricing
Running 15-20 microservices (auth, payments, image processing)? You're paying per invocation, per service.
4. Database Connections
Serverless environments spin up new database connections constantly. Connection pooling becomes a premium feature.
The real cost: It's not just the bill—it's the unpredictability that kills fast-moving startups.
Introducing Coolify: The Open-Source Heroku Alternative
Short answer: Coolify is a self-hosted control plane that deploys Docker apps from Git to your VPS, similar to Vercel or Heroku but on hardware you control.
Coolify is a self-hostable, open-source deployment platform that mimics Heroku, Netlify, and Vercel—but on your infrastructure.
Pair it with a $10/mo VPS from Hetzner, DigitalOcean, or Linode, and you get:
Why Coolify Wins for Startups
| Feature | Vercel | Coolify + VPS | |---------|--------|--------------| | Monthly Base Cost | $20-50 | $10 (VPS) + Free (Coolify) | | Predictable Pricing | ❌ Varies with usage | ✅ Fixed $10/mo | | Data Location Control | ❌ AWS regions only | ✅ Your choice | | Automatic CI/CD | ✅ GitHub integration | ✅ GitHub integration | | Database Hosting | ✅ Paid add-on | ✅ Included | | Docker Support | ❌ Limited | ✅ Full support | | Annual Savings | ~$300/year baseline | ~$120/year (60% cheaper) |
How to Deploy Next.js on Coolify (5 Minutes)
Short answer: Install Coolify on a VPS, connect GitHub, point it at your Next.js repo, set build and start commands, then deploy.
Prerequisites
- A VPS ($10/mo from Hetzner or DigitalOcean)
- GitHub account with your Next.js repo
- SSH access to VPS
Step 1: Install Coolify on Your VPS
# SSH into your VPS
ssh root@your-vps-ip
# Download and run Coolify installer
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
Step 2: Access Coolify Dashboard
http://your-vps-ip:3000 Create an admin account and log in.
Step 3: Connect GitHub
In Coolify Dashboard → Settings → GitHub Integration → Authorize app
Step 4: Deploy Your Next.js App
- Click "New Project" → "New Application"
- Select your GitHub repo and branch (
main) - Set Build Command:
npm run build - Set Start Command:
npm start - Coolify auto-detects it's a Next.js app
- Click Deploy → Watch logs in real-time
Step 5: Add Custom Domain (Optional)
Coolify → Application Settings → Domains → Add your-domain.com
Coolify auto-provisions SSL with Let's Encrypt (free)
Real-World Performance: DaawatSaathi Event Management SaaS
Short answer: DaawatSaathi is an Indian wedding RSVP and guest management SaaS we host on the same stack as other production apps. APIs stay warm on the VPS so latency stays low.
Here's an actual project pattern I deploy on Coolify:
DaawatSaathi (event management SaaS: RSVP, guests, and host dashboards)
// API route that runs on Coolify VPS (example: RSVP create)
export async function POST(request) {
const { eventId, guestEmail, responseStatus } = await request.json();
const rsvp = await db.rsvps.create({
eventId,
guestEmail,
responseStatus,
status: "CONFIRMED",
});
return Response.json({
success: true,
rsvpId: rsvp.id,
platform: "Coolify VPS",
});
}
Results:
- Cold start: 0ms (always warm, no serverless spin-up)
- Response time: 50-120ms (vs. 200-400ms on Vercel)
- Monthly cost: $40 (VPS + PostgreSQL backup) vs. $180+ on Vercel
When to Use Vercel (vs. Coolify)
Short answer: Use Vercel when you want zero ops and low traffic. Use Coolify when you need fixed bills, warm APIs, or many services on one box.
Choose Vercel if:
- Pre-seed startup (cost irrelevant)
- Low monthly active users (<10k)
- Need edge functions in 30+ regions
- Team unfamiliar with DevOps
Choose Coolify if:
- Scaling to 100k+ users/month
- Need predictable infrastructure costs
- Running microservices (auth, payments, notifications)
- Concerned about vendor lock-in
- Want complete data control
The Migration Process: What I Learned
Short answer: Migration trades a longer first setup for lower recurring cost and full control over the server.
Pain Points
- Initial setup takes 30 mins (vs. Vercel's 2-minute Deploy Now)
- You're responsible for VPS updates (not scary, but overhead)
- Need basic Linux knowledge (not much, but some)
Why It's Worth It
- Cost predictability: Same $10 bill every month, no surprises
- Performance: APIs respond 2-3x faster (no serverless latency)
- Flexibility: Run cron jobs, background workers, anything
- Ownership: Your data, your infrastructure, your terms
The Infrastructure Stack I Now Use
Short answer: One modest VPS runs Docker, PostgreSQL, Redis, and Coolify so multiple apps share fixed monthly cost.
For DaawatSaathi + GuturGu (2 production apps): VPS (Hetzner CPX11 - $10/mo)
├── Docker containers
├── PostgreSQL + Redis
├── Coolify auto-deploys from GitHub
└── SSL certificates (auto-renewed) Total: $10/month (vs. $250-400/month on Vercel)
Should You Switch to Coolify?
Short answer: If hosting is material to your runway or you run several backend services, Coolify on a VPS often pays back in the first month.
Ask yourself these questions:
- Is your hosting bill >$50/month? → Coolify saves you 60-80%
- Do you run multiple services? → Coolify handles it easily
- Are you in India/Asia? → VPS providers here are cheap ($5-15/mo)
- Do you understand basic DevOps? → Coolify abstracts 90% of complexity
If you answered yes to 2+ questions, switching makes financial sense.
Getting Started: 3 Action Items
Short answer: Pick a VPS, install Coolify, deploy one staging app, then compare latency and monthly cost to your current host.
- Research VPS providers (Hetzner, DigitalOcean, Linode—all good)
- Clone the Coolify docs: https://coolify.io/docs
- Deploy a test Next.js app and measure cost savings
Your first bill will likely be $10-15 instead of Vercel's $50-100. That's a $400-1000/year difference.
FAQs
Short answer: Self-hosting is reliable when you accept light maintenance. Coolify handles deploys; you patch the OS and watch disk and backups.
Q: Is self-hosting more reliable than Vercel? A: Equally reliable. Hetzner's uptime is 99.99%. Coolify abstracts deployment complexity. You handle basic VPS maintenance.
Q: Can I use a database service instead of self-hosting Postgres? A: Yes—Neon, Supabase, or PlanetScale. Coolify still saves you 50% vs. Vercel.
Q: What if I scale to 1M requests/month? A: Upgrade VPS to CPX21 ($20/mo) or use load balancing. Still cheaper than Vercel.
Q: Can I switch back to Vercel later? A: Absolutely. Your code is platform-agnostic. Takes 10 minutes to redeploy.
TL;DR
Vercel = Pay-as-you-go convenience (good for MVPs) Coolify + VPS = Predictable cost + control (good for growth)
If you're shipping production apps in India, Coolify is a no-brainer. The $10/month VPS investment pays for itself in Week 1.
Questions? Drop them in the comments below. Or DM me on Twitter @buildwithnitrosk if you're stuck during setup.
Next week: How to set up CI/CD cron jobs on Coolify for production database backups.