Node-Red comes pre-installed since Raspbian Jessie but it is an outdated version and need upgrading. Fortunately, there is a ready made script available at Node-Red official website which perform various steps to install or update the Node-Red with ease. This script can be reviewed by visiting the GitHub Repository.
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
The script supports extra parameters. As NodeJS 10 comes pre-installed with Raspbian operating system, this script needs extra parameters e.g.
--node14 to run, otherwise, it will yield an error.
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --node14
Auto start on boot:
- Enable auto start service:
sudo systemctl enable nodered.service
- Start Node-Red:
sudo systemctl start nodered.service
- Disable auto start service:
sudo systemctl disable nodered.service
- Stop Node-Red:
sudo systemctl stop nodered.service