UPCOMING EVENT

Let's Meet during iFX EXPO International 2024 in Limassol, Cyprus (18-20 June)

Book a Meeting
  • +357 2425 0808
  • Login
  • English

Home

Blog

How to Install NodeJS (any version) on U...

How to Install NodeJS (any version) on Ubuntu 22.04 Server

How to Install NodeJS (any version) on Ubuntu 22.04 Server

NetShop ISP

NetShop ISP · Blog Author

Jan 03, 2024 · Technical Tutorials

In two previous articles we demonstrated how to install nodejs on Debian 11 and also the steps to install Nodejs on a cPanel server.

As the Ubuntu 22.04 is LTS (long-term support release) more and more developers and sysadmins use it for hosting NodeJS applications. In this article we will show the steps to install any version of NodeJS on Ubuntu 22.04 server.

NodeJS Release Versions

Node.js versions enter Current release status for six months, which gives library authors time to add support for them. Here is the release schedule as per Nodejs official website.

NodeJS Release Schedule

In the following table you can check the latest release of each version branch. This is useful in cases you wish to use a stable yet not latest release version of NodeJS on your server.

NodeJS Stable Release per Branch Table

Steps to Install specific NodeJS version on Ubuntu 22.04 Server

The following steps are provided for installing NodeJS v18. You can use the same steps to install any other version, just by adjusting Step 3.

All commands below assume you are logged in to the server with root account. If you are using any other sudo privileged account, then prepend ‘sudo’ in all commands.

Step 1: Update & Upgrade System

Update your Ubuntu 22.04 system by running the following command:

root@netshopisp-nodejs:~$ apt update -y && apt upgrade -y

During the upgrade execution, you will be prompted with a window informing you about the kernel upgrade as shown below. Press “OK” to continue.

Ubuntu 22.04 Kernel Update Prompt Window

Then, you will be prompted to choose the daemon services to be restarted. You can stick to the default selected ones and press “OK” to continue.

Ubuntu 22.04 Upgrade – Daemons Restart Confirmation Window

Step 2: Reboot System

As the system’s kernel got updated, a reboot is necessary. Execute the following command to restart your server.

root@netshopisp-nodejs:~$ reboot

Step 3: Install specific NodeJS version from NodeSource

The NodeSource repository provides up-to-date releases of Node.js to ensure easy access to the latest features, bug fixes, and security updates related to Node.js.

The following command will pull the NodeSource repository for NodeJS v18 and NPM v10:

root@netshopisp-nodejs:~$ curl -fsSL https://deb.nodesource.com/setup_18.x | -E bash -

Sample Output:

NodeSource Repository Add Sample Output

Step 4: Install NodeJS v18

Now you are ready run the following command to install NodeJS v18 on the server:

root@netshopisp-nodejs:~$ apt-get install nodejs -y

Sample Output:

NodeJS v18 installation Sample Output

You have successfully installed NodeJS v18 on Ubuntu 22.04 Server. You can verify the nodejs and npm versions using the following commands:

root@netshopisp-nodejs:~$ node -v && npm -v

You can now proceed with configuring your NodeJS application on the server!

Press Releases
74

Free VPS Trial

No Credit Card Required.

Recent Posts

MT5 Access Server for Forex Brokers: Virtual vs. Dedicated

MT5 Access Server for Forex Brokers: Virtual vs. Dedicated

14 June, 2024

How To Extend Root Partition using Home Partition space in CentOS

How To Extend Root Partition using Home Partition space in CentOS

30 May, 2024

NetShop ISP to Attend iFX EXPO International 2024 and Announce Global Infrastructure Expansion

NetShop ISP to Attend iFX EXPO International 2024 and Announce Global Infrastructure Expansion

23 May, 2024

TNFX Broker Partners with NetShop ISP to Offer Low-Latency Forex VPS to Traders

TNFX Broker Partners with NetShop ISP to Offer Low-Latency Forex VPS to Traders

14 May, 2024

How to Install Nginx, MySQL, PHP on Ubuntu 22.04 (LEMP)

How to Install Nginx, MySQL, PHP on Ubuntu 22.04 (LEMP)

10 May, 2024

#letushostyou

Award Winning Hosting Provider established in 2004.

120 Faneromenis Avenue, Imperial Tower, 2nd Floor, Larnaca 6031, Cyprus

Products

Bare Metal Servers

Customized Servers

Virtual / Cloud Servers

Forex VPS

Storage VPS

cPanel Web Hosting

Reseller Web Hosting

Colocation

Addons

Premium DNS

Email Hosting

Cloud Backup

DDoS Protection

Licenses

SSL Certificates

Domain Names

Premium SLAs

About Us

Data Center Locations

Looking Glass

Our Company

Contact Us

Careers in Cyprus

Become a Partner

Awards

Certifications

© 2024 S.S. NetShop Internet Services Ltd. All rights reserved.  Terms & Conditions  |  Privacy Policy
CY Reg. Number: HE 217340 | EU VAT Number: CY10217340J

Visa
Mastercard
PayPal
Revolut
Wire Transfer