Migrate from Vercel

Step-by-step guide to migrating your Vercel project to RaidFrame.

Overview

Migrating from Vercel to RaidFrame takes about 10 minutes. Your Next.js app, environment variables, and domains all transfer over. The main difference: on RaidFrame, your app runs as a persistent Node.js server instead of serverless functions.

Step 1: Install the RaidFrame CLI

curl -fsSL https://get.raidframe.com | sh
rf auth login

Step 2: Import from Vercel

rf init --from vercel
Detected Vercel project: my-app (Next.js 16)

Import environment variables from Vercel? [Y/n] y
  ✓ 12 variables imported (production)
  ✓ 8 variables imported (preview)

Generate raidframe.yaml? [Y/n] y
  ✓ Configuration generated

Review: cat raidframe.yaml

The importer reads your vercel.json and Vercel project settings to generate an equivalent raidframe.yaml.

Step 3: Add a Dockerfile

If you don't have one, RaidFrame generates it:

rf config generate

Or create one manually:

FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./
EXPOSE 3000
CMD ["npm", "start"]

Step 4: Add Your Database

If you're using Vercel Postgres (Neon), Vercel KV, or Vercel Blob:

# Replace Vercel Postgres
rf add postgres
# DATABASE_URL is auto-injected — same env var name

# Replace Vercel KV (Redis)
rf add redis
# KV_URL / REDIS_URL auto-injected

# Replace Vercel Blob
rf add storage
# BLOB_URL / STORAGE_URL auto-injected

Migrate Database Data

# Export from Neon/Vercel Postgres
pg_dump $OLD_DATABASE_URL > backup.sql

# Import to RaidFrame
rf db import main backup.sql

Step 5: Deploy

rf deploy
Building...        ████████████████████ 100% (38s)
Deploying...       ✓ 2 instances healthy

✓ Live at https://my-app-abc123.raidframe.app

Step 6: Move Your Domain

rf domains add myapp.com

Update your DNS to point to RaidFrame. Once DNS propagates, your traffic flows to RaidFrame.

What Changes

FeatureVercelRaidFrame
RuntimeServerless functionsPersistent Node.js server
Cold startsYes (can be slow)No (always running)
Function timeout10s (hobby) / 60s (pro)No timeout
WebSocketsNot supportedSupported
Background jobsNot supportedNative support
CronLimited (vercel.json)Full cron + job queues
DatabaseVercel Postgres (Neon)Managed PostgreSQL
PricingPer-seat + usageFlat per-service

What Stays the Same

  • next.config.js — no changes needed
  • API routes — work identically as a Node.js server
  • ISR/SSR — works the same (runs as a persistent server, faster than serverless)
  • Environment variables — same names, same behavior

Vercel-Specific Features to Adjust

Edge Functions → Standard Routes

Vercel Edge Functions use the Edge Runtime (no Node.js APIs). On RaidFrame, everything runs on Node.js. Remove export const runtime = 'edge' from any route handlers — they'll run faster on the full Node.js runtime anyway.

Vercel Analytics → RaidFrame Observability

Remove @vercel/analytics. Use RaidFrame's built-in metrics instead:

rf metrics --service web

vercel.json → raidframe.yaml

vercel.jsonraidframe.yaml
rewritesHandle in Next.js config or nginx
redirectsHandle in Next.js config
headersHandle in Next.js config
cronsservices.*.schedule
regionsregion

Common Issues

"Module not found" errors

Vercel's build system resolves some imports differently. If you see module errors, make sure all dependencies are in package.json (not relying on Vercel's auto-install).

ISR Revalidation

ISR works on RaidFrame — pages are revalidated on the server. No changes needed. On-demand revalidation via revalidatePath() and revalidateTag() works identically.

Image Optimization

Next.js Image Optimization works natively on RaidFrame. No @vercel/og dependency needed — use the standard next/image component.