How to install Node-RED to Fedora

This post describes how to Install Node-RED to Fedora in few steps with dnf and npm install command. Node-RED is build on top of nodejs so only nodejs should be installed with root permissions. Other steps will install Node-RED in home directory as ordinary user.

As a root user install npm. This line will also install all needed dependencies: nodejs, nodejs-libs, openssl, nodejs-docs and nodejs-full-i18n:

# dnf install npm

Next step is to install Node-RED in newly created directory as ordinary user:

> mkdir node-red
> cd node-red
> npm install node-red

Now you can start Node-RED from command line. “cd” to node-red installation directory and start Node-RED app with node-red-pi command:

> cd /home/<user_home>/node-red
> node_modules/node-red/bin/node-red-pi

Finally, open Node-RED editor in browser:

http://127.0.0.1:1880/

Installing Node-RED in this way should result in only two folders in your home directory:

/home/<user_home>/node-red  -> node-red installation, packages and main modules
/home/<user_home>/.node-red -> flows, settings and modules installed from Node-RED editor

Happy Node-RED developing :)