Dashboard/Overview
Profile Avatar
Back to Blog Dashboard
Infrastructure

Why I Switched from Vercel to VPS + Coolify: Save 80% on Hosting Costs

2026-05-146 min read

Self-Hosting Next.js: Why Vercel Became Too Expensive

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

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

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)

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

  1. Click "New Project" → "New Application"
  2. Select your GitHub repo and branch (main)
  3. Set Build Command: npm run build
  4. Set Start Command: npm start
  5. Coolify auto-detects it's a Next.js app
  6. 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: Doctorhunt Case Study

Here's an actual project I deployed on Coolify:

Doctorhunt (Healthcare platform with appointment booking)

// API route that runs on Coolify VPS
export async function POST(request) {
  const { patientId, appointmentDate } = await request.json();
  
  // Directly queries PostgreSQL on same VPS
  const appointment = await db.appointments.create({
    patientId,
    appointmentDate,
    status: 'PENDING'
  });

  return Response.json({ 
    success: true, 
    appointmentId: appointment.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)

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

Pain Points

  1. Initial setup takes 30 mins (vs. Vercel's 2-minute Deploy Now)
  2. You're responsible for VPS updates (not scary, but overhead)
  3. Need basic Linux knowledge (not much, but some)

Why It's Worth It

  1. Cost predictability: Same $10 bill every month, no surprises
  2. Performance: APIs respond 2-3x faster (no serverless latency)
  3. Flexibility: Run cron jobs, background workers, anything
  4. Ownership: Your data, your infrastructure, your terms

The Infrastructure Stack I Now Use

For Doctorhunt + 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?

Ask yourself these questions:

  1. Is your hosting bill >$50/month? → Coolify saves you 60-80%
  2. Do you run multiple services? → Coolify handles it easily
  3. Are you in India/Asia? → VPS providers here are cheap ($5-15/mo)
  4. 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

  1. Research VPS providers (Hetzner, DigitalOcean, Linode—all good)
  2. Clone the Coolify docs: https://coolify.io/docs
  3. 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

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.