Node-Red on the Omega2 Pro

Welcome to this guide on installing and using Node-RED with the Omega2 Pro.

omega2 pro

Node-RED is a flow-based, visual programming tool based on NodeJS that runs in the browser. It comes packaged as an OnionOS App for the Omega2 Pro and can be easily accessed through OnionOS in any browser.

node red flow

Installing Node-RED

First off, make sure your Omega2 Pro is connected to the internet and updated to the latest firmware.

See the Omega2 Pro getting started guide for more details. we’ll need to update OnionOS and then install the Node-Red App.

We’ll then use the App Manager in OnionOS to install the Node-Red OnionOS App. First, you’ll want to navigate to OnionOS in your browser, here’s a helpful guide on the subject.

Use the App Manager to install Node-Red:


If the installation through the App Manager is not successful, you can always resort to using opkg on the command line:

opkg update
opkg install oos-app-nodered

After installation, it will take about a minute for Node-Red to load and start running.

After every Omega2 Pro reboot, it will take about an additional minute after boot before Node-Red starts running and can be accessed in the browser.

You can then launch the app from the OnionOS home screen:

home screen

And there it is, NodeRed running in OnionOS on the Omega2 Pro:


Use the visual drag-and-drop programming style to create and deploy your own flows:


Example Flows

John Walicki, member of the IBM Watson IoT Developer Advocate team, has created some awesome example flows that make use of Watson IoT and Node-Red on the Omega2 Pro. Check them all out in John’s Node-RED-Onion-Omega2-Examples GitHub Repo.

Installing Additional Node Packages

If you’re interested in using additional Node packages with Node-Red, you’ll need to install NPM:

opkg update
opkg install node-npm

To install packages with NPM, there’s a specific syntax that needs to be used. Instead of:

npm install <PACKAGE>


node --max_old_space_size=512 $(which npm) install <PACKAGE>

Installing Node Packages that require Compilation

If the Node package that you’re trying to install needs to be compiled, there is an additional step.

First, you’ll need to install and configure node-gyp:

opkg update ; opkg install python
node --max_old_space_size=512 $(which npm) install -g node-gyp

Next, we’ll install gcc and make, so npm can be used to install packages that require compilation:

Follow these instructions to enable the LEDE package repos:

(Just don’t comment out the Onion repos)

Your /etc/opkg/distfeeds.conf file should look something like this:

#src/gz reboot_core
src/gz reboot_base
#src/gz reboot_onion
## src/gz reboot_luci
src/gz reboot_packages
## src/gz reboot_routing
## src/gz reboot_telephony
src/gz omega2_core
src/gz omega2_base
src/gz omega2_packages
src/gz omega2_routing
src/gz omega2_onion

Then run these commands:

opkg update
opkg install make gcc
ar -rc /usr/lib/libpthread.a

And you’re all set, you’ll be able to install any Node package with the following command:

node --max_old_space_size=512 $(which npm) install <PACKAGE>