Skip to main content
Self-hosting Node-RED3 min read

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
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:latest

Runs 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:latest with the exact upstream digest stamped in org.opencontainers.image.base.digest.
  • Runs as non-root USER node-red and never modifies Node-RED's settings.js or 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:latest updates.

Verify that an image came unmodified from our public workflow before running it:

bash
gh attestation verify oci://ghcr.io/nr-connect/node-red:latest -o nr-connect

Headless 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.

VariablePurpose
NR_CONNECT_TOKENInstance connection code. Connects automatically on startup without writing .nr-connect.json.
NR_CONNECT_REQUIRE_SECURE_ACCESSOptional. Set to true to enforce Require secure access immediately on boot before the first portal check-in.
NR_CONNECT_AUTO_UPDATE_CONNECTOROptional. Set to true to auto-update a managed connector in /data/bin/. Ignored by ghcr.io/nr-connect/node-red.
NR_CONNECT_INSTALL_DASHBOARDDocker image only. Set to true to install @flowfuse/node-red-dashboard into /data on first boot if not already present.
NR_CONNECT_STARTER_FLOWDocker 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

When 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:latest and 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 /data on a persistent volume so /data/.nr-connect.json survives container recreations.

Keep connection codes out of Git

Never commit a real connection code into 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_TOKEN is configured, you do not need to publish port 1880 to 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 as 1881:1880.
  • Docker bridge + Require secure access: Host requests through -p 1880:1880 arrive from the Docker bridge gateway IP (for example 172.17.0.1), not 127.0.0.1, so Require secure access redirects or blocks them with 403 Forbidden. Open your https://your-instance.nr-connect.com address, or create the temporary unlock file inside the container for local recovery:
Temporary local recovery inside Dockerbash
# 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-unlock

Proxmox LXC containers

NR Connect works out of the box in unprivileged Proxmox LXC containers with no 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.