Your Node.js VPS template uses Debian 12 and comes with NVM (Node Version Manager) preinstalled. NVM lets you install and switch between different Node.js versions without touching the system packages.
List available Node.js versions
Use NVM to see which versions are available:
nvm ls-remote
Scroll through the list to find the version you want to install.
Install a specific Node.js version
To install a particular version, run:
nvm install 22.5.1
You should see output similar to:
Downloading and installing node v22.5.1... Now using node v22.5.1 (npm v10.8.2) Creating default alias: default -> 22.5.1 (-> v22.5.1)
Switch between Node.js versions
To switch your active version, use:
nvm use 22.5.1
You can confirm which version is active with:
node -v
For more NVM commands and advanced usage, see the official NVM and Node.js documentation.
