Hosting

Next.js Hosting on Node.js with Git Deploy

Host Next.js 16 on VeloxaHost as a Node.js server with next start, or as a static export. Node.js 22, Git deploys, a CI webhook and free HTTPS.

Next.js can run on VeloxaHost two ways. As a Node.js server, with next build and next start, it supports every Next.js feature, which is what the Next.js docs say of any Node.js deployment. As a static export, it is plain HTML, CSS and JavaScript on a Static site, with the features that need a server left out. Pick by what your app uses.

A Node.js site is its own container with Node.js 22, which meets Next.js 16's minimum of Node.js 20.9. Your app runs as the veloxa-app system service, and the site's web server answers on your domain with a free Let's Encrypt certificate and forwards requests to port 3000, where next start listens by default.

Deploy from Git

As a Node.js server

A deploy installs dependencies and restarts the app, but does not run npm run build. So let npm build before it starts. In package.json:

{
  "scripts": {
    "build": "next build",
    "prestart": "next build",
    "start": "next start"
  }
}

npm runs prestart before npm start, so every restart, and therefore every deploy, builds first. The deploy runs a plain npm ci, so the devDependencies a build needs are installed.

  1. In the console, open Websites and click Add Website.

  2. Enter your domain and pick Node.js under Hosting type. Leave Start Command empty; the default is npm start.

  3. Click Create Website and add the DNS records shown under DNS — point your domain here. HTTPS is issued once they resolve.

  4. Set your environment variables before the first deploy. Open the console (Advanced > Open Console) and run systemctl edit veloxa-app:

    [Service]
    Environment=NODE_ENV=production
    Environment=NEXT_PUBLIC_API_URL=https://api.example.com
    

    The build runs inside the service, so NEXT_PUBLIC_ values are present at build time, when Next.js inlines them.

  5. In the Deploy from Git card, click Deploy, enter the Repository URL (https), the Branch and, for a monorepo, the Subdirectory of the app. Pick Auto-deploy: Manual / webhook only, Every hour or Every day.

  6. Click Deploy Now. The deploy clones the branch, replaces /opt/app while keeping node_modules, runs npm ci (or npm install without a lockfile) and restarts the app, which then builds and starts. The build takes a minute or more, so the site answers once it finishes.

  7. To deploy on each push, call the CI Webhook URL from your CI after tests: curl -fsS -X POST "$VELOXAHOST_DEPLOY_HOOK".

As a static export

If the app needs no server at run time, set output: 'export' and trailingSlash: true in next.config.js, so each route builds to route/index.html. next build writes the site to out/. Create a site with the Static hosting type, build in CI, and deploy the output with Subdirectory set to out; the Astro hosting page shows a CI workflow that does this. A static export leaves out Server Actions, cookies, rewrites, redirects, headers, ISR, and image optimization with the default loader.

Supported versions

Component Version
Node.js 22, from NodeSource's 22.x repository
Next.js 16, which needs Node.js 20.9 or newer

Node.js 22 is the only version a Node.js site sets up, and is in maintenance LTS until April 2027.

Which plan fits

next build is the heavy part. With the build running on the site, pick Grow ($12.99/month: 2 vCPU, 4 GB RAM, 10 websites); 1 GB of RAM on Launch ($6.99/month) is tight for building most Next.js apps. Launch suits a static export. Disk matters too: node_modules and .next count against the site's 5 GB on Launch and Grow, or 2 GB on Scale and Business. Each site can use up to its plan's RAM and vCPU. Yearly billing is ten times the monthly price. Compare on pricing.

Limits and when to use a VPS

  • The build runs on every restart, including after a crash. If your build is slow or memory hungry, a VPS lets you build once and run the output, for example with output: 'standalone'.
  • One process. Background jobs and queues need their own process; run them on a VPS, or start from the Node.js (Docker) app.
  • No database. Use one on a VPS, such as PostgreSQL, or a headless CMS like Strapi.
  • Cache on disk. ISR and the image cache live in .next, which each deploy removes, so the cache starts empty after a deploy.
  • Long-lived connections are closed after five idle minutes.
  • Public repositories only, and the dependency install must finish within five minutes.

For a plain Node.js API, see Express hosting; for the runtime details, see Node.js hosting.

FAQ

Does VeloxaHost run the Next.js build for me?

Not as part of the deploy. Add "prestart": "next build" to package.json and npm builds before every start, which includes every deploy.

Which port does Next.js use?

next start listens on 3000 by default and reads the PORT variable, which the site sets to 3000. Do not set another port.

Do Server Actions and Proxy (middleware) work?

On a Node.js site, yes: next start is a full Next.js server. On a Static site they do not, because a static export has no server.

Can I use the App Router and the Pages Router?

Both. They are part of the same Next.js server.

My build runs out of memory. What now?

Move to a plan with more RAM, such as Grow, or build in CI and serve a static export. For a large app, a VPS lets you build and run on separate steps.

Next.js sites run on any managed hosting plan, from Launch at $6.99/month. Framework facts were checked on 2026-10-18 against: nextjs.org/docs/app/getting-started/deploying, nextjs.org/docs/app/getting-started/installation, nextjs.org/docs/app/api-reference/cli/next, nextjs.org/docs/app/guides/static-exports, github.com/nodejs/Release, registry.npmjs.org/next/latest.

Ready to deploy?

Start a free trial, or compare plans to match your team's scale.