How to Install Node-RED on Windows

Node-RED is a powerful flow based programming tool that allows you to connect hardware devices, APIs, and online services. It is a great choice for building IoT applications automating tasks and creating web based dashboards.

In this post, we will discuss the step by step of installing Node-RED on the Windows operating system. Furthermore, we will cover the troubleshooting step during the installation of Node-RED.

Getting Started

Node-RED developed by IBM is a powerful tool that enables users to create visually driven applications. Through its node based architecture it simplifies connecting various systems. Whether you are new to coding Node-RED’s visual approach makes it easily accessible.

Installing Node-RED on Windows

Following are steps described below to install Node-RED Windows operating system:

Step 1: Install Node JS

Node-RED runs on Node.js so you will need to have it installed first. Visit the official Node.js website. You will find two versions:

  1. LTS (Long Term Support)
  2. Current.

For most users, the LTS version is recommended for stability. Once downloaded, follow our guide on how to install Node.js and NPM on Windows operating system. After that check Node.js and NPM stands for Node Package Manager are installed correctly, open Command Prompt, and type the following:

node -v
npm -v
node npm version

This should display the installed versions of Node.js and npm.

Step 2: Install Node-RED

To download Node-RED Windows with Node.js installed you can now proceed. This is done via the npm, make sure you have administrative privileges. In the Command Prompt, type:

npm install -g --unsafe-perm node-red
install node-red

The -g flag installs Node-RED globally, making it available from any directory. The --unsafe-perm flag allows the installation to be complete without certain permission issues that might occur on Windows.

Step 3: Running Node-RED

Once Windows install Node-RED, running Node-RED is simple. In the Command Prompt, simply type:

node-red

This will start the Node-RED server. The command prompt will show the server logs, and you’ll see something like this:

node-red logs

Open your web browser and navigate to http://127.0.0.1:1880/. This will bring you to the Node-RED flow editor.

node-red editior

How to Use Node-RED on Windows

Now that Node-RED is up and running let’s understand how to use Node-RED on the Windows operating system:

Creating First Flow

In the editor, you will see a palette on the left containing various nodes.

Drag and drop an inject node and debug node that helps generate messages and logs output onto the canvas.

Connect the inject node to the debug node by clicking and dragging a line between the output port of the inject node to the input port of the debug node.

node red flow

Click the inject node to configure it. You can set a payload value like a simple string like “Hello, Node-RED!”. Click Done to save the configuration.

setting up node flow

Click the Deploy button in the top right corner to deploy your flow.

Click the button on the left of the inject node. The debug tab on the right will show the message “Hello, Node-RED!”.

Install Additional Nodes

The true power of Node-RED lies in its extensive library of additional nodes which you can install to extend its functionality.

Visit the Node-RED library to search for nodes that suit your needs.

node-red library

In the Node-RED editor click the menu button in the top right corner then select Manage palette

In the Palette tab click Install then search for the node you want to install for example node-red-dashboard.

Click Install next to the desired package.

node-red package

Setting Up as a Service

To have Node-RED start automatically when your computer boots up, you can set it up as a service.

You need to install NSSM stands for Non-Sucking Service Manager is a tool that can help with this. Download it from the NSSM website.

After downloading, extract the NSSM zip file to a directory. Open the Command Prompt as an administrator. Navigate to the extracted NSSM directory. Run the following command to install Node-RED as a service:

nssm install NodeRED

In the GUI that appears enter the path to the Node.js executable usually C:\Program Files\nodejs\node.exe and the path to the Node-RED script C:\Users\yourusername\AppData\Roaming\npm\node-red.cmd.

Click Install Service. After installing the service, you can start it by running:

nssm start NodeRED

To ensure the service starts automatically check your services list by typing services.msc in the Run dialog and set the NodeRED service to Automatic.

Conclusion

Installing Node-RED on Windows is a simple process involving the installation of Node.js followed by Node-RED itself. Once set up Node-RED provides a versatile platform for creating and managing workflows integrating various services and devices seamlessly. By following this guide you should be well on your way to leveraging the full potential of Node-RED in IoT projects.

While installing Node-RED on Windows is simple but managing dependencies and ensuring compatibility across different server environments can be technical. Upgrading to Ultahost’s Windows VPS hosting plan empowers you with a robust solution that helps you to install the latest package managers and repositories simplifying Node-RED installation and updates.

FAQ

What is Node-RED?
How do I install Node-RED on Windows?
Do I need Node.js to install Node-RED?
Which command installs Node-RED?
Can I run Node-RED on Windows 10?
How do I start Node-RED after installing?
Is Node-RED free to use?

Related Post

How to Install Jenkins on Windows

Jenkins is an open-source automation server widely used...

How to Install WinGet in Windows

WinGet, the Windows package manager, revolutionizes how...

How to Install Chromium on Windows 10

Chromium is an open-source web browser project that for...

How to Install Genymotion on Windows

Genymotion stands as a powerful Android emulator, allow...

How to Check Open Ports in Windows

Imagine you're playing your favorite online game, but y...

How to Install Yarn on Windows

Yarn is a popular package manager for JavaScript projec...

Leave a Comment