Deployment guide

Node-RED

Overview

Node-RED is a low-code, flow-based development tool for event-driven applications. Its browser-based editor lets you wire together hardware devices, APIs and online services from a palette of nodes, then deploy flows to its lightweight Node.js runtime in a single click. It is widely used for IoT integration, API orchestration, home and industrial automation, and rapid prototyping of event-driven logic.

The SecureAnyCloud image installs Node-RED 5.0.0 on Node.js 22 LTS and runs it as a dedicated systemd service bound to loopback. An nginx reverse proxy on port 80 protects the editor with HTTP Basic auth. All flows and settings persist on a dedicated Azure data disk, and a unique editor password is generated on the first boot of every VM.

What you get:

  • Node-RED 5.0.0 on Node.js 22 LTS, installed globally with npm
  • The browser flow editor and runtime, fronted by nginx on :80 with the editor websocket proxied
  • HTTP Basic auth with a per-VM password in a root-only file. The editor controls a runtime that can execute code, so the runtime is bound to loopback
  • A dedicated Azure data disk at /var/lib/node-red that holds flows, settings and palette nodes, separate from the OS disk and re-provisioned with every VM
  • node-red.service and nginx.service as systemd units, enabled and active
  • 24/7 SecureAnyCloud support

Prerequisites

Before you deploy this image, make sure you have an active Azure subscription, an SSH key pair, and a VNet and subnet in the target region.

Standard_B2ms (2 vCPU, 8 GiB RAM) is a good starting point. Scale up for large flows or many concurrent messages.

On the network security group, allow inbound 22/tcp from your management network and 80/tcp for the editor. For public exposure, front the editor with TLS as described in Enabling HTTPS.

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure portal, select Create a resource, and search the Marketplace for Node-RED by SecureAnyCloud. Select the listing, then select Create.

On the Basics tab, choose your subscription, resource group, region and size. Under Administrator account, select SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).

On the Disks tab, review the dedicated data disk. Then select Review + create, followed by Create.

Step 2 - Deploy from the Azure CLI

Create the VM from the SecureAnyCloud Node-RED image, then open port 80. Replace the values in angle brackets with your own.

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:node-red-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name node-red \
  --image sac1647283583153:node-red-ubuntu-24-04:default:latest \
  --size Standard_B2ms \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name node-red --port 80 --priority 1010

Step 3 - Connect to your VM

Connect over SSH as the administrator user you set at deploy time.

ssh azureuser@<vm-public-ip>

Step 4 - Confirm the services are running

Check that Node-RED and nginx are both active.

systemctl is-active node-red.service nginx.service

Both services report active. Node-RED takes a few seconds to start while the Node.js runtime loads the flow file.

Step 5 - Retrieve your editor password

The admin password is generated uniquely on the first boot of your VM and written to a root-only file. Read it as root.

sudo cat /root/node-red-credentials.txt

The file contains NODE_RED_ADMIN_USER (admin), NODE_RED_ADMIN_PASSWORD and the editor URL. Store the password somewhere safe.

Step 6 - Check the health endpoint

nginx serves an unauthenticated health endpoint for load balancers and probes.

curl -s http://localhost/health

The endpoint returns ok.

Step 7 - Open the flow editor

Browse to http://<vm-public-ip>/ and sign in as admin with the password from Step 5. The editor opens with the node palette on the left, the flow canvas in the centre, and the information and debug sidebars on the right.

Drag nodes from the palette onto the canvas, wire them together, and select Deploy to run your flow. Double-click any node to configure it. Function nodes let you transform messages with JavaScript.

The main menu gives you import and export, flow management and settings.

Step 8 - Confirm the runtime from the command line

The Node-RED runtime exposes a /settings endpoint behind the same Basic auth. Confirm that it is serving and reports its version.

curl -s -u admin:<NODE_RED_ADMIN_PASSWORD> http://localhost/settings | head -c 300; echo

The JSON response includes "version":"5.0.0" along with the runtime configuration.

Step 9 - Install extra palette nodes

Node-RED has a catalogue of thousands of community nodes for databases, messaging, cloud services, dashboards and protocols. Install them from the editor with Menu > Manage palette > Install, or from the command line into the user directory.

sudo -u node-red npm --prefix /var/lib/node-red install node-red-dashboard

After you install from the command line, restart Node-RED so that it loads the new nodes.

sudo systemctl restart node-red

Step 10 - Confirm flows live on the dedicated disk

Your flows, settings, credentials and installed nodes are stored on the dedicated Azure data disk, so they survive OS changes and can be resized independently. Check the mount with this command.

findmnt /var/lib/node-red

The mount is backed by a separate Azure data disk that is captured in the image and re-provisioned on every VM.

Enabling HTTPS

The nginx reverse proxy terminates plain HTTP on port 80. For public exposure, put a certificate in front of it. Add a DNS name for the VM, then either use the companion SecureAnyCloud nginx-ssl-certbot image as a TLS reverse proxy, or install certbot and extend the existing nginx site with a listen 443 ssl; server block.

Keep Node-RED itself bound to loopback, so the only public surface is the authenticated, TLS-terminated proxy. The proxy already forwards the websocket that the editor needs.

Maintenance

  • Flows: edit and deploy from the browser editor. The flow file is at /var/lib/node-red/flows.json.
  • Backups: snapshot the /var/lib/node-red data disk to back up flows, credentials and installed nodes.
  • Upgrades: run sudo npm install -g node-red@latest, then sudo systemctl restart node-red.
  • Security patches: unattended-upgrades remains enabled, so the OS continues to receive security updates automatically.

Support

SecureAnyCloud provides 24/7 expert support for this image. Contact us at sales@secureanycloud.com.

Deploy on Azure

Launch Node-RED on Ubuntu 24.04 LTS on Azure, with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure