AlmaLinux

Install Node.js 24 or 22 LTS on Rocky Linux 10 / AlmaLinux 10

Run sudo dnf install nodejs on Rocky Linux 10 and you get Node.js 22, not 24. AppStream keeps the plain nodejs package on the 22 line and ships nodejs24 and nodejs26 as separate packages beside it, so the version you end up with depends on the name you type and on which repository wins.

Original content from computingforgeeks.com - post 164324

This guide installs both LTS lines on Rocky Linux 10 and AlmaLinux 10. It covers Node.js 24 from AppStream or NodeSource, Node.js 22 for apps that are not ready to move, NVM for side-by-side versions, and the fix for the package conflict that breaks a switch between them. We finish with an Express app under systemd, SELinux enforcing.

For a server, the NodeSource 24.x repository is what we’d run. Every command below was run on Rocky Linux 10.2 and AlmaLinux 10.3 in November 2026.

Pick a Node.js Line and a Source

Node 24 left Active LTS on 20 October 2026 and is now in Maintenance LTS, the same phase Node 22 has been in for a year. Both still get security fixes, so the choice comes down to how long you need support and whether your dependencies have caught up. The dates below come from the Node.js release schedule.

LineCodenameStatus in November 2026End of lifeAppStream packageNodeSource script
Node.js 22JodMaintenance LTS30 April 2027nodejssetup_22.x
Node.js 24KryptonMaintenance LTS30 April 2028nodejs24setup_24.x
Node.js 26LithiumActive LTS30 April 2029nodejs26setup_26.x

New projects should start on 24 at the very least, because 22 runs out of support in April 2027 and you would be migrating again within months. Node 20 reached end of life in April 2026, so do not put it on a fresh server either. We would only stay on 22 when something outside your control pins it.

  • a framework release that has not certified 24
  • a native addon with no 24 build
  • a vendor base image or SDK fixed to 22

Two sources give you a system-wide Node.js, and they behave differently enough to matter. AppStream is built by Rocky and AlmaLinux and needs no third-party repository, but its nodejs24 package installs a binary called node-24 rather than node, which breaks scripts and unit files that expect the usual name. NodeSource builds each line from upstream, installs a normal node and tracks point releases closely. In our run it was two patch releases ahead of AppStream on the 24 line, so security fixes reach you sooner.

Check What AppStream Offers

Older guides tell you to enable a dnf module stream for Node.js. That is how RHEL 8 and 9 shipped several versions side by side, and it does not exist on EL10. Query it anyway so you recognise the error when an old script runs it.

dnf module list nodejs

dnf prints a deprecation warning, refreshes the repository metadata and finds nothing.

WARNING: modularity is deprecated, and functionality will be removed in a future release of DNF5.
Rocky Linux 10 - BaseOS                          14 MB/s | 3.3 MB     00:00
Rocky Linux 10 - AppStream                       10 MB/s | 2.5 MB     00:00
Rocky Linux 10 - Extras                          59 kB/s | 6.1 kB     00:00
Error: No matching Modules to list

AlmaLinux 10 returns the same error. On EL10 each Node.js line is its own package name instead, so listing everything that starts with nodejs shows the whole menu in one go.

dnf list --available 'nodejs*'

The unversioned nodejs package is the 22 line, and the two newer lines sit next to it with their own subpackages.

dnf module list nodejs error and dnf list available nodejs packages on Rocky Linux 10 showing nodejs, nodejs24 and nodejs26

Every line comes as the same set of packages, with the line number in the name for 24 and 26.

  • nodejs, nodejs24, nodejs26: the runtime
  • -npm: npm and npx for that line
  • -devel: headers for native addons
  • -libs, -docs, -full-i18n: pulled in as dependencies

npm comes from the -npm subpackage of whichever line you install, and dnf pulls it in as a weak dependency, so you rarely need to name it yourself. The name npm is only a virtual provide of the 22 line’s nodejs-npm, which is why dnf install nodejs npm works while rpm -q npm reports “package npm is not installed”. The EL10 package spec only adds that provide to the default 22 line, so on a nodejs24 box use nodejs24-npm by name rather than dnf install npm.

