Docker and headless setup
Run Node-RED in Docker, Proxmox LXC, or headless hosts with environment-managed connections and persistent storage.
On this page
Run with Docker
Our pre-built multi-arch (amd64 / arm64) image ghcr.io/nr-connect/node-red:latest extends the official Node-RED image with @nr-connect/node-red and the connector already installed. Switch to the Docker tab when creating an instance—or under Instance → Settings → Connection & deployment—to copy prefilled docker run or Docker Compose snippets tailored to your instance's subdomain, port, and security settings.
Generate a docker run or Compose command
Toggle docker run or Docker Compose, and optionally include FlowFuse Dashboard 2.0 or the starter demo flow on first boot:
docker run -d --name nodered --restart unless-stopped -e NR_CONNECT_TOKEN="paste_your_connection_code_here" -v nodered_data:/data ghcr.io/nr-connect/node-red:latestRuns Node-RED with the plugin and connector pre-installed. Treat this command like a password—it includes your connection code.
After starting the container, check the portal for Online status and open your remote editor or dashboard URL. To connect interactively from the sidebar instead, omit NR_CONNECT_TOKEN and add -p 127.0.0.1:1880:1880.
Already using the stock nodered/node-red:latest image? Install @nr-connect/node-red from Manage palette, or install it into /usr/src/node-red in your own Dockerfile so mounting /data never hides the plugin.
Image transparency & verification
The complete Dockerfile, wrapper entrypoint, and public build workflow for ghcr.io/nr-connect/node-red are openly auditable:
- Built directly
FROM docker.io/nodered/node-red:latestwith the exact upstream digest stamped inorg.opencontainers.image.base.digest. - Runs as non-root
USER node-redand never modifies Node-RED'ssettings.jsor core runtime. - Adds only
@nr-connect/node-red(installed from public npm, 0 runtime dependencies), the SHA-256-verified connector binary in/usr/local/bin/, and a 36-line entrypoint wrapper for optional Dashboard 2.0 / starter-flow bootstrapping. - Published with SLSA build provenance, an SBOM, and automated vulnerability scanning; rebuilt daily when
nodered/node-red:latestupdates.
Verify that an image came unmodified from our public workflow before running it:
gh attestation verify oci://ghcr.io/nr-connect/node-red:latest -o nr-connectHeadless setup (environment variables)
Passing NR_CONNECT_TOKEN works anywhere Node-RED runs without opening the local editor—Docker, Kubernetes, Balena, Proxmox LXC, or systemd:
Scroll sideways to view all columns.
| Variable | Purpose |
|---|---|
| NR_CONNECT_TOKEN | Instance connection code. Connects automatically on startup without writing .nr-connect.json. |
| NR_CONNECT_REQUIRE_SECURE_ACCESS | Optional. Set to true to enforce Require secure access immediately on boot before the first portal check-in. |
| NR_CONNECT_AUTO_UPDATE_CONNECTOR | Optional. Set to true to auto-update a managed connector in /data/bin/. Ignored by ghcr.io/nr-connect/node-red. |
| NR_CONNECT_INSTALL_DASHBOARD | Docker image only. Set to true to install @flowfuse/node-red-dashboard into /data on first boot if not already present. |
| NR_CONNECT_STARTER_FLOW | Docker image only. Set to true to install Dashboard 2.0 and seed the starter demo into /data/flows.json on first boot (never overwrites existing flows). |
Environment-managed mode
NR_CONNECT_TOKEN is set, the sidebar shows a read-only notice and hides Disconnect and Use a different code. Portal check-ins still sync settings like Require secure access. To replace the connection code, update the environment variable and restart Node-RED. See Environment variables for the full reference.Updates and storage
- Updating the image: Pull
ghcr.io/nr-connect/node-red:latestand recreate the container (docker compose pull && docker compose up -d) to pick up new Node-RED, plugin, and connector releases together. - Sidebar-managed connections: If you connect via the sidebar instead of
NR_CONNECT_TOKEN, mount/dataon a persistent volume so/data/.nr-connect.jsonsurvives container recreations.
Keep connection codes out of Git
docker-compose.yml or a Dockerfile. Keep NR_CONNECT_TOKEN in a gitignored .env file or your orchestrator's secret manager.Docker networking, recovery, and Proxmox LXC
- No published port required for headless setups: When
NR_CONNECT_TOKENis configured, you do not need to publish port1880to your LAN. If you publish it for local access or sidebar setup, bind to loopback (127.0.0.1:1880:1880). - Use the container port, not the host port: Because the connector runs inside the container alongside Node-RED, Instance → Settings → Advanced settings → Local Node-RED port must match Node-RED's internal container port (default
1880), even if you map a different host port such as1881:1880. - Docker bridge + Require secure access: Host requests through
-p 1880:1880arrive from the Docker bridge gateway IP (for example172.17.0.1), not127.0.0.1, so Require secure access redirects or blocks them with403 Forbidden. Open yourhttps://your-instance.nr-connect.comaddress, or create the temporary unlock file inside the container for local recovery:
# Temporarily allow direct local access without restarting Node-RED
docker compose exec nodered touch /data/.nr-connect-unlock
# Remove the unlock file once recovery is complete
docker compose exec nodered rm /data/.nr-connect-unlockProxmox LXC containers
CAP_NET_ADMIN, TUN/TAP devices, or root privileges required. Make sure the host clock is synchronized with NTP so signed remote requests stay within the clock-skew window.