How to set the Node.js version

Set the Node.js version per application on TurboStack with nodejs_version in the GUI or YAML, then verify and restart the app.

Each application chooses its own Node.js major version. Set it when you deploy an app, or when you move an existing app to a newer runtime.

Before you start

  • Know which Node.js versions your app supports. Not every app runs on every version: a framework built for Node.js 20 may fail on 24, and an old app may not start on a new version at all. Where to find it:

    • Every Node.js app has a package.json file in its root folder. If it contains an engines entry, that is the developers' own statement of the versions they built and tested for:

      "engines": {
        "node": ">=20 <25"
      }

      This example means: any version from 20 up to, but not including, 25. Pick the newest version in that range that the dropdown offers.

    • If there is no engines entry, the app's release notes or system requirements page say which versions are supported. When in doubt, ask the developer who built the app.

  • Access to the application's Technologies settings, or the Source (YAML) view.
  • A staging copy to test on first, if the app is in production.

Set it in the GUI

  1. Open the host and select the application.
  2. Go to Configure application > Technologies > NodeJS.
  3. Choose the version.
The NodeJS panel on an application's Technologies tab, enabled, with the version selector that accepts a main version or a subversion
The NodeJS panel on an application's Technologies tab, enabled, with the version selector that accepts a main version or a subversion

Set it in YAML

Set nodejs_version on the application (vhost) to the major version, as a quoted string. This key on its own installs the runtime. See Configure Node.js for the full set of keys.

nodejs_version: "24"

Publish the change to apply it.

Verify and restart

Over SSH, confirm the runtime:

node -v

Then restart your application so it runs on the new version - see Keep a Node.js app running. Long-running Node processes keep using the old runtime until they are restarted.

If it did not work

node -v still showing the old version means the publish has not finished or failed - check History. It can also mean your shell was opened before the publish ran; log in again. The app still behaving as before means its process was not restarted. An app that no longer starts after the switch has a dependency that does not support the new major version. Restore the previous nodejs_version and publish. See Fixing 502, 503 and 504 errors, or contact support.