Skip to main content
Hostwares

How do you move a Next.js app off Vercel?

Push the repository as it is, deploy it on a host that runs next start, copy the environment variables, then point the domain at the new host; a Next.js app has no Vercel dependency unless you added one. The things that do break are the @vercel/* packages (analytics, KV, Postgres, Blob), routes declared with the edge runtime, and NEXT_PUBLIC_ variables that were not set before the first build. On Hostwares the build is detected from GitHub, a pack is a flat price with no seats or bandwidth meter, and a full-root Cloud Instance is there if you need cron, workers or your own Docker setup.

Step by step

  1. 1

    Inventory the Vercel-specific parts

    List environment variables from the Vercel project settings, find @vercel/* imports and edge runtime declarations, note cron jobs in vercel.json, and note any Vercel storage products the app uses.

    Find the dependencies

    grep -rn "@vercel/\|runtime = 'edge'" src app
    cat vercel.json 2>/dev/null
  2. 2

    Replace what only works on Vercel

    Swap @vercel/postgres for a managed Postgres connection string (create_database over MCP returns one); @vercel/kv for Redis or a table; @vercel/blob for object storage; remove @vercel/analytics or point it at a self-hosted alternative; delete edge runtime lines so routes run on Node. Optionally set output: 'standalone' in next.config for a smaller image.

  3. 3

    Deploy from GitHub

    Dashboard → Deployments → New: repository, branch, pack. Next.js is detected and next build / next start are filled in. Cron jobs and background workers need a process of their own: Dashboard → Instances → New gives a full-root instance that can run the app and a cron entry side by side. The order creates an invoice and the build starts once it is paid.

    From Claude Code

    "Deploy this repo to Hostwares as my-app"  →  deploy, then get_status
  4. 4

    Copy the environment, verify the build

    Add every variable on the Environment tab (set_env over MCP), NEXT_PUBLIC_ ones included, then redeploy so they are baked in. Open the hostwares.app address the site gets with HTTPS: deep links, an API route, an image through next/image. diagnose_site reads status and logs together if anything is wrong.

    Variables are read at build time, so the site rebuilds after you change them; the current version keeps serving until the new build is ready.

  5. 5

    Cut over the domain

    Lower the DNS TTL at your registrar a day before. Add the domain on the Domains tab (add_domain) and create the record it shows; the certificate is issued once it resolves (verify_ssl). Remove the domain from the Vercel project only after the new host answers on it. Keep the Vercel project for a week as the rollback.

What breaks, and the fix

@vercel/* packages fail at build or runtime
Replace each with a provider-neutral equivalent before deploying.
Edge routes error on Node
Remove export const runtime = 'edge'; the same code runs as a Node route.
NEXT_PUBLIC_ values are undefined
Set them on the Environment tab and redeploy; they are read at build time.
Cron jobs from vercel.json never run
Run them from a Cloud Instance cron entry or an external scheduler that hits a route.
Vercel Image Optimization behaves differently
next/image runs with the app's own sharp pipeline; set remotePatterns for external image hosts.

What it costs

  • A Frontend pack from $1/mo; the pack most server-rendered apps pick is $5/mo (1 vCPU / 4 GB / 25 GB).
  • A managed Postgres from $10/mo if the app used Vercel Postgres; a Cloud Instance from $2/mo for cron and workers.
  • No seats and no bandwidth meter; payment comes before the build starts.

App

$1/mo

Starter Frontend pack, 1 vCPU / 1 GB RAM / 10 GB

Database, users and files

$5/mo

Smallest dedicated Supabase pack; several projects fit on one

For comparison

  • Vercel Pro, per seat per month: $20/seat (checked 2026-11-06, vercel.com)
  • Vercel Pro bandwidth beyond the included 1 TB (most sources; some cite higher): $0.15/GB (checked 2026-11-06, vercel.com)

Questions

Does Next.js need Vercel?+

No. Next.js is a Node application; next start serves it anywhere. Vercel adds its own packages and edge runtime, which are the only parts that need replacing.

Will ISR, server components and middleware work?+

Yes, on a single Node process. ISR keeps its cache on the instance's disk; server components and middleware run in next start as on any host.

How do I avoid downtime during cutover?+

Lower the DNS TTL beforehand, verify the site on its hostwares.app address, add the domain and create the record, then wait for it to resolve before removing it from Vercel. Both answer during the overlap.

Do I need Docker?+

No. The build is detected from the repository. If you already have a Dockerfile it is used as-is.

Can an agent do the move?+

Most of it. Add Hostwares to Claude Code or Cursor; it deploys with deploy, sets variables with set_env, creates a database with create_database and attaches the domain with add_domain. Replacing @vercel/* packages is a code change it can also make in the repository.

What does it cost?+

A Frontend pack from $1/mo, flat for the term, no seats, no bandwidth meter. The Standard pack at $5/mo suits most server-rendered apps.