Now that we have node we can then jump in to downloading Node-Red. There is a tutorial on their git for the Pi which can be found here. But as always I want to take a different route as I want to use git to ensure that we always stay up to date with any new commits to the node-red repository.

We will now install Git. This allows us to clone git hub repositories. If you have never heard of git hub it is definitely something you should look into. In essence though it is a good way of adding some version control and open source collaboration to your projects.

To install Git carry out the following command.
sudo apt-get install git-core
Once Git has installed along with all of its dependencies we want to navigate to our home directory where we will install Node-Red.
We will then clone in our Node-Red repository (repo) to the directory with the following command.
git clone https://github.com/node-red/node-red.git
You will then find that you have a folder cloned into the directory called “node-red”. We will now install everything using “npm” which is known as the Node Package Manager.
cd node-red
sudo npm install
After a while everything should run through and install for you. Next we can get Node-Red running, we still have some bits to do but its worth testing first. Make sure you are still in the /home/pi/node-red directory for this one.
sudo node red.js
You will see a lot of information print out on to the screen, errors about missing packages and all of the good stuff. However the one line you are looking for is related to Node-Red being available on the default 1880 port.

So next you need to navigate to your Pi’s IP address and port to see Node-Red in all of its glory.
http://Pi-IP-Address:1880
You should be welcomed to a blank canvas with all of the “nodes” available on the left hand of the screen. You can drag and drop these to start wiring things together. We will next be discussing how to create your first "flow" using these nodes.

This guide was first published on Jan 25, 2014. It was last updated on Jan 25, 2014.

This page (Setting up Node-Red) was last updated on Jan 21, 2014.

Text editor powered by tinymce.