Node Version Manager (NVM) Setup Guide
Updating Node.js on a Linux based server can be painful to say the least as the process of uninstalling Node.js can be problematic and over-complicated. Node Version Manager (NVM) brings the ability for Node.js installs to be easily managed and changed on a server or per-process basis.
Table of Contents
Installing Node Version Manager
To install NVM run the below commands. Note that this guide uses Ubuntu, if on other Linux distributions, commands may need to be altered.
Update the server's package repository
sudo apt update
Install NVM
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash
Restart the terminal application to register the new commands.
Verify NVM has been installed
nvm -v
Installing a Node Version
To install a specific version of Node.js run the below commands. Most Weblutions products require v20.5.1, so that will be used in this guide.
Install a Node.js version
nvm install 24.15.0
Optionally, set this install to be the default version of Node.js used
nvm alias default 24.15.0
If using a Project Phil product, view the Project Phil Product Node Version List to check what Node version should be installed.
Comments