NodeSentinel documentation
Security
Protect confidential data, agent access and privileged sources without granting unnecessary permissions.
Core rules
- Never commit
.envfiles, keys or host configurations. - Use at least twelve characters for the dashboard password and a unique strong key for each agent.
- Use HTTPS and WebSocket over TLS for all network access.
- Keep dashboard state and configuration files readable only by the service user.
- Do not expose agent ports unnecessarily. Push agents require no inbound port.
- Back up the state directory with encryption and test restoration.
Encrypted agent communication
Push agents authenticate with their agent name and X-Agent-Key. They verify the dashboard TLS certificate. wss:// is mandatory for remote connections; ws:// is accepted only for loopback connections.
The proxy between dashboard and agent must support WebSocket upgrades. Restrict the internal hop between proxy and dashboard as well, because keys and data are forwarded there.
Rotate keys
- Generate a new random key, for example with
openssl rand -base64 32. - Add it to the appropriate agent configuration in the dashboard.
- Restart the dashboard in a controlled manner.
- Update the agent and restart its service.
- Verify that no processes or logs still contain the old key.
Agent permissions
| Access | Purpose | Default |
|---|---|---|
| Read-only /proc | CPU, RAM and kernel metrics | On |
| Read-only / | Host filesystem usage | Off |
| Docker socket | Container status, metrics and events | Off, root-equivalent |
| Journal | SSH and Fail2Ban events | Off |
| NET_ADMIN and UFW | Firewall status | Off |
| Fail2Ban socket | Fail2Ban status and events | Off |
Legacy HTTP agents
Older pull agents remain compatible when NODESENTINEL_HUB_URL is not set. Every request authenticates with X-Agent-Key. Outside loopback, TLS with certificate verification is mandatory.
openssl req -x509 -newkey rsa:4096 -nodes -days 825 \
-keyout agent.key -out agent.crt \
-subj "/CN=homelab1.lan" \
-addext "subjectAltName=DNS:homelab1.lan,IP:192.168.1.20"
chmod 600 agent.keyDistribute only agent.crt to the dashboard. Certificate verification cannot be disabled.
The Docker socket, write access to host paths, NET_ADMIN, and Fail2Ban or UFW helpers significantly change the security boundary. Run only trusted images and evaluate each source individually.