Install Node.js 24 from NodeSource

We recommend this route for servers. NodeSource’s setup script adds two repositories, nodesource-nodejs and nodesource-nsolid, and the first install imports its signing key. Run it on a server with no AppStream Node.js installed yet, because an existing AppStream package blocks the install (the switching section explains why).

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

The script ends by telling you which package to install next.

2026-11-23 07:14:26 - Added N|Solid repository for LTS version: 24.x
2026-11-23 07:14:26 - dnf available, updating...
Metadata cache created.
Metadata cache created.
2026-11-23 07:14:27 - Repository is configured and updated.
2026-11-23 07:14:27 - You can use N|solid Runtime as a node.js alternative
2026-11-23 07:14:27 - To install N|solid Runtime, run: dnf install nsolid -y
2026-11-23 07:14:27 - Run 'dnf install nodejs -y' to complete the installation.

Install the runtime. npm and npx are bundled inside the NodeSource package, so there is no separate npm package to add.

sudo dnf install -y nodejs

Check the runtime, npm, the V8 engine and the module ABI. The ABI number matters later, because a native addon compiled for one line refuses to load on another.

node -v
npm -v
rpm -q nodejs
node -e "console.log('Platform:', process.platform, process.arch); console.log('V8:', process.versions.v8)"
node -p process.versions.modules
node -p process.release.lts

NodeSource’s package carries epoch 2, which is higher than AppStream’s epoch 1.

Node.js 24 from NodeSource on Rocky Linux 10 showing node, npm, V8, ABI 137 and Krypton LTS codename

ABI 137 and the codename Krypton confirm the 24 line. dnf compares epoch before version, so even if AppStream ever rebuilds the same point release first, an update will not swap your NodeSource build for it. If dnf install fails with “cannot install both” instead, an AppStream nodejs is already on the box and the switching section has the fix. Our AlmaLinux 10 server ended on the same NodeSource build after moving up from the 22 repository.

Install Node.js 24 from AppStream

If your policy rules out third-party repositories, AppStream’s nodejs24 is the supported alternative. The catch is the binary name, and it catches people writing systemd units and shell scripts.

sudo dnf install -y nodejs24

Look at what the package actually puts in /usr/bin before you try to run anything.

rpm -ql nodejs24 | grep bin/
rpm -ql nodejs24-npm | grep bin/
node -v
node-24 -v
npm-24 -v

Only the suffixed names exist, and the plain node is not found.

AppStream nodejs24 on Rocky Linux 10 installs only node-24, npm-24 and npx-24 with node command not found

No alternatives entry exists either, so sudo alternatives --set node /usr/bin/node-24 fails with “cannot access /var/lib/alternatives/node”. Call node-24 and npm-24 directly and put ExecStart=/usr/bin/node-24 in your units. Be careful if you later install the plain nodejs package as well, because /usr/bin/node then becomes a symlink to node-22. Every unit that says /usr/bin/node would quietly run 22 from that moment, with nothing in the logs to tell you.

Install Node.js 22 Instead

Some stacks still need the 22 line, and EL10 gives you two clean ways to get it. Both install a plain node command. AppStream is the lighter choice for a box that only runs one app, while NodeSource keeps you closer to upstream patches and lets you roll back to an older 22 build. This section replaces our Node.js 22 on Rocky Linux 10 guide, retested on the current point releases.

From AppStream

AppStream is the shortest path to a working Node.js on EL10 and needs nothing outside the base repositories. Expect it to pull in libuv and the openssl CLI. On our image it also upgraded openssl-libs, because nodejs-libs needs a newer build than the image shipped, so run it with your other package updates on a production host.

sudo dnf install -y nodejs

Confirm the line and the ABI, and check which npm package came with it.

node -v
npm -v
rpm -q nodejs nodejs-libs nodejs-npm npm
node -p process.versions.modules
node -p process.versions.v8
node -p process.release.lts

