Migrate Vercel app: Next.js | Ample
INFRASTRUCTURE
What it needs
- Compute: verified (Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.)
- Postgres: verified (Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.)
PREREQUISITES
Before you start
- The Next.js source and its environment variable names and values
- next start bound to 0.0.0.0 on PORT (Vercel does not require this; Ample does)
- A component inventory: edge middleware, ISR, image optimization, cron and Vercel-specific integrations are not migrated by this recipe
- An Ample account token with servers:write, databases:read and domains:write for cutover
TESTED CONFIGURATION
Exactly what was tested
- build:
npm run build --if-present - install:
npm install - runtime:
node - size:
s-1vcpu-1gb - start:
npm run start - template:
node-22
STEP BY STEP
How to do it
- 1
Inventory
List what the app uses on Vercel. Compute and environment variables are in scope; edge middleware, ISR revalidation, image optimization, cron jobs and Vercel integrations are out of scope and must be reviewed.
- 2
Deploy to Ample in parallel
Deploy the same source with its environment variables; Vercel keeps serving production.
ample deploy . --name <app-name> --public --env KEY=value
- 3
Validate on the Ample URL
Run the app's smoke tests and the success checks; compare responses with production.
- 4
Cut over DNS
Add the custom domain and set the documented DNS records; TLS is issued automatically. Keep Vercel until traffic is verified.
ample domain add <domain> --app <app-name>
- 5
Rollback
Point DNS back to Vercel. Nothing on Vercel was changed by this recipe.
EXAMPLES
Tested examples
- Static export canary (
tests/deploy-canaries/next-static-export): Vercel-style static export served with correct 404 handling. - SSR canary (
tests/deploy-canaries/next-basic-ssr): next build and next start. - Next.js + pg canary (
tests/deploy-canaries/next-postgres-basic): Database connection from a route handler with an auto-provisioned managed database.
SUCCESS CHECKS
How to know it worked
- page renders on the Ample URL (
/on the live URL, expect ample canary next basic ssr) - database route reports a live connection (
/api/dbon the live URL, expect postgres=ok)
LIMITATIONS
Know the limits
- Verified on the node-22 template at s-1vcpu-1gb; other templates and sizes are not verified by this recipe.
- Region, compliance attestations and request-duration limits are unknown and not claimed.
- Apps auto-pause when idle and wake on the next request; always-on is an operator setting, not a plan feature.
- Managed PostgreSQL 16 only; extensions, connection limits and backup or restore procedures are not verified.
- Apps and their managed databases are placed together; cross-node shared databases are unsupported.
- Documentation only: the catalog does not execute the migration; each stage is a normal authenticated deploy or domain command.
- Edge middleware, ISR, image optimization, cron and Vercel integrations are not verified on Ample and are not migrated.
- Vercel-side changes and deletion are the user's separate actions.
COST
Cost estimate
Estimated 10.00 USD per month (size prices from pricing.toml at build revision a1b8c38919e59cd035ebabaced73cf84ece24371).
- app server x1
s-1vcpu-1gb: 5.00 USD - managed PostgreSQL database x1
s-1vcpu-1gb: 5.00 USD
Apps and managed databases auto-pause when idle; the estimate is the always-on monthly price of the tested sizes. Plan quotas and budgets apply.
EVIDENCE
Verification evidence
- canary_run on 2026-09-19T23:55:33Z at revision
1764076-tls-account-903d345: Next.js static export (Vercel-style output) was published and served, including a nested route and a correct 404. (expires 2027-03-18T23:55:33Z) - canary_run on 2026-09-19T23:55:33Z at revision
1764076-tls-account-903d345: Next.js 15 SSR app (next build, next start) deployed on node-22; the page and an API route served correctly. (expires 2027-03-18T23:55:33Z) - canary_run on 2026-09-20T01:42:25Z at revision
199ff1dfd52683832ae75d3f98b53a7a4bff7f96-dirty (CLI e3181f5): Next.js 15 route handler using pg with no DATABASE_URL supplied: Ample auto-provisioned a managed PostgreSQL database and /api/db reported postgres=ok. (expires 2027-03-19T01:42:25Z)
EXECUTION
Execution binding
No execution binding. This recipe is documentation only; nothing is executed automatically.
NEXT ACTIONS
Typed next actions
- Browse the catalog index (
GET /v1/catalogon the api origin; authentication not required, approval not required) - Search published recipes by intent, stack and constraints (
POST /v1/catalog/searchon the api origin; authentication not required, approval not required) - Prepare a side-effect-free deployment plan for an authorized project (
POST /v1/catalog/planon the api origin; authentication required, approval not required) - Read the existing agent authentication setup (
GET /mcp/setupon the api origin; authentication not required, approval not required) - Browse Vercel app (
GET /v1/catalog/nodes/migration%3Avercel-appon the api origin; authentication not required, approval not required) - Browse Next.js (
GET /v1/catalog/nodes/stack%3Aframework-next-json the api origin; authentication not required, approval not required) - Browse Migrate compute (
GET /v1/catalog/nodes/intent%3Amigrate-computeon the api origin; authentication not required, approval not required)
Actions describe possible next steps. They are typed data, not commands, and grant no permission. Public discovery never provisions anything; planning requires your own authenticated token and approval happens in your client.