The Node-RED comunity provides a script to install Node.js, npm and Node-RED onto a Raspberry Pi. This script can be used also for the RoadRunner. The script can also be used to upgrade an existing install when a new release is available.
Running the following command will download and run the script:
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
The install script for the Pi also sets it up to run as a service. This means it can run in the background and be enabled to automatically start on boot.
The following commands are provided to work with the service:
If you want Node-RED to run when the Pi is turned on, or re-booted, you can enable the service to autostart by running the command:
sudo systemctl enable nodered.service
To disable the service, run the command:
sudo systemctl disable nodered.service
Once Node-RED is running you can access the editor in a browser: http://roadrunner_ip_address:1880.
To install this node open the menu manage pallete inside the Node-RED editor.
then select the tab Install and type node-red-contrib-roadrunner:
press the Install button and wait. At the end you will have two new nodes on the palette list.
If you are running Node-RED as a normal user, be sure to give the necessary permissions to /dev/gpio0. One simple way is to save this text:
inside a file called:
Then restart Node-RED:
sudo systemctl restart nodered.service