The codename Jod and ABI 127 identify Node 22.

AppStream Node.js 22 on Rocky Linux 10 with npm 10, nodejs-npm package, ABI 127 and Jod LTS codename

AlmaLinux 10.3 installed the identical nodejs build, pulling AlmaLinux’s own OpenSSL build alongside it. A version string only proves the binary starts, so we also served a request from it. Save a tiny HTTP server as /tmp/server.js.

vim /tmp/server.js

Paste these four lines and save the file.

const http = require("http");
http.createServer((req, res) => {
  res.end("Node.js 22 is working on Rocky Linux 10\n");
}).listen(3000, () => console.log("Listening on 3000"));

Start it detached from the shell and hit it with curl.

setsid nohup node /tmp/server.js </dev/null >/tmp/srv.log 2>&1 &
curl -s http://localhost:3000

The response comes straight back.

Node.js 22 is working on Rocky Linux 10

Stop the test server before you move on, because the Express app later in this guide wants port 3000.

pkill -f /tmp/server.js

That is everything the 22 line needs from AppStream, and it is a fair choice for a single internal app. Updates arrive through the normal dnf upgrade cycle, but they land when the distro rebuilds them, so you trail upstream point releases by a little. If you need a specific 22 build or faster patches, use NodeSource below instead.

From NodeSource

NodeSource’s 22.x repository follows upstream point releases. On a clean server it is the same two commands as the 24 install with a different script. If NodeSource 24 is already installed, remove it and its repository files first. The installed 24 build is newer than every 22 build, so dnf install nodejs would report it as already installed and change nothing.

sudo dnf remove -y nodejs
sudo rm -f /etc/yum.repos.d/nodesource*.repo
sudo dnf clean all
curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash -
sudo dnf install -y nodejs

List every nodejs build dnf can see now. This tells you which repository wins and which older 22 builds remain available.

node -v
rpm -q nodejs
dnf --showduplicates list nodejs

AppStream’s build shows up at epoch 1 alongside every NodeSource 22 release at epoch 2.

NodeSource Node.js 22 on Rocky Linux 10 with dnf showduplicates listing AppStream epoch 1 and NodeSource epoch 2 builds

The installed build is the newest epoch 2 package, and the AppStream one sits unused below it. Because the epoch is higher, a routine dnf upgrade never drifts back to AppStream, and every older 22 release stays listed if a regression forces a downgrade. AlmaLinux 10.3 gave the same NodeSource 22 build and the same npm.

Switch Between Node.js 22 and 24

Moving up from NodeSource 22 to NodeSource 24 is easy. Remove the repository file, run the 24 setup script and run dnf install -y nodejs again. Going down needs the dnf remove first, as shown above. On AlmaLinux that upgraded 22 straight to 24, printing only a harmless “remove failed” warning for one npm doc file. Moving from AppStream’s 22 to NodeSource’s 24 is where it breaks, and it breaks in a way that looks fixable when it is not.

With AppStream nodejs installed, both dnf install -y nodejs and dnf upgrade -y nodejs refuse after the NodeSource 24 script runs. The resolver reports that AppStream’s nodejs-npm needs the exact 22 runtime it shipped with.

  - package nodejs-npm-1:10.9.9-1.22.23.4.1.el10_2.x86_64 from @System requires nodejs = 1:22.23.4-1.el10_2, but none of the providers can be installed
  - cannot install both nodejs-2:24.22.3-1nodesource.x86_64 from nodesource-nodejs and nodejs-1:22.23.4-1.el10_2.x86_64 from @System
  - package nsolid-24.22.3-ns6.3.10.x86_64 from nodesource-nsolid conflicts with nodejs provided by nodejs-2:24.22.3-1nodesource.x86_64 from nodesource-nodejs
  - cannot install the best candidate for the job

The obvious next move is --allowerasing. It plans to remove two AppStream packages and upgrade two others, then dies at the transaction test on file conflicts.

