Node-RED – Install on Linux

Introduction

What is Node-RED? Node-RED is an open-source and low-code software, that allows to connect anything with anything. This means, any device that produces data and can be accessed over a network, can be included as a data source or sink in Node-RED. Messages from the devices can be modified or analyzed, processed and then forwarded to some other device or database.

This all can be done by wiring “processing nodes” together using flows, that the message “flows” through. The following screenshot shows you how a simple flow can look like:

Example screenshot of a Node-RED flow.

Step 1: Install node.js

Currently (August 2020), Node-RED recommends a node.js version of 12.x.

You can find binaries for your system here: https://nodejs.org/en/download/current/. Or you just use your package manager. Important: If you want to install it on a Raspberry Pi, go to the second “Step 1” below!

E.g. on Debian, add Node.js PPA and install

curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo apt install nodejs

More details can be found here.

Step 1 (Raspberry): Install node.js, npm and Node-RED

Folks from Node-RED have provided us with a script to install everything on a Rapsberry Pi the easy way. It works on Debian-based systems.

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

Details can be found here. Raspberry users don’t need to do anything else. You can use Node-RED now!

Step 2 (non-Raspberry): Install Node-RED

sudo npm install -g --unsafe-perm node-red

Details can be found here.

Step 3: Run and open Node-RED

You can then easily run Node-RED using

node-red

And access the web interface by opening the url

http://<your_ip_or_host>:1880

One thought on “Node-RED – Install on Linux

Leave a Reply