NodeSentinel documentation
Native & systemd
Build the dashboard and agents directly on Linux and run them as hardened systemd services.
Prerequisites
Go 1.24 or newer is required on each build host. Python is not required for the current Go version.
go version
git clone https://github.com/TheArchitect998/NodeSentinel.git /opt/nodesentinel
cd /opt/nodesentinel
mkdir -p bin
go build -o bin/nodesentinel ./cmd/nodesentinelConfigure the dashboard
Copy the sample files
cp .env.example .env cp nodesentinel.config.example.json nodesentinel.config.json chmod 600 .env nodesentinel.config.jsonComplete the configuration
Set the bind address, port, state directory and named push agents.
NODESENTINEL_DASHBOARD_HOST=127.0.0.1 NODESENTINEL_DASHBOARD_PORT=8888 NODESENTINEL_DASHBOARD_CONFIG=./nodesentinel.config.json NODESENTINEL_STATE_DIR=/opt/nodesentinel/stateCreate state storage and set the password
Run the setup command as the same unprivileged user that will run the dashboard service.
sudo install -d -o user -g user -m 0700 /opt/nodesentinel/state set -a source .env set +a ./bin/nodesentinel dashboard setupTest the start
./bin/nodesentinel dashboardOpen
http://localhost:8888locally and sign in.
Dashboard as a systemd service
sudo cp systemd/nodesentinel.service.example \
/etc/systemd/system/nodesentinel.service
sudo nano /etc/systemd/system/nodesentinel.serviceIn particular, check User=, WorkingDirectory= and the absolute path of the protected EnvironmentFile=. Then start it:
sudo systemctl daemon-reload
sudo systemctl enable --now nodesentinel.service
sudo systemctl status nodesentinel.serviceAgent on every host
- Build the same binary.
- Copy
nodesentinel-agent.env.exampletonodesentinel-agent.env. - Enter the agent name, key and HTTPS/WebSocket address of the dashboard.
- Test the connection once in the foreground.
NODESENTINEL_AGENT_NAME=HomeLab1
NODESENTINEL_AGENT_KEY=a-strong-random-key
NODESENTINEL_HUB_URL=wss://monitor.example.comProtect the service account and configuration
sudo useradd --system --user-group --no-create-home \
--shell /usr/sbin/nologin nodesentinel
sudo install -o nodesentinel -g nodesentinel -m 0600 \
nodesentinel-agent.env /etc/nodesentinel-agent.env
sudo cp systemd/nodesentinel-agent.service.example \
/etc/systemd/system/nodesentinel-agent.serviceCheck the unit file and paths, then enable the agent:
sudo systemctl daemon-reload
sudo systemctl enable --now nodesentinel-agent.service
sudo journalctl -u nodesentinel-agent.service -fOptional system sources
Docker, journal, UFW, Fail2Ban and SMART remain opt-in. Use the supplied sudoers fragment only after review and adjust the user and actual program paths:
sudo install -m 0440 systemd/nodesentinel.sudoers \
/etc/sudoers.d/nodesentinel
sudo visudo -cf /etc/sudoers.d/nodesentinelThe supplied unit sets NoNewPrivileges=yes, preventing sudo from escalating privileges later. For privileged sources, use a tightly scoped helper or a consciously reviewed service override.