Install node red in Raspberry Pi

All this step will show you how to install node-red on Raspberry Pi. Open the terminal of Raspberry Pi and do as below:

  • Install node:

    • $ sudo apt update (you need to update first)

    • $ sudo apt install nodejs (Install nodejs)

    • $ node -v (check version of nodejs if you get v10.12.0 you need to update to v14.5.0)

  • Update node if your node is v10.12.0:

    • $ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - (This command use for update your package repository)

    • $ sudo apt install nodejs (install nodejs)

    • $ node -v (you will get node v14.5.0)

  • Install node-red:

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

      • This script will:

        • remove the pre-packaged version of Node-RED and Node.js if they are present

        • Install the current Node.js LTS release using the NodeSource. If it detects Node.js is already installed from NodeSource, it will ensure it is at least Node 8, but otherwise leave it alone

        • install the latest version of Node-RED using npm

        • optionally install a collection of useful Pi-specific nodes

        • setup Node-RED to run as a service and provide a set of commands to work with the service

    • $ sudo npm install -g npm@2.x

    • $ npm install node-red-dashboard (If you did with all the step you will get node-red on your Raspberry Pi)

    • $ node-red-start (to open your node red)

Last updated

Assoc. Prof. Wiroon Sriborrirux, Founder of Advance Innovation Center (AIC) and Bangsaen Design House (BDH), Electrical Engineering Department, Faculty of Engineering, Burapha University