NEW LOCATION

Olá Brazil Brazil NVMe-powered VPS Plans in Brazil Now Available.

Deploy Instantly
  • +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
78

Free VPS Trial

No Credit Card Required.

Recent Posts

How To Extract Certificates and Private Key from .PFX file

How To Extract Certificates and Private Key from .PFX file

19 November, 2024

NetShop ISP CEO Stefano Sordini to Moderate Key Panel on Forex AI Automation at Cyprus Fintech Summit 2024

NetShop ISP CEO Stefano Sordini to Moderate Key Panel on Forex AI Automation at Cyprus Fintech Summit 2024

15 November, 2024

Preparing for the Daylight Saving Time (DST) Change: Essential Updates for MetaTrader 4/5 Platforms

Preparing for the Daylight Saving Time (DST) Change: Essential Updates for MetaTrader 4/5 Platforms

25 October, 2024

NetShop ISP Celebrates 20 Years of Innovation and Excellence in Hosting and Data Center Solutions

NetShop ISP Celebrates 20 Years of Innovation and Excellence in Hosting and Data Center Solutions

22 October, 2024

NetShop ISP Makes Waves at Forex Expo Dubai 2024: Showcasing Cutting-Edge Hosting for the Financial Services Industry

NetShop ISP Makes Waves at Forex Expo Dubai 2024: Showcasing Cutting-Edge Hosting for the Financial Services Industry

09 October, 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
Bitcoin
Tether
Ethereum
Litecoin
Wise
Revolut
Wire Transfer