DropVPS Team
Writer: Cooper Reagan
How to Install Node.js on CentOS 8

Table of Contents
What you will read?
Node.js is a lightweight, high-performance runtime that lets developers run JavaScript outside the browser. It’s widely used for modern web applications, APIs, and scalable backend systems. On CentOS 8, you can install Node.js quickly using either the NodeSource repository or the default CentOS modules.
Step 1: Update System Packages
Keep your system up to date before installing Node.js:
sudo dnf update -y
Step 2: Enable Node.js Module
CentOS 8 comes with Node.js modules in its repositories. You can check available versions:
sudo dnf module list nodejs
Enable the version you want, for example Node.js 20:
sudo dnf module enable nodejs:20 -y
Step 3: Install Node.js
Now install Node.js along with npm (Node Package Manager):
sudo dnf install nodejs -y
Step 4: Verify Installation
Check that Node.js and npm are installed properly:
node -v
npm -v
If version numbers appear, the installation was successful.
Step 5: Install Development Tools (Optional)
Some npm packages require compiling native modules. To prevent build errors, install development tools:
sudo dnf groupinstall "Development Tools" -y
Node.js and npm are now installed and configured on CentOS 8. Your server is ready to run scalable JavaScript applications, APIs, and backend services efficiently.