Skip to content

Migrate a Netlify site to exe.dev

Your Netlify site, functions, and data on one VM, and your API keys off it.

Deploy on exe.dev

Shelley handles the setup. About 1 hour.

Prefer a terminal?
curl -fsSL https://exe-staging.dev/deploy/migrate-netlify/prompt.txt | ssh exe.dev new --prompt=/dev/stdin

A Netlify site is a build and a folder of files with Netlify's runtime around it. On exe.dev it all runs on one VM: a small server, built on Netlify's own redirect parser and Blobs server, runs your functions, edge functions, and netlify/server app with the same APIs, and your Netlify Database becomes Postgres. The code stays as it is.

One thing changes on purpose: API keys move into integrations, which add them to requests after they leave the VM, so the VM can't read them.

The examples move the site acme-widgets at www.example.com to a VM called my-site. Nothing changes on Netlify until you make the move.

What you get#

  • Your Netlify site running on the VM at https://my-site.exe.xyz/, with its functions, edge functions, server, database, redirects, headers, forms, Blobs, and variables.
  • git push exe main deploying like Netlify: the build, an atomic switch, and the old deploy kept if anything fails; other branches as a branch deploy.
  • A list of the API keys that can move into exe.dev integrations, where the VM can't read them.
  • A report in ~/netlify/report.md, and your steps for the move.
What's running, and where
Private https://my-site.exe.xyz/ the site, until you make the move
Public https://www.example.com/ the site, after the move
Private https://my-site.exe.xyz:8001/ the branch deploy
Private ssh my-site.exe.xyz the shell; git push exe main deploys
my-site.exe.xyz exe.dev VM
Your site The same build, served with its functions, edge functions, redirects, headers, forms, and image transforms by a small Node.js server on port 8000 :8000~/site
Branch deploys The last branch you pushed that isn't production, built with its own variables, on port 8001 :8001
PostgreSQL Your Netlify Database, copied into Postgres on the VM, the same major version; migrations run on deploy /var/lib/postgresql
Blobs and form submissions Netlify's own Blobs server and a file per form, with your data from Netlify ~/site/data
Integrations Your API keys for Stripe, OpenAI, and others, kept by exe.dev outside the VM
The move kit The hand-over, the scripts, and the report ~/netlify

Deploy with Shelley#

Click Deploy and Shelley will set up Sites from Netlify on a new VM, then check that it works. No config-file wrangling required.

Prefer a terminal?
curl -fsSL \
  https://exe-staging.dev/deploy/migrate-netlify/prompt.txt \
  | ssh exe.dev new --prompt=/dev/stdin
What Shelley is told
Set up Sites from Netlify on this VM by following the exe.dev recipe at https://exe-staging.dev/deploy/migrate-netlify.md?via=deploy from top to bottom.

The recipe's example VM name is my-site. This VM's name is the output of `hostname`: use it wherever the recipe writes my-site. Skip the step that creates the VM; you are on it.

You are done when all of these are true. Check each one yourself:
- Your Netlify site running on the VM at https://my-site.exe.xyz/, with its functions, edge functions, server, database, redirects, headers, forms, Blobs, and variables.
- `git push exe main` deploying like Netlify: the build, an atomic switch, and the old deploy kept if anything fails; other branches as a branch deploy.
- A list of the API keys that can move into exe.dev integrations, where the VM can't read them.
- A report in `~/netlify/report.md`, and your steps for the move.

Read the whole recipe, including the closed details, and do "Rehearse the
move by hand" in order, skipping VM creation; the rest of the page is for
the owner. Use the kit's scripts as published.
You need the owner once, early: show them the commands in "Hand over the
site" with this VM's name, and wait until ~/netlify/handed-over exists
and ~/git/site.git has a commit. Install the rest meanwhile.
Never call Netlify's API yourself and never ask for a Netlify token.
Never run handover --move or netlify/import live, change DNS, or run
share set-public: the move is the owner's call. Scheduled functions stay
off until then.
Keep variable values out of your replies and the report. Never ask the
owner to paste an API key into the conversation: API keys go into
integrations, which the owner adds; secret values Netlify won't hand
over the owner sets with netlify/import set over SSH.
If the site renders pages with a framework's Netlify adapter (Next.js,
Astro, SvelteKit, Nuxt, Remix), switch the build to the framework's Node
adapter, run its server with a systemd unit on port 8000 in place of
netlify@production, and list in the report what moved out of
netlify.toml. For anything else exe.dev doesn't do (Identity, geolocation,
split testing), put it in the report and ask.
Finish with the report's summary, https://<vm>.exe.xyz/, the keys that
could move to integrations, and the owner's steps in "Make the move"
with this VM's name and the site's domains.

