The Node-RED project has recently unveiled a major new release, version 4.0, which introduces a host of enhancements focused on improving the development experience, collaboration and long-term flow maintenance.
This article provides a detailed look at the key changes that make this new version a significant upgrade for developers and teams alike.
Before diving into the new features, here are the steps for a clean installation or upgrade.
Installing or Upgrading to Node-RED 4.0
To get started with the latest version of Node-RED, you can use the Node Package Manager (NPM). From a SSH session, run the following command to perform a global installation:
npm install -g --unsafe-perm node-red
BashThis command installs Node-RED for all users on your system. If you are updating an existing installation, NPM will handle the upgrade process, pulling down the latest version.
Once the installation is complete, you can start Node-RED by simply running the node-red command from your session:
node-red
BashThis will launch the Node-RED runtime, and you can then access the editor in your web browser, typically at http://your-ibm-i:1880
Check out the figure below that show these commands being run.

What’s Changed?
Let us take a quick look at the new features and enhancements we have in this version.
Update Notifications
As soon as we fire up a browser and point it to our Node-RED server, we see the ‘Enable Update Notifications’
Node-RED version 4 introduces a new update notification feature designed to help users keep their installations current.
This feature works in two main ways:
- Node-RED Core Updates: When a new version of Node-RED itself is available, a notification will appear in the editor. This is part of an optional feature that, if enabled, sends anonymous usage information back to the Node-RED project (like the version of Node-RED and the operating system). This helps the project team understand usage patterns and improve the software.
- Palette Node Updates: The system will also notify you when updates are available for the nodes in your palette. This is handled by the Palette Manager and is enabled by default. A progress widget in the editor footer will show when a palette installation is running and you can click on it to see the event log.
Additionally, the Palette Manager has been updated to provide more information, such as marking nodes that have been deprecated by their authors and sorting nodes by download count to highlight popular choices. When exporting a flow, it now includes metadata about the nodes used, which can help a user importing the flow know what modules they need to install. The system is designed to notify you of available updates, but it does not automatically install them, leaving that choice to the user.

If you take this option, and why shouldn’t you, notifications are shown in the bottom right toolbar.

Flow Documentation
This is a nice touch! It allows you to see which nodes have additional documentation held within them.
Node-RED’s Flow Documentation feature is a significant improvement for making flows more understandable and maintainable. This feature is designed to address a common problem in visual programming: while the flow itself shows the logic, the purpose of specific nodes or sections can be unclear to others (or even to the original creator after some time, that is true, believe me!).
The core of the feature is a new icon that appears on any node that has documentation added to its “Description” field in the edit dialog. When a user clicks on this icon, it opens the node’s edit dialog, allowing them to view the detailed documentation. This provides a clear and intuitive way to access important information about how a node functions within a larger flow.
This is a step beyond the existing practice of using the Info sidebar, which still shows the node’s description when selected. The new icon serves as a visual cue, making it immediately obvious which nodes have been documented. This helps to promote the best practice of documenting key parts of a flow, leading to more readable and reusable code.
In addition to individual node documentation, other methods for documenting flows in Node-RED include:
- Using Groups: Grouping related nodes together helps to visually segment the flow and identify distinct logical sections
- Sub-flows: Moving commonly used or complex parts of a flow into sub-flows reduces visual clutter and promotes reusability
- Meaningful Naming: Giving nodes, tabs, and sub-flows clear and descriptive names is crucial for understanding their purpose
Ultimately, the Flow Documentation feature makes it easier for developers to create well-documented flows, which is essential for collaborative projects and for maintaining flows over time.

Palette Manager Improvements
Node-RED’s Palette Manager, the tool for managing the nodes available in the editor, has received several improvements in version 4 to enhance usability and help developers maintain their flows. Here are the key updates:
- Deprecated Node Identification: The Palette Manager now clearly identifies nodes that have been deprecated by their authors. This helps users avoid starting new projects with nodes that are no longer supported and encourages them to migrate existing flows to newer, maintained alternatives.
- Sorting by Download Count: When searching for new nodes to install, the Palette Manager can now sort results by download count. This makes it easier to find popular and widely used nodes, which are often more reliable and well-supported by the community.
- Links to Node Documentation: To improve the discovery and understanding of a node, the Palette Manager now includes direct links to a node’s documentation. This provides a quick way to access information on how to use a node without leaving the editor.
- Improved Support for Plugins: The Palette Manager now lists installed plugins alongside the nodes themselves, making it easier to manage and update these additional components.
- Event Log Widget: A new event log widget appears in the editor’s footer when an installation or update is in progress. This provides a visible progress indicator and, when clicked, shows a detailed log of the events, giving users better insight into what the Palette Manager is doing.
- Metadata in Exports: A crucial improvement for sharing flows is that when you export a flow, the export file now includes metadata about the nodes used. This information can be used by a user importing the flow to see which modules need to be installed, preventing a common issue where a flow fails to work because of missing dependencies. The system will notify the user of these missing dependencies but will not automatically install them, leaving the user in control.

Installing Missing Modules
In the past, sharing flows in Node-RED could be a bit of a challenge, oh yes, because the exported flow file didn’t contain information about the external nodes it relied on.
This meant that when you imported a flow, you might see “unknown” nodes, and you’d have to figure out which modules were missing and install them manually.
Node-RED version 4 introduces a new feature to address this. Now, when you export a flow, it includes metadata about the custom modules used. This metadata is stored within a “global-config” node in the exported file.
When a user imports this flow, if any of the node types are not recognised, the editor can now use this metadata to inform the user about which modules they need to install. The system will provide a notification or a way to view the missing dependencies.
However, Node-RED does not automatically install the missing modules. The developers made a deliberate choice to leave this as a manual step for the user. This is an important security and control feature, as it ensures that the user is aware of what is being added to their system and can make an informed decision before installing new code.
This new feature significantly streamlines the process of sharing and reusing flows, making it much easier for both individuals and teams to work with Node-RED.

Node Updates
Node-RED’s core nodes and contributed nodes (from the community) are continually being improved. Version 4 brings several specific updates to existing nodes and new features that enhance how nodes are managed and used.
Updates to Specific Nodes
While the changes are extensive, here are some key examples of node updates in version 4:
- Improved CSV Node: The CSV node has been significantly overhauled to be more compliant with the RFC4180 standard. This helps it handle tricky edge cases and also makes it faster. A “legacy mode” is available for flows that rely on the old, non-standard behaviour.
- Enhanced Inject Node: The Inject node, a core tool for triggering flows, now offers more options for generating timestamps. In addition to the standard milliseconds since epoch, it can now generate timestamps in the ISO 8601 format or as a JavaScript Date object, reducing the need for additional function nodes to format dates.
- Better Sub-flow and Config Node Handling: A major improvement is the ability to customise configuration nodes within sub-flows. Previously, a sub-flow’s config nodes were locked, meaning all instances of the sub-flow would use the same configuration. Now, it’s possible to expose the choice of a config node in the sub-flow’s properties, allowing each instance to have a different configuration. This is particularly useful for things like setting different MQTT brokers or dashboard groups for each sub-flow instance.

Conclusion
Node-RED version 4 represents a significant leap forward in usability, maintainability, and collaboration. The new features collectively address many of the common pain points experienced by developers, particularly when working with complex flows or in team environments.
In essence, Node-RED version 4 solidifies its position as a powerful and user-friendly visual programming tool. The enhancements are not just about adding new features, but about creating a more robust, discoverable and collaborative environment that benefits both individual developers and the broader community.
Leave a Reply