@nr-connect/node-red 1.0.6

Zero-config remote access, FlowFuse Dashboard 2.0 multi-user authentication & page-level RBAC, public webhooks, and push notifications for Node-RED

npm install @nr-connect/node-red

NR Connect — Secure remote access & Dashboard 2.0 permissions for self-hosted Node-RED

@nr-connect/node-red — NR Connect for Node-RED

Zero-config remote access, FlowFuse Dashboard 2.0 multi-user authentication & page-level RBAC, public webhooks, and push notifications for self-hosted Node-RED (>= 3.0.0).

Connect your local Node-RED in 60 seconds with zero edits to settings.js, zero port-forwarding, and zero reverse-proxy maintenance. Visit NR Connect for Node-RED to get started free or explore Dashboard 2.0 authentication.


Why @nr-connect/node-red?

Exposing a self-hosted Node-RED instance usually means choosing between an all-or-nothing VPN or exposing your entire Flow Editor (:1880) alongside your dashboard. NR Connect gives self-hosted Node-RED split-perimeter security right from the Palette Manager:

Capability Plain Reverse Proxy / VPN @nr-connect/node-red
Remote HTTPS & WebSockets Manual DNS, certs & proxy rules Turnkey — paste one connection code in the Node-RED sidebar
Editor vs. Dashboard Split Same port (:1880); anyone on the network reaches /red Split-Perimeter RBAC — Admin gets Flow Editor + Dashboard; Operator is confined to /dashboard
Dashboard 2.0 Page Permissions All users see every page & widget Per-User Page Filtering — restricts _setup, Socket.IO ui-config, live broadcasts, and widget actions per ui-page
User Identity in Flows (msg._client.user) Anonymous or static basic auth Signed User Identity — automatically populates msg._client.user (userId, email, name, role) on Dashboard 2.0 events
Webhooks (HTTP In nodes) Must expose full Node-RED server Granular Public Webhook/API Routes — expose specific /webhook/* paths with optional Bearer token verification
Push Notifications Requires 3rd-party apps or API keys Native Web Push — built-in nrc notify node & nrc profile Dashboard 2.0 widget

60-Second Quickstart

1. Install from the Node-RED Palette Manager

  1. In the Node-RED Editor, open the top-right menu -> Manage palette -> Install.
  2. Search for @nr-connect/node-red and click Install.
  3. (Optional CLI install):
    cd ~/.node-red
    npm install @nr-connect/node-red
    

2. Paste Your Connection Code

  1. Sign in to app.nr-connect.com and click Add instance to generate your connection code (NR_CONNECT_TOKEN).
  2. In the Node-RED Editor sidebar, open the NR Connect tab.
  3. Paste your connection code and click Connect.

That's it! The plugin automatically downloads and supervises the outbound connector binary in <userDir>/bin/, discovers your FlowFuse Dashboard 2.0 ui-page nodes, and brings your secure HTTPS address online.

Try the Built-in Example Flow: In Node-RED, open Menu -> Import -> Examples -> @nr-connect/node-red -> starter-demo for a ready-to-run multi-page Dashboard 2.0 layout demonstrating msg._client.user, role-based controls, and push notifications.


Zero to Secure Remote Access

Install NR Connect, connect your Node-RED, and open your dashboard on a phone

Install, connect, and access your dashboard anywhere — click the animation to watch the HD demo.

Node-RED Editor Sidebar & Dashboard 2.0 Profile Widget

Node-RED Editor Sidebar Dashboard 2.0 nrc profile App-Bar Menu
NR Connect sidebar tab inside the Node-RED Editor showing connection status, secure URL, QR code, and discovered Dashboard 2.0 pages Dashboard 2.0 nrc profile app-bar menu showing user role badge, push notifications toggle, and sign out

Core Features & Included Nodes

1. Runtime Plugin (Zero Flow Nodes Required)

  • Automatic Connector Setup & Supervision: Downloads and SHA-256 verifies the platform-specific NR Connect connector into <userDir>/bin/ on startup if missing and supervises the outbound connection automatically.
  • Signed Request Verification: Verifies cryptographically signed NR Connect identity and page-permission headers on remote requests within a +/- 2-minute replay window.
  • FlowFuse Dashboard 2.0 Page-Level RBAC:
    • Automatically discovers ui-page nodes on flows:started and syncs them with NR Connect on deploy and on periodic check-ins (every 15 minutes by default).
    • Enforces page-level access rules across FlowFuse Dashboard 2.0 Socket.IO connections (ui-config, live msg-input / widget-sync / widget-load broadcasts, and incoming widget-action / widget-change / widget-send / widget-load events) as well as _setup and _debug store endpoints.
    • Registers node-red-dashboard-2 auth hooks (nr-connect-d2-auth) to populate msg._client.user on incoming widget and connection events.
  • NR Connect Editor Sidebar: Live RED.comms status pill, last check-in timestamp with Check in now, one-click Copy / Open for your secure URL, Require secure access state, discovered Dashboard pages, and one-click Copy diagnostics.
  • Require Secure Access (Portal-Managed): When enabled in your instance settings, direct LAN browser navigation to port 1880 redirects to your secure HTTPS address and unsigned direct requests across RED.httpNode, RED.httpAdmin, and RED.server WebSocket upgrade connections are blocked (while preserving 127.0.0.1 loopback and .nr-connect-unlock recovery).

2. Dashboard 2.0 msg._client.user Injection

When a signed-in user interacts with any FlowFuse Dashboard 2.0 widget through NR Connect, the plugin populates msg._client.user on Socket.IO events:

{
  "userId": "user_123",
  "email": "[email protected]",
  "name": "Operator",
  "role": "operator"
}

Use a standard Node-RED switch or function node to audit who clicked a button or block non-admin writes:

// Example inside a Node-RED function node
if (msg._client?.user?.role !== "admin") {
    node.warn(`Blocked write attempt by ${msg._client?.user?.email}`);
    return null;
}
return msg;

3. Dashboard 2.0 Profile & Push Widget (ui-nr-connect-profile)

Found in the dashboard 2 palette category as nrc profile, this widget displays the signed-in NR Connect user (name, email, role badge, and profile photo with initials fallback), an integrated Push Notifications toggle, and a Sign out button:

  • Two Placement Modes:
    • In group: Renders a compact profile card inside any Dashboard 2.0 ui-group.
    • App bar (top-right): Renders an avatar menu button in Dashboard 2.0's #app-bar-actions slot across every page (requires the dashboard title bar to be visible).
  • Per-User Identity Endpoint (GET /{basePath}/_nrc/me): Fetches the current user's profile from /dashboard/_nrc/me (or /ui/_nrc/me) with Cache-Control: no-store. Direct local/LAN sessions return { user: null, local: true, signOutBaseUrl: null } and render a neutral "Local access" state.
  • Integrated Web Push Toggle: Signed-in users can subscribe or unsubscribe their browser/mobile PWA to OS push notifications in one click. Toggle and foreground events (push, push_subscribed, push_unsubscribed) emit on the node's output port.
  • Clean Sign Out: Unregisters active browser push subscriptions and navigates to the portal's /signout?redirect=<dashboard url> endpoint.

4. Push Notification Node (nr-connect-notify)

Found in the network palette category as nrc notify, this node sends targeted Web Push notifications to users subscribed via your Dashboard 2.0 instance:

  • Dynamic Targeting: Send to All instance members, Admins & owner only (target: "admins"), or specific Email addresses (emails), optionally combined with a Dashboard 2.0 Page Scope (pageId—restricts delivery to users permitted to view that page and opens it on click).
  • Typed Inputs, Overrides & Output: Configure title and body via str, msg, flow, or global properties (blank title falls back to msg.topic, then "Node-RED Alert"). Override per message via msg.pageId, msg.recipients, or msg.notification (title, body, pageId, target, emails, url, tag, icon, image, urgency, requireInteraction, ttlSeconds, data). Delivery counts are attached to the output message in msg.pushResult.

Configuration Options

Option A: NR Connect Sidebar (Recommended)

  1. Create an instance in the NR Connect Portal to receive a connection code (NR_CONNECT_TOKEN).
  2. Open the NR Connect tab in the Node-RED Editor sidebar.
  3. Paste your connection code and click Connect. The plugin verifies the code with the portal before saving <userDir>/.nr-connect.json (0600), starts the connector, and syncs discovered ui-page nodes.
  4. Require secure access is managed from your instance settings in the NR Connect Portal and updates in Node-RED on the next check-in (every 15 minutes by default, or immediately via Check in now).
  5. To switch codes or remove the connection, use Use a different code or Disconnect in the sidebar footer. Disconnecting stops the connector, deletes <userDir>/.nr-connect.json, and turns off Require secure access immediately.

Option B: Environment Variables (Headless / Docker / Balena)

For stateless or containerized deployments, set:

NR_CONNECT_TOKEN=<your-connection-code>
NR_CONNECT_REQUIRE_SECURE_ACCESS=true   # optional initial setting before portal sync overrides it

When NR_CONNECT_TOKEN is set in the environment, the NR Connect sidebar displays "This connection is set by the server environment.", hides Disconnect and Use a different code, and admin connect/disconnect endpoints return 409. Portal check-ins still refresh requireSecureAccess in memory.


Local Recovery Escape Hatch (.nr-connect-unlock)

When Require secure access (requireSecureAccess) is enabled in NR Connect, direct browser requests to port 1880 redirect to your secure address and unsigned API/WebSocket requests receive 403 Forbidden. Two built-in escape hatches guarantee you can never lock yourself out locally:

  1. Loopback Access: Requests originating from 127.0.0.1, ::1, or ::ffff:127.0.0.1 (e.g., a local browser on the host or SSH port-forwarding ssh -L 1880:127.0.0.1:1880 pi@host) are always permitted.
  2. Unlock Sentinel File: Creating an empty .nr-connect-unlock file inside your Node-RED userDir (for example touch ~/.node-red/.nr-connect-unlock) immediately bypasses direct-access restrictions without restarting Node-RED. Remove the file once recovery is complete.

Deployment Environments (Linux, Raspberry Pi, Docker, LXC)

  • Requirements: Node.js >=18.0.0, outbound HTTPS (TCP 443) and connector egress (UDP/TCP 7844), NTP-synced clock (+/- 2-minute signature replay window), and Node-RED listening over HTTP on 127.0.0.1:1880 (default; configurable in Portal instance settings).
  • Linux & Raspberry Pi: Supports x64, arm64, arm, and ia32. Runs without root or systemd; downloads a SHA-256 verified connector binary to <userDir>/bin/ if not pre-installed on the host.
  • Docker: Pull our pre-built multi-arch image (ghcr.io/nr-connect/node-red:latest — see the Docker setup & auditable Dockerfile), or mount userDir (/data) on stock nodered/node-red with NR_CONNECT_TOKEN for stateless containers. Note that host requests over -p 1880:1880 arrive via the Docker bridge IP (not 127.0.0.1), so requireSecureAccess will redirect or block them unless .nr-connect-unlock is present.
  • Proxmox LXC: Works out of the box in unprivileged LXC containers without CAP_NET_ADMIN or TUN/TAP devices.

Updates (Plugin & Connector)

  • Plugin Updates: Heartbeat check-ins report the installed pluginVersion and receive latest / minimum plugin advisories. When an update is available, the NR Connect sidebar and Portal Instance page notify you to update via Manage palette (or container image rebuild) and restart Node-RED.
  • Connector Updates:
    • Managed (<userDir>/bin/): Downloads are verified against pinned SHA-256 digests and smoke-tested in a staging directory before stopping and atomically swapping the running binary. Update anytime via the Update connector button in the NR Connect sidebar, or set NR_CONNECT_AUTO_UPDATE_CONNECTOR=true for automatic background updates (required updates below minimum also auto-apply).
    • Host-managed (PATH): When the connector binary is pre-installed by the host or container image, the plugin never mutates it and displays a host-managed update notice instead.

Security & Build Provenance

  • npm Package (@nr-connect/node-red): MIT-licensed and published as plain, unminified JavaScript via GitHub Actions Trusted Publishing (OIDC) with Sigstore/npm provenance. Inspect the npm provenance ledger or verify locally with npm audit signatures.
  • Docker Image (ghcr.io/nr-connect/node-red): Published with SLSA build provenance, an attached SBOM, and Trivy vulnerability scanning. Inspect GitHub build attestations or verify with gh attestation verify oci://ghcr.io/nr-connect/node-red:latest -o nr-connect.
  • Full Security Architecture: Review trust boundaries, request signing, Dashboard 2.0 server-side filtering, and supply-chain verification in Security architecture and transparency.

Documentation & Guides


Support & Community

  • Diagnostics & Troubleshooting: Visit Diagnostics & Support or browse the NR Connect Documentation for guides on Docker networking, Require secure access recovery, NTP clock sync, and connector updates.
  • Diagnostics Export: Open the NR Connect sidebar tab in Node-RED and click Copy diagnostics to copy a redacted JSON block (Node.js, Node-RED, plugin, and connector versions — zero connection codes or secrets) when filing a bug report.
  • GitHub & Community: Report bugs or request features in GitHub Issues, ask setup questions in GitHub Discussions, or review our Security Policy for private vulnerability disclosures.
  • Email & Portal Support: Open the Support & docs link in the sidebar footer or contact [email protected].

Node Info

Version: 1.0.6
Updated 17 hours ago
License: MIT
Rating: not yet rated

Categories

Actions

Rate:

Downloads

732 in the last week

Nodes

  • nr-connect-notify
  • ui-nr-connect-profile

Keywords

  • node-red
  • node-red-plugin
  • node-red-remote-access
  • nr-connect
  • remote-access
  • dashboard-2
  • dashboard-2-auth
  • node-red-dashboard-2
  • @flowfuse/node-red-dashboard
  • flowfuse
  • dashboard
  • authentication
  • auth
  • rbac
  • multi-user
  • permissions
  • security
  • webhook
  • notifications
  • push-notifications
  • web-push
  • iiot

Maintainers