Node-RED is a low-code tool that lets you connect devices, APIs, and online services into workflows in your browser. Instead of writing code, you drag blocks (nodes) onto a workspace and connect them with lines to create a flow: a webhook comes in, Node-RED processes the data, then forwards a message, writes to a database, or switches on a device. Originally built for IoT, Node-RED is now often used for home automation, MQTT, small data pipelines, and connecting services without their own integration. In this guide, we’ll show you two ways to get started: the easy way with a One-Click App and a manual installation with Docker Compose. Then you’ll build your first flow and learn how to install extensions.
Node-RED also runs on a Raspberry Pi at home. A VPS is a good fit when:
- You want your flows to run around the clock, regardless of whether your computer or home router is turned on.
- You want to receive webhooks from the internet, for example from GitHub, an online shop, or a payment service. A static IP and domain make this much easier than running Node-RED behind a home internet connection.
- You want to connect online services, for example by regularly querying an API and sending the results through Telegram, email, or Discord.
- You want to collect data from multiple locations, such as measurements sent over MQTT or HTTP, and process them centrally.
- You prefer working visually rather than with scripts and want to be able to understand your workflows at a glance later on.
A VPS is less suitable if Node-RED needs to communicate directly with hardware, such as GPIO pins, USB drives, serial interfaces, or devices that are only accessible on your home network. That requires a device at your location. For pure workflow automation with lots of ready-made app integrations, n8n is another option, also available in the app catalog.
The fastest way to get Node-RED running is through your VPS’s One-Click Apps. The app is accessible directly over HTTPS with a domain and stores flows, credentials, and installed extensions in its own volume. You don’t need a reverse proxy or certificate.
- A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See Set Up One-Click Apps for instructions.
- At least 512 MB RAM and 1 vCPU core; 1 GB RAM, 2 vCPU cores, and 5 GB of free storage are recommended. Node-RED itself is lightweight, but resource usage increases with the number of flows and installed extensions.
- Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
- Search the app catalog for Node-RED and click Install app.
- Use a custom subdomain or zap.cloud is already selected, with a random name. Leave the option enabled or enter your own name, such as
flowsornodered. With a domain, the editor is accessible over HTTPS. - Under App configuration, you’ll see that two values are generated automatically: the username and password for the editor. You don’t need to enter anything. The app’s time zone is set to
Europe/Berlin. - Click Queue installation.
After a short time, Node-RED is ready. The app card displays the Login notice and the names of the variables containing your credentials.
Node-RED is installed with a protected editor. Without logging in, you can’t view or change flows, deploy them, or install extensions. The username and password are generated during installation:
- Click the gear icon on the app card and go to App environment.
- Under Automatically generated values, you’ll find
SERVICE_USER_NODERED(username, usuallyzapx) andSERVICE_PASSWORD_NODERED(password). Click the eye icon to show a value, or the icon next to it to copy it. - Open the app using the Access link. Node-RED displays its login page.
- Log in with the username and password shown in the App environment.
When you log in for the first time, Node-RED asks whether it can notify you about new versions. To do so, it sends anonymized data to the Node-RED team; your flows and user details are not included. You can accept or decline, and change the setting later in your user preferences. Next, a short tour of what’s new in Node-RED 5 starts. You can close it using the X.
Anyone logged in to the Node-RED editor can run commands in the container and read files using nodes such as exec or function. Treat your credentials like a server password: don’t share them, and don’t give access to the editor to anyone you wouldn’t trust with your server.
The login only protects the editor. Endpoints you create in a flow with the http in node are intentionally accessible without authentication at your domain, so other services can call them. In these flows, check for yourself whether a request is authorized, for example by using a secret value in the header or URL. Never pass unverified webhook requests on to exec or file nodes.
You don’t need custom settings for most flows. If you do want to change something, such as setting your own credential key (credentialSecret) or adding password protection for endpoints (httpNodeAuth), create a custom settings.js file in the /data data directory. The One-Click App loads this file at startup instead of the default settings. Connect to your VPS over SSH:
docker ps --format '{{.Names}}' | grep node-red
docker exec CONTAINER cp /usr/src/node-red/node_modules/node-red/settings.js /data/settings.js
docker cp CONTAINER:/data/settings.js /root/node-red-settings.js
nano /root/node-red-settings.js
docker cp /root/node-red-settings.js CONTAINER:/data/settings.js
Replace CONTAINER with the name shown in the first line. Then restart the app from its app card for the changes to take effect.
If your settings.js doesn’t contain an adminAuth section, the generated login from the App environment remains active. If you add your own adminAuth section, it takes precedence: only the users in your file will be able to log in, and the generated login will no longer work. A typo in the file will prevent Node-RED from starting. If this happens, check the app logs and correct the file.
To check whether an update is available for your installation, click the gear icon on the app card, select App update, and click Check for updates. If there’s a new version, install it using Apply update. The app uses the Node-RED 5.0 release series, so bug fixes in that series are applied automatically this way.
All flows, credentials from flows, settings, and installed extensions are stored in the app’s /data data directory. You can also export important flows from the editor as JSON files using the menu (three lines in the top-right corner) > Export. It’s quick and helpful if you only need to restore a single flow.
If you want to add Node-RED to an existing server environment or manage everything yourself, install it from the command line with Docker Compose. This uses the official Docker image; see the official Node-RED Docker guide for more information.
| Minimum | Recommended | |
|---|---|---|
| CPU | 1 vCPU core | 2 vCPU cores |
| RAM | 512 MB | 1 GB |
| Storage | 2 GB | 5 GB |
| Operating system | Debian 12/13 or Ubuntu 22.04/24.04 | Current LTS version |
You’ll also need root access over SSH, Docker with Docker Compose installed, and a domain pointing to your server’s IP address with an A record for HTTPS.
Only open SSH, HTTP, and HTTPS for the reverse proxy. Keep Node-RED’s port 1880 closed to external traffic; the editor will only be accessible over HTTPS later:
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
Ports published in Docker Compose with ports: are accessible from the internet even if ufw doesn’t allow them. That’s why you should bind Node-RED to 127.0.0.1, as shown below. If the Node-RED editor is open without a password, any visitor can run commands on your server. Automated scanners actively search for these instances.
Create a directory and create the docker-compose.yml file inside it:
mkdir -p /opt/node-red && cd /opt/node-red
nano docker-compose.yml
services:
node-red:
image: nodered/node-red:5.0
restart: unless-stopped
environment:
- TZ=Europe/Berlin
ports:
- "127.0.0.1:1880:1880"
volumes:
- node-red-data:/data
volumes:
node-red-data:
The most important lines:
nodered/node-red:5.0is the official image for the 5.0 release series. This gets you bug fixes without an unexpected jump to the next major version.127.0.0.1:1880:1880makes the editor accessible only from the server itself. You’ll access it externally through the reverse proxy later.node-red-data:/datais the data directory containing flows, settings (settings.js), and installed extensions.TZensures time values in flows and logs match your time zone.
Start Node-RED:
docker compose up -d
By default, Node-RED has no login. Set one up before making the editor accessible through a domain. First, generate a hash for your password:
docker compose exec node-red node-red admin hash-pw
Enter a long password after Password:. Node-RED will output a hash that starts with $2. Then open the settings file in the volume:
nano /var/lib/docker/volumes/node-red_node-red-data/_data/settings.js
The volume name starts with the directory name, which is node-red in this example. Run docker volume ls to see the exact name. Find the adminAuth section, remove the comment markers //, and enter your username and hash:
adminAuth: {
type: "credentials",
users: [{
username: "admin",
password: "HASH_AUS_DEM_VORHERIGEN_SCHRITT",
permissions: "*"
}]
},
Restart Node-RED for the setting to take effect:
docker compose restart
Node-RED encrypts passwords and tokens you enter in nodes in flows_cred.json. If you don’t configure this yourself, Node-RED generates the key and saves it in .config.runtime.json in the data directory. To manage the key yourself, set credentialSecret in settings.js. Don’t change it later, or Node-RED won’t be able to read saved credentials.
Before setting up the reverse proxy, access the editor from your computer through an SSH tunnel:
ssh -L 1880:127.0.0.1:1880 root@SERVER_IP
Then open http://localhost:1880 in your browser and log in with the username and password from adminAuth. If you see the editor without logging in, adminAuth is still commented out or Node-RED hasn’t been restarted.
To access Node-RED through a domain, put a reverse proxy such as nginx in front of it. The editor keeps a WebSocket connection open, so the proxy needs the upgrade headers. Here’s a suitable server block:
server {
listen 80;
server_name nodered.example.com;
location / {
proxy_pass http://127.0.0.1:1880;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 3600;
}
}
See Set up a reverse proxy for instructions on configuring nginx, and use Let's Encrypt to get a certificate. Without the upgrade headers, the editor loads but repeatedly displays “Lost connection to server.”
Everything important is stored in the /data volume. For a full backup, briefly stop Node-RED and archive the volume:
cd /opt/node-red
docker compose stop
tar czf /root/node-red-backup-$(date +%F).tar.gz -C /var/lib/docker/volumes/node-red_node-red-data/_data .
docker compose start
The key files are flows.json (your flows), flows_cred.json (encrypted credentials from nodes), .config.runtime.json (the automatically generated key), settings.js, and package.json with the list of your extensions. If you back up flows_cred.json without the matching key, you’ll have to re-enter all passwords in the nodes after restoring.
Before updating, read the release notes and back up the volume. Then run:
cd /opt/node-red
docker compose pull
docker compose up -d
This gets you the latest version in the 5.0 series. To move to a new major version, change the tag in docker-compose.yml. Then check under Manage palette to see whether any installed extensions need updating.
Regardless of which installation method you chose, you’ll see your flows in the top left of the editor, with the palette of available nodes below. The workspace is in the middle, and the sidebar with information and debug messages is on the right.
- Drag an http in node onto the workspace. Double-click it and set the method to
POSTand the URL to/hook/test. - Drag a debug node next to it and connect the two.
- Add an http response node and connect it to http in as well, so the caller gets a response.
- Click Deploy in the top right.
- Call the endpoint. For the One-Click App, use your domain:
curl -X POST -H "Content-Type: application/json" -d '{"temp":21.5}' https://nodered.example.com/hook/test
The received message will appear in the debug messages on the right. From here, you can add more nodes, such as switch for conditions or change to transform the data.
Install additional nodes in the editor by opening the menu (three lines in the top-right corner) > Manage palette > Install. Popular extensions include:
@flowfuse/node-red-dashboardfor browser dashboards with charts, switches, and displays,node-red-contrib-home-assistant-websocketfor connecting to Home Assistant,- nodes for databases such as InfluxDB, MySQL, or PostgreSQL.
Extensions are stored in the data directory and remain available after updates. Only install packages that are maintained and that you need, since every extension runs with the same permissions as Node-RED.
The mqtt in and mqtt out nodes are included by default. To use sensors and devices, you’ll also need an MQTT broker such as Mosquitto, either on the same server or somewhere else. Enter the broker’s address, port, and credentials in the MQTT node, then subscribe to a topic, such as haus/wohnzimmer/temperatur.
- No local hardware: A VPS doesn’t have GPIO pins, USB devices, or serial devices. You can only reach devices on your home network if they send their data to the internet themselves, for example over MQTT, or if you connect through a VPN.
- Git-based projects are disabled: The Projects feature is disabled by default in the Docker image. Back up flows using the volume or Export.
With Node-RED, you can connect services, webhooks, and devices into workflows without writing much code, and run them around the clock on your VPS. The fastest way to get started is with the One-Click App: a domain, HTTPS, and a protected editor are ready after just a few clicks. If you want to manage everything yourself, use the manual Docker Compose installation. In that case, make sure to protect the editor with adminAuth before making it accessible from the internet.
