Documentationv2.4.2

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.

bash
go version
git clone https://github.com/TheArchitect998/NodeSentinel.git /opt/nodesentinel
cd /opt/nodesentinel
mkdir -p bin
go build -o bin/nodesentinel ./cmd/nodesentinel

Configure the dashboard

  1. Copy the sample files

    bash
    cp .env.example .env
    cp nodesentinel.config.example.json nodesentinel.config.json
    chmod 600 .env nodesentinel.config.json
  2. Complete the configuration

    Set the bind address, port, state directory and named push agents.

    .env
    NODESENTINEL_DASHBOARD_HOST=127.0.0.1
    NODESENTINEL_DASHBOARD_PORT=8888
    NODESENTINEL_DASHBOARD_CONFIG=./nodesentinel.config.json
    NODESENTINEL_STATE_DIR=/opt/nodesentinel/state
  3. Create state storage and set the password

    Run the setup command as the same unprivileged user that will run the dashboard service.

    bash
    sudo install -d -o user -g user -m 0700 /opt/nodesentinel/state
    set -a
    source .env
    set +a
    ./bin/nodesentinel dashboard setup
  4. Test the start

    bash
    ./bin/nodesentinel dashboard

    Open http://localhost:8888 locally and sign in.

Dashboard as a systemd service

bash
sudo cp systemd/nodesentinel.service.example \
  /etc/systemd/system/nodesentinel.service
sudo nano /etc/systemd/system/nodesentinel.service

In particular, check User=, WorkingDirectory= and the absolute path of the protected EnvironmentFile=. Then start it:

bash
sudo systemctl daemon-reload
sudo systemctl enable --now nodesentinel.service
sudo systemctl status nodesentinel.service

Agent on every host

  1. Build the same binary.
  2. Copy nodesentinel-agent.env.example to nodesentinel-agent.env.
  3. Enter the agent name, key and HTTPS/WebSocket address of the dashboard.
  4. Test the connection once in the foreground.
nodesentinel-agent.env
NODESENTINEL_AGENT_NAME=HomeLab1
NODESENTINEL_AGENT_KEY=a-strong-random-key
NODESENTINEL_HUB_URL=wss://monitor.example.com

Protect the service account and configuration

bash
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.service

Check the unit file and paths, then enable the agent:

bash
sudo systemctl daemon-reload
sudo systemctl enable --now nodesentinel-agent.service
sudo journalctl -u nodesentinel-agent.service -f

Optional 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:

bash
sudo install -m 0440 systemd/nodesentinel.sudoers \
  /etc/sudoers.d/nodesentinel
sudo visudo -cf /etc/sudoers.d/nodesentinel
Keep hardening intact

The 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.