Next.js
Deploy Next.js apps with one command. CLI picks the right runtime — pure static or OpenNext on Cloudflare Workers.
VibeHost runs Next.js without any framework-specific config from you. next build locally, vibehost deploy, done. The CLI inspects .next/ and picks one of three runtime paths.
Deploy
npm run build # or `next build`
vibehost app create my-app --runtime nextjs --json
vibehost link --app my-app
vibehost deploy --jsonThat's the whole thing. No output: 'standalone', no open-next.config.ts, no extra installs.
The three runtimes
The CLI picks one automatically by inspecting .next/ and your next.config:
Response fields worth watching
{
"ok": true,
"data": {
"url": "https://my-app.vibehost.space",
"immutableUrl": "https://<deploy-id>.vibehost.space",
"deployKind": "nextjs-opennext",
"warnings": []
}
}url— alias URL. Moves with rollbacks and promotes.immutableUrl— permanent per-deploy URL. Link to this for a specific version.deployKind— which runtime path got picked.warnings[]— non-fatal advice, e.g. "served via static fast-path because your build has no server code".
When you might want explicit control
Optional — only touch if you need them:
Pure static workflow
Set output: 'export' in next.config, then vibehost deploy ./out. Smaller uploads than letting auto-downgrade pick it up.
OpenNext overrides
Add open-next.config.ts next to package.json for advanced
overrides (custom image loader, etc.). CLI respects user config
when present.
Builder Job (gated)
vibehost deploy --build server — for constrained agents that
can't build locally. Sandboxed in gVisor. Opt-in only.
Environment variables
Server-side env vars (read at runtime, not bake-time):
vibehost env set DATABASE_URL=... --app my-app
vibehost env set NEXTAUTH_SECRET=... --app my-app
vibehost env list --app my-appNEXT_PUBLIC_* variables are baked at build time and need to be set in your build environment, not via vibehost env set.
Logs
vibehost logs --app my-appStreams Next.js ready messages, your console.logs, API route output, ISR revalidation events.
Known limits
- Next.js runtime is env-gated and AND-composed. Allowlist + master switch + per-user PostHog flag (Hard Rule #12). If
app create --runtime nextjsreturnsNEXTJS_RUNTIME_DISABLED, the workspace isn't on the allowlist yet — contact us. - Recovery while disabled is not the rollback API — rollback relaunches the runtime, which is what the gate exists for. See the OOM recovery runbook.
Migration from Vercel / Netlify
If you're moving an existing Next.js app:
- Local
next buildsucceeds → you're 90% done. VibeHost's CLI uses the same build. - Move env vars:
vibehost env setfor eachVERCEL_*/NEXT_PUBLIC_*you have on the old platform. - Custom domain:
vibehost domain add www.example.com --app my-app, then update DNS.
No framework code changes needed.