# Setting Your Node.js Version


| Current default Node.js version |
| --- |
| *`22.22.0`* Services created before *2026-01-14* have a different default version. [See below.](#history-of-default-nodejs-versions) |

*Set a different Node.js version in _any_ of the following ways* (in descending order of precedence):

1. Set the `NODE_VERSION` environment variable for your service in the [Render Dashboard](https://un5n629cp2hz4k6grf1w5d8.julianrbryant.com):

   [image: Setting the NODE_VERSION environment variable]

2. Add a file named `.node-version` to the root of your repo. This file contains a single line with the version to use:

   ```:.node-version
   20.18.0
   ```

3. Add a file named `.nvmrc` to the root of your repo. This file uses the same format as `.node-version`.

4. Specify a Node.js version range in your `package.json` file, under the [`engines`](https://un5n6892w35v8u4k3jad7d8.julianrbryant.com/cli/v10/configuring-npm/package-json#engines) property:

   ```json:package.json
   "engines": {
     "node": ">=20.0.0 <22.0.0"
   }
   ```

   If there isn't a `package.json` file in your repo's root directory, Render uses the first `package.json` file it finds in a subdirectory.

> *Always include an upper bound in your version range.*
>
>    An unbounded range (such as `>=20`) always resolves to the [`latest` release](https://un5zrke0g2qx6zm5.julianrbryant.com/download/release/latest/) of Node.js, which increments its major version over time. This might result in unexpected behavior or incompatibilities with your development version.

You can specify either a semantic version number (such as `18.18.0`) or an alias (such as `lts`).

> Render uses the [`node-version-alias`](https://github.com/ehmicky/node-version-alias) module to resolve version aliases and [semver](https://un5h82ptgj7rc.julianrbryant.com) ranges.

## History of default Node.js versions

If you don't set a Node.js version for your service, Render's default version depends on when you originally created the service:

| Service Creation Date | Default Node.js Version |
|---|---|
| 2026-01-14 and later | `22.22.0` |
| 2025-06-12 | `22.16.0` |
| 2024-12-16 | `22.12.0` |
| 2024-11-24 | `22.11.0` |
| 2024-10-30 | `22.10.0` |
| 2024-07-09 | `20.15.1` |
| 2024-04-17 | `20.12.2` |
| 2024-04-04 | `20.12.1` |
| 2024-03-27 | `20.12.0` |
| 2024-02-23 | `20.11.1` |
| 2023-11-29 | `20.10.0` |
| Before 2023-11-01 | `14.17.0` |
