Node-RED is a flow-based programming tool for wiring together devices, APIs and online services. On Windows, you can run it locally for learning, prototyping and building IoT flows before connecting an ESP32, Arduino or MQTT broker. This guide installs Node-RED with Node.js and npm, opens the editor, and checks that the runtime is working.
What you need
- A supported 64-bit Windows installation.
- Node.js and npm. Prefer a current Node.js LTS release unless your required Node-RED version documents another supported version.
- An internet connection for the initial package installation.
- A normal Windows user account with permission to install global npm packages. Administrator access may be needed for some system-level changes, but do not run every command as administrator by default.
1. Install Node.js
Download the LTS installer from the official Node.js website. Run the installer and keep npm and the option to add Node.js to PATH enabled. When installation finishes, open a new PowerShell window so it loads the updated PATH.
Check both commands:
node --version
npm --version
Each command should print a version number. If PowerShell says a command is not recognized, reopen the terminal first; if it still fails, repair the Node.js installation and PATH.
2. Install Node-RED
In PowerShell, run:
npm install -g node-red
Wait for npm to finish. Funding notices are informational and do not indicate an installation failure. If npm reports a permissions error, inspect the exact error before changing execution policy or repeatedly opening elevated terminals.
3. Start the Node-RED runtime
Run this command in PowerShell:
node-red
Keep this terminal open while you use Node-RED. Wait for the startup log to indicate that the runtime has started and the editor is available. Then open http://localhost:1880 in your browser. The address is local to your own PC; it is not a public website. The first time you run Node-RED, Windows Firewall may ask whether Node.js can communicate on your network. For local-only use you can decline; allow private networks only if you want other devices on your home network to open the editor.
4. Test the editor with a first flow
- Drag an Inject node onto the workspace.
- Drag a Debug node onto the workspace.
- Connect Inject to Debug.
- Click Deploy.
- Open the Debug sidebar and click the Inject node’s small button.
A timestamp or configured payload should appear in Debug. This confirms that the editor, runtime and a basic flow are working. You do not need an ESP32 or MQTT broker for this first test.
5. Stop and restart Node-RED
To stop a foreground Node-RED process, return to the terminal where it is running and press Ctrl+C. Start it again later by running node-red. If you close the terminal, Node-RED stops too.
Your flows and settings are stored in the .node-red folder inside your user profile, usually C:\Users\YOUR-NAME\.node-red. Back up this folder before upgrading Node-RED or moving to another PC.
Start Node-RED automatically (optional)
The standard npm installation does not create a Windows service, so Node-RED will not start by itself after a reboot. For a learning setup, the simplest option is Task Scheduler:
- Open Task Scheduler and choose Create Task.
- On the Triggers tab, add a trigger that begins the task At log on for your user.
- On the Actions tab, choose Start a program, set the program to
cmd.exeand the arguments to/c node-red. - Save the task, sign out and back in, then open
http://localhost:1880to confirm that the editor loads.
A console window stays open while Node-RED runs; closing it stops Node-RED. For an always-on setup, a Raspberry Pi is usually a better home for Node-RED. See our Raspberry Pi 5 install guide.
Keep your local editor secure
A local learning setup at localhost:1880 is appropriate for initial testing. Do not expose the Node-RED editor directly to the internet or assume that the editor has login protection by default. Before allowing access from other devices, configure authentication, network restrictions and HTTPS where appropriate, and review the official Node-RED security guidance. Keep broker passwords, API tokens and private configuration out of screenshots and exported flows.
Troubleshooting
node or npm is not recognized: install Node.js, reopen PowerShell and recheck PATH.
node-red is not recognized after installation: confirm npm’s global package directory is on PATH, then reopen the terminal. Run npm list -g --depth=0 to see whether Node-RED is installed globally.
The browser cannot open localhost:1880: check that the Node-RED terminal is still running and look for its startup or error messages. Verify that the editor is using port 1880 and that another process has not taken the port.
Port 1880 is already in use: run netstat -ano | findstr :1880 to find the process ID using the port, and identify that process before stopping anything; it may be another Node-RED instance.
A package installation fails: read the first actual npm error, verify Node.js/npm versions and network access, and avoid blindly deleting npm folders or changing PowerShell execution policy.
Frequently asked questions
Do I need to install Node.js before Node-RED?
Yes. Node-RED is an npm package, so Node.js and npm must be installed first.
Is Node-RED free?
Yes. Node-RED is open-source software.
How do I update Node-RED on Windows?
Stop the running instance, then run npm install -g node-red@latest in PowerShell. Back up your .node-red folder first.
How do I uninstall Node-RED?
Run npm uninstall -g node-red. Your flows stay in the .node-red folder until you delete that folder yourself.
Can I use Node-RED with an ESP32?
Yes. Node-RED talks to an ESP32 through MQTT or HTTP. See Control an ESP32 LED with Node-RED and MQTT for a complete example.
What to do next
- Control an ESP32 LED with Node-RED and MQTT
- Node-RED Tutorial for Beginners: Nodes, Flows & msg.payload
- Node-RED with MQTT: Connect Mosquitto, Publish & Subscribe
- Node-RED Dashboard 2.0: Install Buttons, Switches and Gauges
Official resources: Node-RED on Windows, Node-RED getting started and Node-RED security.