dnf install nodejs --allowerasing failing with Transaction test error file conflicts between NodeSource nodejs and AppStream nodejs-npm on Rocky Linux 10

Nothing changed, and node -v still reports the 22 build. AppStream and NodeSource both own files under /usr/lib/node_modules, and rpm will not let one package overwrite another package’s files in the same transaction. So the only clean route is two transactions, removing every AppStream Node.js package first and then installing from NodeSource.

sudo dnf remove -y nodejs nodejs-npm nodejs-libs npm
sudo dnf install -y nodejs

The remove also clears the docs, i18n and libuv packages, and the install then brings in the single NodeSource package.

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

Complete!

AppStream’s nodejs24 hits the same wall. With it and the 22 nodejs package both installed, the NodeSource script followed by dnf install failed with the identical “cannot install both” problem. Remove the nodejs24* packages as well before you switch sources, and stop the app’s service first so nothing is running from the files you are pulling out.

Run 22 and 24 Side by Side with NVM

NVM is for developer workstations and CI runners that need several lines at once. It installs into your home directory with no root and no RPM, so it never fights with dnf. Fetch the current release tag rather than hardcoding one, because the installer URL changes with every NVM release.

NVM_VER=$(curl -s https://api.github.com/repos/nvm-sh/nvm/releases/latest | grep tag_name | cut -d \" -f4)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VER}/install.sh | bash
source ~/.bashrc

Install both lines, make 24 the default for new shells, then list what you have.

nvm install 22
nvm install 24
nvm alias default 24
nvm ls

NVM downloads the official tarballs from nodejs.org and checks their SHA-256 sums before unpacking.

nvm install 22 and 24 on Rocky Linux 10 with nvm ls showing lts/jod, lts/krypton and default alias 24

The arrow in nvm ls marks the version this shell uses, and default is what new shells get. Switch a shell to 22 with nvm use 22, or drop a .nvmrc file containing 22 in a project so nvm use picks it up. NVM only affects interactive shells that source ~/.bashrc, so systemd services keep using the RPM node. Our guide to managing Node.js versions with nvm, fnm and Volta compares the version managers in more depth.

Install from the Official Tarball

The prebuilt binary from nodejs.org suits air-gapped builds where you copy one archive in. This fetches the newest 24 release and unpacks it under /usr/local.

NODE_VER=$(curl -s https://nodejs.org/dist/latest-v24.x/ | grep -oP 'node-v\K[0-9.]+' | head -1)
curl -sLO https://nodejs.org/dist/v${NODE_VER}/node-v${NODE_VER}-linux-x64.tar.xz
sudo tar xJf node-v${NODE_VER}-linux-x64.tar.xz -C /usr/local --strip-components=1
rm node-v${NODE_VER}-linux-x64.tar.xz

Check the binary by its full path so nothing else on the PATH answers for it.

/usr/local/bin/node -v
/usr/local/bin/npm -v

The tarball ships its matching npm.

v24.22.3
11.19.1

On Rocky Linux the default PATH lists /usr/local/bin before /usr/bin, so a tarball install silently shadows any RPM Node.js on the same box. dnf will not update a tarball either, which means you own every security patch by hand. Unlike NVM, these commands skip the checksum, so compare the archive against SHASUMS256.txt from the same release directory before you extract it, and expect the tarball’s README, LICENSE and CHANGELOG to land in /usr/local too. Pick one method per server and stick to it, because two runtimes on one PATH is how a deploy ends up testing against one version and running on another.

Add Build Tools for Native Addons

Packages such as bcrypt and sharp fall back to compiling with node-gyp when no prebuilt binary matches your platform. Install the compilers now, so a failed prebuilt download becomes a slow install rather than a gyp ERR! at deploy time.

sudo dnf install -y gcc-c++ make

For AppStream installs, add nodejs-devel or nodejs24-devel to get the Node headers. To see what a line switch does to an addon, we installed bcrypt in a scratch project on NodeSource 24 and hashed a string.

mkdir -p ~/node-demo && cd ~/node-demo && npm init -y
npm install bcrypt
node -e "require('bcrypt').hash('x',10).then(h=>console.log(h.slice(0,7)))"

The hash prefix comes back, and node_modules/bcrypt has no build directory, so nothing was compiled. We then moved the server to NodeSource 22 and rebuilt the addon in the same project.

npm rebuild bcrypt

npm finished without touching a compiler, and the same hash call worked on 22.

rebuilt dependencies successfully

That works because current bcrypt ships N-API prebuilds, which target a stable interface instead of one Node release. Addons built against the classic V8 API are different. They are compiled for one ABI (127 on Node 22, 137 on Node 24), so they fail to load after a switch until you run npm rebuild in every project or delete node_modules and reinstall.

Test with an Express App and the Test Runner

A real dependency install proves npm, the registry connection and the runtime together. On AppStream nodejs24, type node-24 and npm-24 wherever this section says node and npm. Create a project and pull in Express.

mkdir -p ~/node-demo && cd ~/node-demo && npm init -y
npm install express

npm should finish with no vulnerabilities reported. We captured this in a fresh project, so if bcrypt from the previous section is already in yours, the audited count comes out a few packages higher.

added 65 packages, and audited 66 packages in 3s

31 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Now open the app file.

vim ~/node-demo/server.js

Add a route that reports the runtime it is running on, which makes the systemd check later unambiguous.

const express = require("express");
const app = express();
const PORT = 3000;

app.get("/", (req, res) => {
  res.json({
    message: "Node.js 24 LTS running on Rocky Linux 10",
    nodeVersion: process.version,
    v8Version: process.versions.v8,
    platform: process.platform,
    arch: process.arch,
    uptime: process.uptime()
  });
});

app.listen(PORT, () => console.log("Server running on port " + PORT));

Start it in the background and query it.

cd ~/node-demo && node server.js &
curl -s http://localhost:3000/ | python3 -m json.tool

The JSON names the exact runtime serving the request.

{
    "message": "Node.js 24 LTS running on Rocky Linux 10",
    "nodeVersion": "v24.22.3",
    "v8Version": "13.6.233.17-node.63",
    "platform": "linux",
    "arch": "x64",
    "uptime": 3.554431887
}

Stop it with kill %1 before the systemd step. The built-in test runner means you need no Jest or Mocha for basic checks, so create ~/node-demo/test.mjs.

vim ~/node-demo/test.mjs

Two tests are enough. One asserts the major version, so a CI job fails loudly if it lands on the wrong line.

import { test } from "node:test";
import assert from "node:assert";

test("math works", () => {
  assert.strictEqual(1 + 1, 2);
});

test("node version is 24", () => {
  assert.ok(process.version.startsWith("v24"));
});

Run the file with node --test.

node --test ~/node-demo/test.mjs

Both tests pass in well under a tenth of a second.

✔ math works (1.194585ms)
✔ node version is 24 (0.272741ms)
ℹ tests 2
ℹ suites 0
ℹ pass 2
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 79.642565

Change the assertion to v22 if you are on the 22 line. Leaving it on 24 is also a cheap guard on a 22 server, because the first failing run tells you exactly which runtime your pipeline picked up.

Run the App as a systemd Service

A dedicated system user and a unit file keep the app running across reboots and crashes. Copy the project into /opt/myapp and hand it to that user.

sudo useradd -r -s /sbin/nologin nodeapp
sudo mkdir -p /opt/myapp
sudo cp -r ~/node-demo/server.js ~/node-demo/node_modules ~/node-demo/package.json /opt/myapp/
sudo chown -R nodeapp:nodeapp /opt/myapp

Create the unit file.

sudo vim /etc/systemd/system/nodeapp.service

Paste the unit we ran. On AppStream nodejs24, change ExecStart to /usr/bin/node-24 server.js, because there is no plain node on that install for systemd to start.

[Unit]
Description=Node.js Application
After=network.target

[Service]
Type=simple
User=nodeapp
WorkingDirectory=/opt/myapp
ExecStart=/usr/bin/node server.js
Restart=on-failure
RestartSec=5
Environment=NODE_ENV=production
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target

Reload systemd, enable the service and check it.

sudo systemctl daemon-reload
sudo systemctl enable --now nodeapp
systemctl status nodeapp --no-pager

Look for active (running) and the “Server running on port 3000” line from the app itself.

systemctl status nodeapp showing the Node.js service active and running on Rocky Linux 10

SELinux stayed enforcing the whole time. A service started from a unit in /etc/systemd/system runs as unconfined_service_t, so binding port 3000 needs no semanage port change, and ausearch -m avc -ts recent returned <no matches>. Older guides add 3000 to http_port_t by reflex; we skipped it and saw no denials. The systemctl commands reference covers the rest of the unit lifecycle.

Open Port 3000 in firewalld

Only expose the port directly while testing. In production, keep Node on localhost behind Nginx and open 80 and 443 instead, because Node should not be terminating TLS for the internet. To reach the app from another machine now, add the port.

sudo firewall-cmd --permanent --add-port=3000/tcp
sudo firewall-cmd --reload
sudo firewall-cmd --list-ports

The port is listed, and a curl to the server’s address returned the same JSON as the local test.

3000/tcp

Check the default zone with sudo firewall-cmd --get-default-zone before trusting this test. Our Rocky cloud image defaulted to trusted, which accepts everything anyway, while a standard install defaults to public, where this rule is what lets traffic in. Some cloud images ship without firewalld at all, and there the provider’s firewall rules do the filtering.

Install Yarn or Enable Corepack

For projects that pin Yarn Classic, a global npm install is enough.

sudo npm install -g yarn
yarn --version

npm warns that Yarn’s preinstall script is not covered by allowScripts. Yarn still works and reports a 1.x version. For Yarn 4 or pnpm, use Corepack, which ships with Node 22 and 24 (Node 25 and later stopped bundling it, so on 26 install it first with sudo npm install -g corepack). Running corepack enable as a normal user fails, because it writes symlinks into /usr/bin.

Internal Error: EACCES: permission denied, symlink '../lib/node_modules/corepack/dist/pnpm.js' -> '/usr/bin/pnpm'

Run it with sudo, then set the project’s Yarn version from inside the project directory.

sudo corepack enable
yarn set version stable
yarn --version

Corepack downloads the latest Yarn 4 release on first use, and the project reports it from then on. The version is recorded in the project, so the rest of your team gets the same Yarn without installing anything globally.

Uninstall Node.js

Remove a NodeSource install together with its repository files, otherwise the next dnf install nodejs pulls from NodeSource again.

sudo dnf remove -y nodejs
sudo rm -f /etc/yum.repos.d/nodesource*.repo
sudo dnf clean all

AppStream installs leave several packages behind if you remove only the runtime, so name them all. On the 22 line our remove took out these.

  • nodejs and nodejs-npm
  • nodejs-libs and nodejs-docs
  • nodejs-full-i18n and libuv
  • the openssl CLI the install had added

The command was sudo dnf remove -y nodejs nodejs-npm nodejs-libs npm, and dnf dropped the rest as unneeded dependencies. NVM versions go with nvm uninstall 22, which touches nothing outside your home directory.

Troubleshooting

“Error: No matching Modules to list”

You followed a RHEL 8 or 9 guide that runs dnf module list or dnf module enable for Node.js. EL10 has no Node.js module streams, so install the package for the line you want directly: nodejs for 22, nodejs24 for 24 or nodejs26 for 26.

“bash: node: command not found” after installing nodejs24

AppStream’s nodejs24 provides only the suffixed commands. Call node-24, or switch to NodeSource if your tooling insists on node. Do not fix it with a hand-made symlink in /usr/bin, because the plain nodejs package owns /usr/bin/node and points it at node-22.

“cannot install both nodejs-2:…nodesource and nodejs-1:…el10”

AppStream Node.js is still installed. Skip --allowerasing, which ends in a file conflict on /usr/lib/node_modules. Remove nodejs nodejs-npm nodejs-libs and any nodejs24* packages, then install again.

“was compiled against a different Node.js version using NODE_MODULE_VERSION”

An addon built for one ABI was loaded by another line, for example a 137 build on Node 22, which expects 127. Run npm rebuild in the project, or delete node_modules and run npm ci. Then check that the systemd unit points at the same binary you rebuilt with.

Compare Node.js 22 and 24 on Rocky Linux 10

These are the values our two installs reported side by side, which is what you would check before moving an app across.

ItemNode.js 22Node.js 24
LTS codenameJodKrypton
Module ABI127137
Bundled npm major1011
V8 version12.413.6
AppStream package and binarynodejs, /usr/bin/nodenodejs24, /usr/bin/node-24
NodeSource scriptsetup_22.xsetup_24.x
End of life30 April 202730 April 2028

The ABI row is the one that bites during a move, since it decides whether your compiled dependencies load. The npm major changes lockfile handling and install-script warnings, so run npm ci on the new line in CI before you touch production. The same steps work on Ubuntu and Debian with apt; see the Node.js 24 guide for Ubuntu, the Debian version and the Fedora walkthrough.

Harden It for Production

A few habits keep a Node.js server on EL10 boring to run.

  • one install method per server, never RPM plus tarball
  • an explicit binary path in every unit file
  • Node bound to 127.0.0.1 behind Nginx with TLS
  • npm ci from a committed lockfile on deploy

If you would rather manage restarts, clustering and logs from one tool, PM2 on Rocky Linux can replace the unit above. Our pick for a fresh Rocky Linux 10 or AlmaLinux 10 server stays NodeSource 24, because it gives you a plain node, gets upstream patches quickly and has support until April 2028. Keep 22 only where something forces it, and plan the move off it before April 2027.

Keep reading

Customize KDE Plasma Desktop with Themes|Modules|Extensions AlmaLinux Customize KDE Plasma Desktop with Themes|Modules|Extensions Patch PHP2Shell on RHEL, Rocky Linux and AlmaLinux 10 / 9 / 8 AlmaLinux Patch PHP2Shell on RHEL, Rocky Linux and AlmaLinux 10 / 9 / 8 Linux Terminal Shortcuts Cheat Sheet (Bash and zsh) Cheat Sheets Linux Terminal Shortcuts Cheat Sheet (Bash and zsh) Build FFmpeg 9.1 from Source on Rocky Linux 10 and Fedora 45 Fedora Build FFmpeg 9.1 from Source on Rocky Linux 10 and Fedora 45 Patch PHP CVE-2026-115560 on RHEL, Rocky Linux and AlmaLinux AlmaLinux Patch PHP CVE-2026-115560 on RHEL, Rocky Linux and AlmaLinux Install MongoDB 8.0 on Rocky Linux 10 / AlmaLinux 10 AlmaLinux Install MongoDB 8.0 on Rocky Linux 10 / AlmaLinux 10

2 thoughts on “Install Node.js 24 or 22 LTS on Rocky Linux 10 / AlmaLinux 10”

  1. Given how entirely wrong option1 is, I’m not sure I can trust any of the rest of the article!!

    dnf modules just plain do not exist in rhel10 or any of the derivatives.

    Reply
    • Correct, and the guide has been fixed. RHEL 10 dropped modularity: dnf module list is empty on a stock Rocky 10 box and dnf module disable -y nodejs exits 1 with “missing groups or modules: nodejs”. The real conflict is a package one. With AppStream nodejs installed, dnf install nodejs refuses NodeSource (“cannot install both nodejs-1:22.x from appstream and nodejs-2:24.x”), and –allowerasing then trips a file conflict under /usr/lib/node_modules. Run sudo dnf remove -y nodejs nodejs-npm nodejs-libs first, then sudo dnf install -y nodejs.

      Reply

Leave a Comment

Press ESC to close