Guide · Next.js

Deploy Next.js on zeroconfig

Next.js runs on zeroconfig in two ways: as a static export on any plan, or as a full Next.js server on an app server, with server rendering, API routes, middleware, ISR, server actions and image optimization. You don't write a Dockerfile for either.

Where things stand

  • Static export: available on every plan.
  • Full Next.js: available on app servers (add-on, set up by our team after you order, usually within one business day).
  • Tested with Next.js 14, 15 and 16, the App Router and the Pages Router, with npm and pnpm, on Node.js 22 and 24.

Static export or full Next.js?

zeroconfig reads your next.config to decide. Your config file is never changed.

Static export compared with full Next.js on an app server
Static exportFull Next.js
Whenoutput: 'export' in next.configAnything else: no output, or output: 'standalone'
Runs asStatic files from the out folderA Node.js server on your app server
Server rendering, API routes, middleware, ISR, server actionsNoYes
next/imageWith images: { unoptimized: true } or your own loaderOptimized on the server (WebP)
CostIncluded in every planYour plan plus an app server add-on

If your pages don't need the server, the static export is the cheaper option. Not sure? Ask your assistant to check the project, or use the free infrastructure analysis with your GitHub repository: both tell you which one your app needs.

How do I deploy Next.js with my AI assistant?

  1. Connect your assistant once. See Integrations for Claude, ChatGPT, Cursor and others.
  2. Ask it: "Deploy this Next.js app to zeroconfig."
  3. The assistant checks the project first. A static export is built in our build sandbox and goes live. A full Next.js app goes to a new app on your app server; if you don't have a free app server yet, the assistant tells you to add one.
  4. It asks you to confirm before anything goes live, then gives you the address, for example my-app.zeroconfig.cloud.

How do I deploy Next.js from GitHub?

  • Connect GitHub: open your app in the dashboard, choose Deploy from GitHub, pick the repository and branch. Every push rebuilds and redeploys, with a status check on the commit. For a full Next.js app, connect the repository to an app on your app server. See Deploy from GitHub.
  • Deploy button: a Deploy with zeroconfig link with your public repository creates the app for whoever clicks it: a static app for a static export, or an app on their app server for a full Next.js app.

If a full Next.js repository is connected to a static app, the deploy stops with a message that the app needs an app server, or that you can switch to output: 'export'. Nothing that was live changes.

How do I deploy Next.js with an upload?

Zip the project folder without node_modules and .next, and include your lockfile. For a full Next.js app, create the app on your app server once, then upload:

# Create the app on your app server (once)
curl -X POST https://api.zeroconfig.cloud/v1/apps \
  -H "authorization: Bearer $ZEROCONFIG_TOKEN" \
  -H "content-type: application/json" \
  -d '{"name":"my-next-app","runtime":"container","size":"small"}'

# Upload the source; zeroconfig builds and starts it
curl -X POST https://api.zeroconfig.cloud/v1/apps/my-next-app/deployments \
  -H "authorization: Bearer $ZEROCONFIG_TOKEN" \
  -H "content-type: application/zip" --data-binary @my-next-app.zip

For a static export, create the app with "runtime":"static" and send the zip to /v1/apps/my-next-app/builds instead: we run next build in the build sandbox and publish the out folder. More in the API documentation.

What happens when a full Next.js app is built?

  • We install your dependencies from your lockfile (package-lock.json or pnpm-lock.yaml) and run your build script.
  • The app is built as a standalone Next.js server. If your next.config doesn't set output, we set output: 'standalone' for the build only, through the hook Next.js provides for hosting platforms. Your files are not changed, and the build log says so.
  • The Node.js version comes from .nvmrc, .node-version or engines.node in package.json (20, 22, 24 or 26; 24 by default).
  • The server runs as a non-root user, listens on port 8080, and has Next.js telemetry turned off. sharp is installed for image optimization.
  • Before switching traffic, we check that your home page answers. If it returns a server error, the new version doesn't go live and the previous one keeps running.
  • You can download the generated Dockerfile from the build to customize it. A Dockerfile in your project is always used as it is.

In our tests, a small Next.js app built in under a minute, gave a container image of about 95 MB, answered its first request within 2 seconds of starting, and used about 50 MB of memory on a Small app server.

What's supported on an app server?

  • Server-side rendering: server components and dynamic pages in the App Router, getServerSideProps in the Pages Router.
  • API routes: route handlers (app/api/…/route.js) and Pages Router API routes.
  • Middleware: middleware.js and proxy.js (its Next.js 16 name), including redirects and headers.
  • Server actions, including forms that work without JavaScript.
  • ISR (revalidate): pages are regenerated on your app server. The cache lives in that server and starts empty after each deploy.
  • next/image optimization, with optimized images cached on the server, and long-term caching for files under /_next/static.
  • Environment variables from your app's settings, available to server code at runtime, plus DATABASE_URL and REDIS_URL when you add managed Postgres or Redis.

What isn't supported?

  • Vercel-only services: Vercel KV, Edge Config, Vercel Analytics and Speed Insights, Vercel Cron (vercel.json) and Vercel's image CDN. Use managed Postgres or Redis, or your own providers, instead.
  • Edge deployment: code that uses the edge runtime runs inside your Node.js server, not on a global edge network. Cloudflare-specific APIs and bindings in edge code aren't available.
  • More than one instance per app: each app runs on one app server, so the ISR and image cache are not shared or kept across deploys. If you need that, configure a Next.js cacheHandler, for example with Redis.
  • Variables at build time: builds don't receive your app's environment variables, so NEXT_PUBLIC_ values that Next.js puts into browser code during the build are empty. Put non-secret public values in your code or next.config.
  • Preview deployments for pull requests.

Frequently asked questions

Do I need a Dockerfile to deploy Next.js?

No. zeroconfig detects Next.js and builds it as a standalone server for you. If you add your own Dockerfile, it is used as it is.

Can I host Next.js on zeroconfig without an app server?

Yes, as a static export: set output: 'export' in next.config, and the site is built and served as static files on any plan. Server rendering, API routes, middleware, ISR, server actions and image optimization need an app server.

Does zeroconfig change my next.config?

No. If your config doesn't set output, zeroconfig sets output: 'standalone' for the build only, through the hook Next.js provides for hosting platforms, and says so in the build log.

Which Next.js versions work?

We tested Next.js 14, 15 and 16 with the App Router and the Pages Router. Next.js 15.5 and newer are built as a standalone server; older versions run with next start.

Does ISR work?

Yes, on an app server. Regenerated pages are stored in that server, so the cache starts empty after each deploy and isn't shared with other servers.

Can I use Vercel KV, Edge Config or Vercel Analytics?

No, those are Vercel services. Use managed Postgres or Redis on zeroconfig, or another provider, through environment variables.

Put your Next.js app online

Create your account and deploy from your assistant, GitHub or an upload.