ScriptsApr 23, 2026·3 min read

Node-RED — Low-Code Flow-Based Programming for Event-Driven Applications

A browser-based visual programming tool for wiring together hardware devices, APIs, and online services using a drag-and-drop flow editor.

Introduction

Node-RED is a flow-based programming tool originally developed by IBM for wiring together IoT devices, APIs, and online services. It provides a browser-based editor where you connect pre-built nodes into flows that process and route data in real time.

What Node-RED Does

  • Connects hardware devices, APIs, and cloud services using a visual drag-and-drop editor
  • Processes MQTT, HTTP, WebSocket, TCP, and serial data streams in real time
  • Deploys flows instantly from the browser without restarting the server
  • Extends functionality with over 4000 community-contributed node packages
  • Runs on Raspberry Pi, cloud servers, Docker, or any Node.js environment

Architecture Overview

Node-RED is built on Node.js and uses a single-threaded event loop. Flows are stored as JSON and executed by a runtime engine that manages message passing between nodes. The browser-based editor communicates with the runtime via a REST API. Custom nodes are npm packages that register inputs, outputs, and configuration UIs.

Self-Hosting & Configuration

  • Install via npm: npm install -g node-red or Docker: docker run -d -p 1880:1880 nodered/node-red
  • Configure settings in ~/.node-red/settings.js for security, HTTPS, and storage
  • Enable authentication with adminAuth to protect the editor
  • Set httpNodeAuth to require credentials for HTTP endpoints
  • Persist flows and context data to filesystem, Redis, or a database

Key Features

  • Visual flow editor with debug, inject, and function nodes built in
  • MQTT-native with first-class support for IoT protocols
  • Function nodes accept arbitrary JavaScript for custom logic
  • Subflow encapsulation for reusable flow components
  • Dashboard add-on for building live data visualization UIs

Comparison with Similar Tools

  • Huginn — Agent-based web monitoring; Node-RED is flow-based with strong IoT and hardware support
  • n8n — Modern workflow automation with a polished UI; Node-RED has a larger ecosystem of community nodes
  • Apache NiFi — Enterprise data flow routing; Node-RED is lighter and easier to get started with
  • Home Assistant — Home automation platform; Node-RED is a general-purpose flow engine often used alongside it
  • Pipedream — Cloud-native event processing; Node-RED is fully self-hosted and works offline

FAQ

Q: Can Node-RED handle production workloads? A: Yes. Many enterprises use Node-RED in production for IoT gateways, API integration, and data processing pipelines.

Q: How do I add new node types? A: Install nodes from the built-in palette manager or via npm: cd ~/.node-red && npm install node-red-contrib-<name>.

Q: Does Node-RED support version control? A: Flows are stored as JSON files. You can enable the projects feature to manage flows with Git directly from the editor.

Q: What hardware can Node-RED connect to? A: Any hardware with serial, GPIO, MQTT, or HTTP interfaces. Raspberry Pi GPIO nodes are included by default.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets