@allanoricil/nrg-sentinel) and a pre-built Docker image (allanoricil/nrg-sentinel). Choose the path that matches your deployment.
- Local / Host
- Docker
Local / Host install
Install the package
Install Sentinel into your Node-RED user directory so that Node-RED auto-discovers it as a plugin:~/.node-red/node_modules/ for packages with a node-red.plugins field. Sentinel declares nrg-sentinel: plugin.js, so the sidebar panel and editor features load automatically on the next restart.Activate the preload guard
The plugin covers the Node-RED API surface (node isolation, Express routing, settings mutation, and so on). To also interceptrequire() calls for dangerous built-in modules, the preload must run before Node-RED’s first require().Set NODE_OPTIONS and start Node-RED:Make the preload permanent
Add the export to your shell profile so every new terminal session picks it up:NODE_OPTIONS in the [Service] environment block or an EnvironmentFile.The bin/node-red.js wrapper
Sentinel ships a wrapper binary (bin/node-red.js) that handles preload injection automatically. You do not need to use it for local installs — the NODE_OPTIONS approach above is the standard path — but understanding what it does explains the Docker entrypoint.The wrapper does two things before starting Node-RED:- Settings signature verification — if
NRG_SENTINEL_PUBLIC_KEYis set in the environment, it verifies the Ed25519 signature ofsettings.jsbefore Node-RED reads it. If the signature is missing or invalid, the process exits before any grants are loaded. - Preload injection — it prepends
--require preload.jstoNODE_OPTIONS, then spawns the realnode-redbinary.
node-red, the wrapper first searches for a co-installed copy (used in Docker, where both packages share /usr/src/nodered/node_modules/). If none is found, it falls back to the node-red command in PATH (the local install scenario).Build from source
To build the Docker image from the repository instead of pulling from Docker Hub:docker run commands from the Docker tab above.
Next steps
Quickstart
Configure your first capability grant and verify Sentinel is active
Capability reference
Every capability string, what it gates, and common grant patterns