sentinel key in settings.js. Some options can also be set via environment variables, which is useful when settings.js is mounted read-only (as in Docker deployments).
sentinel.allow
Maps npm package names to arrays of capability strings. Each key is a package name exactly as it appears in Sentinel identifies the calling package at runtime by walking the call stack and extracting the
node_modules/. The value is the list of capabilities that package is permitted to use.Every third-party node package needs at least registry:register to call RED.nodes.registerType() at startup. Without it, Sentinel blocks the call and Node-RED logs “Waiting for missing types” indefinitely.settings.js
node_modules/<package> segment from the nearest frame that does not belong to Node-RED or Sentinel itself.Node-RED’s own built-in nodes (
inject, debug, function, http request, etc.) live outside the userDir and are never gated by Sentinel. You only need grants for third-party packages installed into the userDir.sentinel.networkPolicy
Configures outbound network restrictions applied on top of capability grants.
An array of URL strings. When set, packages that hold the
network:http or network:fetch capability are further restricted to only reach URLs that start with one of the entries in this list. Requests to any other URL are blocked.settings.js
The
network:socket capability (raw TCP/UDP via net, tls, dgram) is not restricted by this allowlist. A package that only holds network:http cannot open raw sockets regardless of the allowlist.sentinel.license
A license key issued by NRG. Providing a key activates the tier associated with it and records the customer identifier in the Sentinel startup log.License keys are verified entirely on the local machine. No data is sent to any server during verification and no internet connection is required.If
settings.js
settings.js is mounted read-only (as in Docker deployments), use the NRG_SENTINEL_LICENSE environment variable instead.Environment variables
NRG_SENTINEL_PUBLIC_KEY
Absolute path to an Ed25519 public key file on disk. When set, the Sentinel bin wrapper reads this key and verifies the signature file at
<settingsPath>.sig before Node-RED starts. If the signature is absent or invalid, the process exits immediately.This variable is consumed by bin/node-red.js, not by the preload or plugin. It has no effect if you start Node-RED without the bin wrapper.NRG_SENTINEL_LICENSE
License key string. Equivalent to
sentinel.license in settings.js. Use this environment variable in containerised deployments where settings.js is mounted read-only and cannot be edited to add a key.NRG_SENTINEL_ALLOW_ESM
Escape hatch for ESM (ES module) packages. When set to any non-empty value, Sentinel relaxes the
Module._load restrictions that would otherwise block ESM imports during loading.NRG_SENTINEL_NO_PROTO_FREEZE
Opt-out from Layer 0 prototype hardening. When set to any non-empty value, Sentinel skips the
Object.preventExtensions() calls on built-in prototypes.NODE_OPTIONS
Standard Node.js environment variable. Set this to In the Docker image this is set automatically by the bin wrapper entrypoint. For local installs, add the export to your shell profile or systemd unit.
--require @allanoricil/nrg-sentinel/preload to activate the module-level interception guard before Node-RED starts.Without this flag, only the plugin guard (Node-RED API surface) is active. The preload guard (require() interception for fs, child_process, vm, worker_threads, etc.) will not run.Complete annotated example
Thissettings.js combines every Sentinel option:
settings.js