Aug 22, 2019

6 min read

How To Install NodeJS On Ubuntu 18.04 (Tutorial)

Written by

Vippy The VPS

NodeJS has quickly become an extremely popular technology for hosting dynamic applications on the internet. It allows the functionality and power of JavaScript to run as a back-end language, opening the doors to an ever-expanding world of programming options. In this tutorial, we'll show you how to install NodeJS and get started with a NodeJS App on your VPS running Ubuntu 18.04.

What is NodeJS?

NodeJS is an asynchronous, event-driven JavaScript runtime environment.

The primary benefit of using NodeJS as your back-end platform is its ability to incorporate concurrent connections without over-utilizing I/O operations, thus saving a lot of overhead in CPU power and allowing much greater scalability. Additionally, it's fully compatible with all your favorite JavaScript frameworks, libraries, and extensions, such as React, JQuery, Angular, and more.

Prerequisites for installing NodeJS on Ubuntu

This tutorial will assume the following:

  • Ubuntu 18.04 server (although desktop should still work)
  • Non-root user
  • General understanding of Command-Line tools

Let's Get Started

To begin, let's make sure the operating system is up-to-date.

sudo apt update && sudo apt upgrade -y

If you get presented with any GUI-style prompts, the defaults are fine 99% of the time.

Next, we'll want to install NodeJS. The best way to install depends on what you want to accomplish, but I'll cover two of the most common installations.

Install Using Apt

Ubuntu 18.04 apt repositories include a relatively recent version of NodeJS that can be installed using apt

Continue reading this article
by subscribing to our newsletter.
Subscribe now

A note about tutorials: We encourage our users to try out tutorials, but they aren't fully supported by our team—we can't always provide support when things go wrong. Be sure to check which OS and version it was tested with before you proceed.

If you want a fully managed experience, with dedicated support for any application you might want to run, contact us for more information.