
A fresh Fedora 44 install is a great base for web development, API work, and automation scripts, but Node.js is usually the first tool you need before you can build anything useful. If you choose the wrong install method, you can end up with permission errors, stale versions, or a setup that breaks when a project needs a different release.
This article shows you how to Install Node.js on Fedora 44 in a way that matches how real Linux systems are used. You will see the DNF method for simple system installs, NodeSource for newer packaged releases, and NVM for flexible developer setups. Fedora’s Node.js guidance also confirms that npm comes with the main Node.js package, so you do not need to install it separately on Fedora.
Prerequisites
- Fedora 44 installed and updated.
- Sudo access or root privileges.
- A working internet connection.
- A terminal app such as GNOME Terminal, Konsole, or SSH access.
- At least one package manager option available: DNF, NodeSource, or NVM.
If you already have Node.js installed, check the current version first.
node -v
npm -v
That check matters because a second install can cause path conflicts, and those conflicts are annoying to debug later.
Step 1: Update Your System
Refresh package metadata
Start by updating Fedora before you install anything else.
sudo dnf upgrade --refresh -y
This command refreshes your package metadata and applies the latest updates. You want this step because a current package index reduces dependency errors and makes sure your system trusts the newest repository data.
Expected output usually includes lines about downloading metadata, resolving dependencies, and completing transactions. If you see Complete!, the update finished successfully.
Why this step matters
A Fedora system that has not been refreshed can try to install outdated dependencies. That can make Node.js installation fail or pull in older packages you do not want on a development machine. Updating first saves time and keeps your Node.js on Fedora 44 setup stable from the beginning.
Step 2: Install Node.js with DNF
Use the default Fedora package
For most users, this is the simplest path.
sudo dnf install nodejs -y
Fedora’s developer portal says this installs Node.js, npm, the V8 engine, and related dependencies in one command. Fedora also treats newer LTS releases as the default package stream, so this method is a strong choice for a normal workstation or server install.
What this command does
DNF pulls the packaged version from Fedora’s repositories and installs it system-wide. That makes it a good fit when you want a clean, predictable Linux server tutorial setup without extra third-party repositories.
Why this step matters
System-wide packages work well for shared servers and simple deployments. You get Fedora-managed updates, and you avoid the extra moving parts that come with custom version managers or outside repos. For many sysadmins, this is the safest first choice.
Verify the install
node -v
npm -v
which node
A successful result should show a Node.js version, an npm version, and a path like /usr/bin/node.
Step 3: Check the Available Fedora Streams
See which version streams exist
If you want to know what Fedora offers beyond the default package, list the module streams.
sudo dnf module list nodejs
This command shows the Node.js streams available in Fedora’s repos. Fedora’s docs and change notes show that Fedora uses versioned Node.js streams and has supported parallel-installable options for compatibility.
Why this step matters
Not every project can move to the newest LTS version right away. If you maintain older code, checking streams helps you match your app to the version it supports instead of guessing.
Example of what you may see
Name Stream Profiles Summary
nodejs 22 common JavaScript runtime
nodejs 24 common JavaScript runtime
The exact list depends on Fedora 44 repository state, but the point is the same. You are checking whether the distro already gives you the version you need.
Step 4: Install NodeSource for Another Version
Add the repository
If you need a version that is not in the default Fedora stream, NodeSource is a common choice.
sudo dnf install -y gcc-c++ make curl
Then add the NodeSource repository.
curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash -
NodeSource maintains its own RPM packages, and Fedora users often use it when they want a specific Node.js release outside the default distro path.
Why these commands matter
gcc-c++ and make help build native modules later if your npm packages need compilation. curl downloads the NodeSource setup script, and the script adds the repository and signing data so DNF can trust the packages.
Install Node.js from NodeSource
sudo dnf install nodejs -y
After the repo is added, DNF uses the NodeSource package source.
Why this step matters
This method gives you more version control than the default Fedora package. That helps when a production app, staging server, or client project needs a specific major release.
Verify the version
node -v
npm -v
You want to confirm that the version matches the NodeSource branch you selected.
Step 5: Use NVM for Multiple Versions
Install NVM
If you build multiple projects, NVM is usually the cleanest answer.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
The npm docs strongly recommend a Node version manager like nvm for Linux when you want flexible installs and cleaner package permissions. NVM also keeps Node versions inside your home directory, which reduces system-wide permission issues.
Load NVM into your shell
source ~/.bashrc
If you use Zsh, use the matching shell file instead.
source ~/.zshrc
Why this step matters
The install script adds NVM to your shell profile, but your current terminal session does not read those changes until you reload the file. Without this, nvm will look missing even though the install worked.
Install the latest LTS version
nvm install --lts
Why this step matters
LTS releases are the stable choice for most work. They get longer support windows, and they reduce the risk of breaking dependencies in your projects.
Set the default version
nvm alias default node
Check your install
node -v
npm -v
nvm ls
NVM is the best option when you need to move between old and new projects without constantly uninstalling software.
Step 6: Configure npm for Global Packages
Avoid sudo for global installs
If you used DNF or NodeSource, set up a user-owned npm prefix.
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
Then add this line to your shell profile:
export PATH=~/.npm-global/bin:$PATH
Reload the profile:
source ~/.profile
Fedora’s developer portal recommends this pattern for global modules because it keeps package installs in your home directory.
Why this step matters
Using sudo npm install -g can create permission problems and security risks. A user-owned prefix gives you global tools without forcing root access during package installs.
Example expected result
After setup, this should work without sudo:
npm install -g nodemon
nodemon -v
Step 7: Test the Runtime
Create a simple Node.js file
A version check is good, but a real script proves the runtime actually works.
cat > test-node.js <<'EOF'
const http = require('http');
const server = http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Node.js works on Fedora 44\n');
});
server.listen(3000, () => {
console.log('Server running on http://localhost:3000');
});
EOF
Run it:
node test-node.js
Test it from another terminal:
curl http://localhost:3000
Why this step matters
This test confirms more than version output. It proves that Node can load modules, start a process, and listen on a port. For a sysadmin, that is the real sign the install is healthy.
Step 8: Manage and Update Node.js
Update a DNF install
sudo dnf upgrade nodejs -y
Update an NVM install
nvm install 24
nvm use 24
nvm alias default 24
Why this step matters
Different install methods use different update paths. DNF keeps the system package current, while NVM lets you test new versions before making them your default.
Troubleshooting
node: command not found
This usually means the binary is not in your PATH. Run which node and check whether you installed Node.js system-wide or through NVM.
nvm: command not found
Your shell profile probably did not load NVM. Run source ~/.bashrc or open a new terminal.
Permission errors with global npm packages
This happens when npm tries to write to a root-owned directory. Use the ~/.npm-global prefix method instead of sudo.
Wrong version appears after install
You may have both a system install and an NVM install. Check which node to see which binary your shell uses first.
Native modules fail to build
Install build tools first.
sudo dnf groupinstall "Development Tools" -y
sudo dnf install python3 make gcc-c++ -y
That gives npm the compiler tools it needs for packages like sharp or bcrypt.