
However, it does not contains the latest Node.js version. The simple and easiest way to install Node.js and npm is to install them from the Ubuntu default repository. You can do this by running the following commands: apt-get update -yĪpt-get upgrade -y Install Node.js and npm from Ubuntu Repository Additionally, replace ‘root’ with the username of the admin account if necessary.īefore starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You will need to replace ‘IP_Address‘ and ‘Port_number‘ with your server’s respective IP address and SSH port number. Log in to the Server & Update the Server OS Packagesįirst, log in to your Ubuntu 20.04 server via SSH as the root user: ssh -p Port_number Access to the root user account (or access to an admin account with root privileges).An Ubuntu 20.04 VPS (we’ll be using our SSD 2 VPS plan).

Install Node.js and npm from NodeSource.Install Node.js and npm from Ubuntu Repository.

