Frameworks/Deploy Next.js on your own server
Next.js

Deploy Next.js on your own server

Push a Next.js app and Deplo builds it, runs it as a Node server and puts a certificate in front of it, on a server you own.

From repo to live in three steps

  1. 01Connect the repository that holds your Next.js app.
  2. 02Deplo detects Next.js and sets the install, build and start commands and the port.
  3. 03Push to the branch: every push builds and rolls out a new version.

What Deplo sets up

  • Detected from the next dependency in package.json or a next.config file at the root.
  • Install, build and start commands chosen for you, with port 3000 already set.
  • NEXT_PUBLIC_ variables reach the build, so client values are baked in as usual.
  • HTTPS through Traefik as soon as the domain points at the server.

Detection runs on every deploy and is never stored, so a change to the project is picked up by the next push.

Next.js on Deplo

Short answers to what comes up before moving a Next.js app onto your own server.

Yes. The app runs as a Node server in its own container, so server components, route handlers and middleware behave as they do locally.

In the app's settings, per environment. They are available during the build too, and secret values are write only: nothing reads them back.

No. The new container has to pass its health check before the old one is retired.

Ten minutes from now,
it's live.

Answer three questions and pick a host, or install Deplo on a server you already have. It's free, and leaving is as easy as arriving. What you do with the money you save is your business.