Install Node-RED on Raspbian Jessie Lite on a Raspberry Pi Zero W

Black Friday on Amazon right now! Black friday Banggood Gearbest Black Friday
Extra 10% off For XIAOMI SUPER HOME TECH GADGET Sale

Smart Home kits, security camera, robot vacuum cleaner, air purifier ... *Excluding products already on promotion

Reveal
35 days left

The Lite version of Raspbian Jessie is very well suited to the limited resources of the Raspberry Pi Zero W. Node-RED is pre-installed on the version integrating the Pixel graphics desktop but this is not the case for the Lite version. Fortunately, there is an installation script now that takes care of everything!

Run the installation script

Everything is explained in detail here. Log in to SSH (read this article to learn how) to your Raspberry Pi Zero W and run this command

This command launches the installation script that takes care of everything!



The script performs the following operations

  • It stops and uninstalls the current version of Node-RED and Node.js. This step is not trivial if you have other projects based on Node.js
  • It then installs Node.js for OSC Arm V6
  • Installs Node-RED and systemd scripts that automatically run Node-RED at Raspbian startup

The installation script takes about 30 minutes on a Raspberry Pi Zero W. All the resources are compiled directly after the download. To follow the installation process, open a second SSH connection and execute the following command.

Some useful commands

After the installation, it is necessary to manually activate the automatic start of Node-RED at the launch of Raspbian Jessie. To do this, execute the command

On the contrary, to stop the service (you no longer need Node-RED and you wish to recover some resources), run the command

To manually start Node-RED

Once launched, you can access Node-RED from any extension on the local network (including a tablet or smartphone).node-red start demarrage naviguateur

Start automatically with PM2

There is another option to start automatically. The PM2 Process Manager for Nodejs is recommended. PM2 provides other tools to more easily manage startup, shutdown, opening of the execution log, and so on. It’s much more flexible than using the Linux and systemd services. Begin by installing PM2 with this command:

If you do not know Node-RED path, run this command

On Linux / Raspbian, it should be in /usr/bin/node-red .

To run NodeRED, run this command PM2

Finally, the configuration is saved and automatic start is activated. That’s all.

 

To learn more about Node-RED, see the dedicated category.

Subscribe to the weekly newsletter

No spam and no other use will be made of your email. You can unsubscribe anytime.

DIY Projects