Finish with the URLs I should open.

Also at /deploy/migrate-netlify/prompt.txt. The recipe it follows is /deploy/migrate-netlify.md.

How the move works#

  1. Hand over. A script on your computer copies the site from Netlify's API to the VM: settings, variables, form submissions, Blobs, and the database. You git push the code.
  2. Rehearse. Shelley builds the site on the VM and compares it with Netlify, which keeps serving.
  3. Move. The script copies the newest data again, and you point your domain at the VM.

Shelley never sees your Netlify token.

Where everything goes#

On Netlify On the VM
Builds, netlify.toml contexts The same build, on git push exe main
Static files, _redirects, _headers The same rules, read by Netlify's parsers
Functions: background, scheduled The same code; scheduled ones as cron lines (UTC)
Edge functions The same code, in Node.js instead of Deno
Netlify Server (netlify/server) The same entry file: a handler, Hono, Express, Fastify
Netlify Database Postgres, the same major version; migrations run on deploy
Blobs, Forms, Image CDN Netlify's Blobs server; a file per form; images resized here
Variables per context ~/site/env.json and env.preview.json
Branch deploys One branch deploy on port 8001, with its own copy of the database
API keys Integrations
Domains, password protection Custom domains; private until you share

Not here: Identity, split testing, geolocation, the CDN cache, and a preview per pull request. The report lists any the site uses.

Hand over the site#

When Shelley asks, make a personal access token on Netlify (User settings, Applications). On your computer, in the site's checkout, with Node.js 22 or newer:

export NETLIFY_AUTH_TOKEN=nfp_...
curl -fsSLO https://exe-staging.dev/deploy/migrate-netlify/handover.mjs
node handover.mjs my-site.exe.xyz acme-widgets
git remote add exe my-site.exe.xyz:git/site.git
git push exe main

The script only reads from Netlify and writes only to the VM, over SSH. For a database it sends Netlify's read-only connection string; the VM copies the data with pg_dump and deletes it.

Look around#

Read Shelley's report and open https://my-site.exe.xyz/:

ssh my-site.exe.xyz cat netlify/report.md

The site uses your real variables, so a function that sends email or charges cards does it from here too. Other branches deploy to https://my-site.exe.xyz:8001/.

Netlify doesn't hand over secret values. Set each one (paste, Enter, Ctrl-D; add --preview after set for the branch deploy):

ssh my-site.exe.xyz netlify/import set STRIPE_WEBHOOK_SECRET

Take the keys off the VM#

For each API key in the report, make a new key and give it to exe.dev. For Stripe, at the ssh exe.dev prompt:

exe.dev ▶ integrations add http-proxy --name stripe --target https://api.stripe.com --bearer=- --attach vm:my-site

Point the code at it with new Stripe(key, { host: "stripe.int.exe.xyz" }), replace the old key with a placeholder, and revoke it:

ssh my-site.exe.xyz netlify/import set STRIPE_SECRET_KEY added-by-exe-dev

OpenAI and Resend work the same way, through OPENAI_BASE_URL and RESEND_BASE_URL; the LLM integration replaces Netlify's AI Gateway. More in the integration catalog. Secrets your own code checks, like a session secret, stay in the variables.

Make the move#

A day ahead, lower the domain's DNS TTL to 300 seconds. If it uses Netlify DNS, move its records to another DNS host first; the hand-over saved them on the VM in ~/netlify/handover/dns. Then:

node handover.mjs my-site.exe.xyz acme-widgets --move

It replaces the rehearsal's data with Netlify's newest and turns on scheduled functions. Point www.example.com at my-site.exe.xyz with a CNAME (custom domains), then:

ssh exe.dev domain add my-site www.example.com
ssh exe.dev share set-public my-site

