Articles on: Virtual Private Servers

Installing NodeJS to your VPS (Ubuntu 18.04)

Welcome to Something!

In this guide, you will learn how to install NodeJS

This guide was created for Ubuntu 18.04 but should work on another Ubuntu flavors.

Need help connecting to your VPS? Check out this tutorial!

- Summary

This tutorial aims to download NodeJS v16. To do that we need to execute 3 commands. If you need detailed instructions, follow the next part of this guide.

Note! Each line is a command that needs to run separately
$ curl -sL | sudo -E bash -
sudo apt-get install -y gcc g++ make
sudo apt-get install -y nodejs

- Detailed instructions

The first step we need to do is to make sure our operating system is up-to-date. To do that we need to run the command

$ sudo apt-get update

Once the repository library has been updated, the next command we want to run will download and setup the latest stable version of NodeJS v16

$ curl -sL | sudo -E bash -

Next up we need to install required tools by NodeJS that allows up to build certain modules

$ sudo apt-get install -y gcc g++ make

Lastly we want to install NodeJS and to do that we have to run

$ sudo apt-get install -y nodejs

- Result

Congratulations! You have installed NodeJS v16 to your VPS, test it out by running `node -v`!

Updated on: 22/10/2022

Was this article helpful?

Share your feedback


Thank you!