How to Install NodeJS on AlmaLinux 10

NodeJS is a powerful JavaScript runtime commonly used to build scalable, real-time applications. It runs on the server side and is especially useful for event-driven, non-blocking I/O models.

Before proceeding with the installation, make sure your system is up to date.

Update the system

dnf update -y

Install curl (if not already)

dnf install -y curl

Add NodeSource repo for Node.js 20 (LTS)

curl -fsSL https://rpm.nodesource.com/setup_20.x | bash -

Install Node.js

dnf install -y nodejs

Output:

Installed:
  nodejs-2:20.19.2-1nodesource.x86_64

Verify installation

node -v
npm -v

Output:

[root@server ~]# ^C
[root@server ~]# node -v
v20.19.2
[root@server ~]# npm -v
10.8.2

CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS