Installation of Node-RED Dashboard on Ubuntu
A complete step-by-step guide to install Node-RED on Ubuntu, add the modern FlowFuse Dashboard package, start the service, open the dashboard, and solve common access problems.
“`Introduction
“`Node-RED is a powerful visual programming tool used for automation, IoT systems, MQTT projects, sensor monitoring, and dashboard creation. In this tutorial, we will install Node-RED on Ubuntu and add the modern dashboard package: @flowfuse/node-red-dashboard.
The old package node-red-dashboard is deprecated. For a new installation, it is better to use FlowFuse Dashboard, which provides modern dashboard nodes such as gauges, charts, buttons, text widgets, and templates.
Table of Contents
- Update Ubuntu
- Install useful dependencies
- Install Node-RED
- Start Node-RED manually
- Install FlowFuse Dashboard
- Restart Node-RED
- Enable Node-RED at startup
- Open the dashboard
- Create a simple test dashboard
- Allow port 1880 in the firewall
- Useful commands
- Troubleshooting
1. Update Ubuntu
“`First, update the package list and upgrade the system packages. This step is important because Node-RED and Node.js depend on updated system libraries.
sudo apt update
```
sudo apt upgrade -y
“`
2. Install Required Tools
“`Install useful tools required for compiling packages and downloading installation scripts.
sudo apt install -y build-essential git curl
| Package | Purpose |
|---|---|
| build-essential | Provides compiler tools needed by some Node.js packages. |
| git | Used to download and manage source code repositories. |
| curl | Used to download scripts and files from the terminal. |
3. Install Node-RED
“`Use the official Node-RED installation script for Debian and Ubuntu-based systems. This script installs or updates Node.js and Node-RED automatically.
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
During the installation, the script may ask if you want to continue installing or updating Node.js and Node-RED. Type:
y
4. Start Node-RED Manually
“`After installation, you can start Node-RED manually using this command:
node-red
When Node-RED starts successfully, open the editor in your browser:
http://localhost:1880
If you are connecting from another computer or phone on the same network, use the Ubuntu machine IP address:
http://ADRESSE_IP_UBUNTU:1880
To find the IP address of your Ubuntu machine, run:
hostname -I
“`
5. Install FlowFuse Dashboard
“`To install the modern Node-RED dashboard, go to the Node-RED user directory:
cd ~/.node-red
Now install the FlowFuse Dashboard package:
npm install @flowfuse/node-red-dashboard
6. Restart Node-RED
“`After installing the dashboard package, restart Node-RED so the new dashboard nodes appear inside the editor.
node-red-restart
If Node-RED is running as a systemd service, restart it with:
sudo systemctl restart nodered
To check the service status:
sudo systemctl status nodered
“`
7. Enable Node-RED at Ubuntu Startup
“`To make Node-RED start automatically when Ubuntu boots, enable the Node-RED service:
sudo systemctl enable nodered.service
Start the service manually if it is not already running:
sudo systemctl start nodered.service
8. Useful Node-RED Management Commands
“`Node-RED provides simple commands to start, stop, restart, and read logs.
| Command | Description |
|---|---|
| node-red-start | Start Node-RED. |
| node-red-stop | Stop Node-RED. |
| node-red-restart | Restart Node-RED. |
| node-red-log | Display Node-RED logs and errors. |
node-red-start
```
node-red-stop node-red-restart node-red-log
9. Open the Node-RED Dashboard
“`After restarting Node-RED, open the Node-RED editor:
http://ADRESSE_IP_UBUNTU:1880
In the left sidebar, you should see new dashboard nodes such as:
- ui-button
- ui-text
- ui-gauge
- ui-chart
- ui-template
The dashboard page is usually available at:
http://ADRESSE_IP_UBUNTU:1880/dashboard
“`
10. Create a Simple Dashboard Test
“`To verify that the dashboard works, create a very simple test flow.
- Add an inject node.
- Add a ui-text or ui-gauge node.
- Connect the inject node to the dashboard node.
- Double-click the dashboard node.
- Create a new Page and a new Group.
- Click Deploy.
- Open the dashboard URL in your browser.
http://ADRESSE_IP_UBUNTU:1880/dashboard
11. Allow Port 1880 in the Firewall
“`If you cannot access Node-RED from another PC or phone on the same network, the firewall may be blocking port 1880.
Allow Node-RED port 1880 using UFW:
sudo ufw allow 1880/tcp
```
sudo ufw reload
“`
Then try opening Node-RED again:
http://ADRESSE_IP_UBUNTU:1880
12. Quick Command Summary
“`Here is the complete list of essential commands used in this tutorial.
sudo apt update && sudo apt upgrade -y
```
sudo apt install -y build-essential git curl bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) cd ~/.node-red npm install @flowfuse/node-red-dashboard sudo systemctl enable nodered.service sudo systemctl restart nodered.service
13. Troubleshooting
“`| Problem | Solution |
|---|---|
| Dashboard nodes do not appear | Restart Node-RED and check logs using node-red-log. |
| Dashboard inaccessible from another device | Check the Ubuntu IP address using hostname -I and allow port 1880/tcp with UFW. |
| Node-RED does not start | Run sudo systemctl status nodered and node-red-log to read the errors. |
| npm install fails | Check internet connection, update Ubuntu, and make sure you are inside ~/.node-red. |
hostname -I
```
node-red-log sudo systemctl status nodered sudo ufw allow 1880/tcp sudo ufw reload
Final Result
“`After completing this tutorial, Node-RED and FlowFuse Dashboard should be installed and running on your Ubuntu machine.
| Node-RED Editor | http://ADRESSE_IP_UBUNTU:1880 |
|---|---|
| Dashboard Page | http://ADRESSE_IP_UBUNTU:1880/dashboard |
| Dashboard Package | @flowfuse/node-red-dashboard |
| Default Port | 1880 |
| Useful Log Command | node-red-log |