If Netlify kept the site to your team or behind a password, run ssh exe.dev share add my-site EMAIL instead of set-public. A day later, delete the site on Netlify (its scheduled functions run until then) and your token.

Day to day#

git push exe main deploys. A failed build, or a deploy that doesn't answer, leaves the old one serving and rejects the push. On the VM:

Instead of Run
Function logs journalctl -u netlify@production -f
Variables ~/netlify/import set KEY value
Rollback ~/netlify/deploy rollback
Forms tab tail ~/site/data/forms/contact.jsonl
Database psql site

Set FORMS_EMAIL with import set to get an email per submission. Nightly backups of the data, database, and variables go to ~/backups.

The nuts and bolts#

Rehearse the move by hand

Create the VM#

On your computer:

ssh exe.dev new --name=my-site

The rest runs on the VM.

Install the kit#

mkdir -p -m 700 ~/netlify && cd ~/netlify
for f in site.mjs deploy import check backup; do
  curl -fsSLO https://exe-staging.dev/deploy/migrate-netlify/$f
done
chmod +x deploy import check backup
Script What it does
site.mjs Prepares a build and serves it, like Netlify's runtime
deploy Builds, migrates, and publishes on git push; rolls back
import Sets the VM up from the hand-over; sets variables
check Compares pages with Netlify's
backup The nightly backup
handover.mjs Runs on the owner's computer

Ask the owner to hand over the site, and wait for ~/netlify/handed-over.

Set up#

~/netlify/import setup

It installs Node.js, Postgres if the site has a database, and the services; loads the variables, data, and database; and prints a plan in ~/netlify/plan.md: secret variables, likely API keys, and what the VM doesn't do.

Build and start#

~/netlify/deploy "$(git --git-dir ~/git/site.git rev-parse "$(cat ~/netlify/branch)")"
jq .warnings ~/site/production/.exe/manifest.json

The warnings list what won't work here, like an edge function that imports from a URL. Scheduled functions stay off until the move.

Check and report#

List the important pages, redirects, and function routes in ~/netlify/paths.txt, run ~/netlify/check, and expect same for each, apart from pages with live data. If Netlify asks for a login, the site is protected; test it on the VM instead.

Write ~/netlify/report.md for the owner: what came over, the warnings, secrets to set, keys for integrations, what exe.dev doesn't do, and the steps in Make the move. No values.

Troubleshooting#

A push is rejected with "the new deploy didn't answer"

The push output ends with the server's log. Usually a function throws when it loads, a package is missing from package.json, or the netlify/server app never listens on PORT.

A push is rejected with "migration … failed"

The old deploy keeps serving. The failed migration rolled back; earlier ones in the push stay applied, as on Netlify. Fix it in a new migration and push again. Try migrations on a branch first: the branch deploy gets a fresh copy of production's database.

A form post gets a 404

Forms come from the built HTML: the form needs data-netlify="true" and a name. A form that JavaScript renders needs a hidden HTML copy, and its posts need a form-name field.

Frequently asked questions#

Do I have to change my code?

No. Functions (both the (req, context) and exports.handler forms), edge functions, a netlify/server app, Netlify.env, getStore(), getContext(), and @netlify/database work as they are. Edge functions run in Node.js, so one that imports from a URL needs an npm package; the report lists any.

Why move the API keys out of the environment?

On Netlify every function and build can read them. In exe.dev integrations the VM can use them but never read them.

Why run the hand-over myself instead of giving Shelley a Netlify token?

A personal access token can do anything your account can. The script runs on your computer, the token stays there, and the data goes straight to the VM.

How long is the site down?

Not at all: Netlify serves until your DNS change reaches visitors, and the VM is serving by then.

My site uses Next.js, Astro, SvelteKit, or Nuxt.

Static builds work as they are. If the site renders on request through a Netlify adapter, Shelley switches it to the framework's Node adapter and runs that server instead.

Can I go back?

Yes. Until your domain points at the VM, nothing on Netlify has changed; after that, point it back.

What does it cost?

Your exe.dev plan: no credits, invocations, or bandwidth to count.

Published Nov 20, 2026 · Updated Nov 19, 2026 · tested end to end Nov 19, 2026 · Markdown · manifest.json · Something wrong? Tell us