DEV Community

Royce
Royce

Posted on • Originally published at ossalt.com

How to Migrate from Vercel to Coolify

How to Migrate from Vercel to Coolify

Vercel's Pro plan ($20/user/month) and bandwidth overages add up. Coolify gives you the same git push deployments, automatic SSL, and preview deployments — self-hosted on your own VPS. Here's how to switch.

Step 1: Set Up Coolify

# Install on a VPS (Ubuntu/Debian)
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

Access at http://your-server-ip:8000 and create your admin account.

Step 2: Connect Git Repository

  1. New ResourceApplication
  2. Connect GitHub/GitLab (OAuth) or use a deploy key
  3. Select your repository and branch
  4. Coolify auto-detects the framework (Next.js, Nuxt, SvelteKit, etc.)

Step 3: Configure Build Settings

Map Vercel settings to Coolify:

Vercel Setting Coolify Setting
Framework Preset Auto-detected (or Nixpacks/Dockerfile)
Build Command Build command
Output Directory Publish directory
Install Command Install command
Node.js Version Base image / Nixpacks config
Environment Variables Environment variables (UI)
Root Directory Base directory

Step 4: Set Up Domain and SSL

  1. Point your domain's DNS A record to your Coolify server IP
  2. In Coolify → Application → Domains → add yourdomain.com
  3. SSL is auto-configured via Let's Encrypt

Step 5: Migrate Environment Variables

  1. Export from Vercel: vercel env pull .env.production
  2. Add each variable in Coolify → Application → Environment Variables
  3. Mark sensitive values as "secret"

Step 6: Handle Serverless Functions

This is the biggest difference. Vercel runs serverless functions natively. Self-hosting means:

Option A: Use a Node.js framework with API routes

  • Next.js API routes work in self-hosted mode (Node.js server, not edge)
  • SvelteKit endpoints work normally
  • Nuxt server routes work normally

Option B: Run edge functions as server-side

  • Edge functions won't have edge distribution
  • They'll run on your single server instead
  • For most apps, this is fine

What you lose:

  • Edge network (global CDN distribution)
  • Automatic serverless scaling
  • Edge Runtime (Vercel-specific)
  • Analytics and Speed Insights (use Plausible/Umami instead)

Step 7: Set Up Preview Deployments

Coolify supports PR preview deployments:

  1. Application → Settings → enable Preview Deployments
  2. PRs automatically get a unique URL
  3. Merged PRs clean up automatically

Cost Comparison

Scenario Vercel Pro Coolify + VPS Savings
1 developer $20/month $10/month (VPS) $120/year
3 developers $60/month $20/month $480/year
5 developers $100/month $30/month $840/year
+ bandwidth overage $100-500+/month $0 $1,200-6,000/year

Migration Timeline

Day Task
Day 1 Install Coolify, connect repo, configure build
Day 2 Set up domain, SSL, environment variables
Day 3 Test deployment, verify functionality
Week 2 Switch DNS to Coolify, monitor
Week 3 Cancel Vercel

Compare deployment platforms on OSSAlt — features, pricing, and self-hosting options side by side.

Top comments (0)