---
title: "Leave Vercel in 2026: your Next.js app and its database, in France"
url: https://while.sh/en/guides/migrate-from-vercel/
author: "Aloïs Oddon, co-founder of Nextmap"
updated: 2026-11-19
---

# Leave Vercel without rewriting your Next.js app, with your AI (2026)

Is your Vercel bill climbing, or does your data have to stay in France? Connected to while over MCP, your AI takes your Next.js app as it is, with its database and its jobs, and deploys it in France.

> **The short version.** Over MCP, your AI moves your Next.js app from Vercel, with its database, jobs and variables, and deploys it with while, in France. What matters, like deleting a database, waits for a person's approval.

## Prerequisites

- A Next.js app on Vercel, and its repository on your computer.
- An AI that works in a terminal: Claude Code, Codex, Cursor or Gemini CLI.

## Step 1: Give your AI this message

Open your AI in your app's folder and paste this message into it:

```text titre="The message to give your AI"
Connect to while with my account (while.sh/agents), then put my app on while.
```

Without an account, your AI deploys your app as a trial, in one request. To keep it, open the link it gives you and create your account.

With your account, your AI adds while's MCP server itself. If it asks you to, restart it. On the first call to while, a page opens in your browser. In Claude Code, if it doesn't open, type /mcp, choose while, then Authenticate. On that page, choose your app, or "A new app", then click Authorize.

## Step 2: Open your app

Your AI gives you your app's address, for example `https://mon-appli.while.cloud`, over HTTPS.

## What your AI does

It writes while.yaml at the root of your app:

```yaml titre="while.yaml"
apiVersion: while/v1
project: mon-appli
services:
  - name: web
    port: 3000
    health:
      path: /
```

Your app is built, then started with `next start`, the way Next.js runs outside Vercel, with images, on-demand rendering and server routes included (source 1).


<figure class="illus"><img src="/illustrations/guide-migration-1200.webp" srcset="/illustrations/guide-migration-768.webp 768w, /illustrations/guide-migration-1200.webp 1200w" sizes="(min-width: 48rem) 46rem, 100vw" width="1536" height="1024" loading="lazy" decoding="async" alt="Migrate your Next.js app from Vercel to while: the PostgreSQL database copied with pg_dump, the variables carried over, secret values typed by a person, the app at its own address before the domain switch, in France" /><figcaption>The database, the variables and the secrets: your AI moves it all, and the app answers at its own address before the domain switch.</figcaption></figure>

## Bring over your scheduled jobs

> You, to your AI: Bring over the crons from our vercel.json.

Your AI reads the jobs in `vercel.json` (source 2) and declares them as scheduled jobs in while, at the same times, with the same code.

## Copy your database

> You, to your AI: Copy our Neon database to while.

Your AI exports the database with `pg_dump`, then loads it into a PostgreSQL database in while, backed up every day.

## Carry over your variables

> You, to your AI: Carry over our environment variables from Vercel.

Your AI carries your settings over to while. You enter your secret keys yourself: your AI never sees them. Your AI declares the ones the browser reads, prefixed with `NEXT_PUBLIC_`, for the app's build.

## Replace Blob and Upstash Redis

> You, to your AI: Replace Vercel Blob and our Upstash Redis.

Your AI adds S3-compatible storage for your files and a Redis-compatible cache for your keys, and connects your code to them.

## Move to your own domain

> You, to your AI: Put the app on app.acme.com.

Your AI declares the domain, you add the DNS records it gives you, and the HTTPS certificate follows.

## Go back to the previous version

> You, to your AI: Go back to the previous version.

In the 30 minutes after a production release, the previous version comes back in a second. After that, it takes a few seconds. Once the previous version is back, your AI reads what broke in while's logs, fixes it and deploys again.

## Next steps

- [Deploy a Next.js app](/en/guides/deploy-nextjs/)
- [Compare Vercel and while](/en/comparisons/while-vs-vercel/)
- [Compare the Vercel alternatives](/en/comparisons/vercel-alternatives/)

## Sources

1. [Next.js, self-hosting (next start, images, ISR)](https://nextjs.org/docs/app/guides/self-hosting), 2026-11-02
2. [Vercel, cron jobs (vercel.json)](https://vercel.com/docs/schedules/cron-jobs), 2026-11-02

## Questions

### Do I need to change my code?

No, except for what depends on Vercel's services, like Blob, which your AI replaces. Images, on-demand rendering and server routes work without Vercel (source 1).

### What about my Neon database, formerly Vercel Postgres, or Supabase?

Your app can keep it, once its internet access is opened and approved. To have everything in France, your AI copies it into a PostgreSQL database in while with pg_dump.

### Can I keep Vercel until I have checked everything?

Yes, your app runs on while at its own address before you switch your domain over.

### Can I use it for my business?

Yes, from day one on while, whereas Vercel's free plan is limited to personal use.

### Does my AI see my credentials?

No. You paste them into while, the app uses them, and your AI never sees them. Every call is logged.
