Documentationv2.4.2

NodeSentinel documentation

Docker Compose

Install, update and secure the NodeSentinel dashboard and agents with ready-to-use multi-architecture images.

Prerequisites

Install Docker Engine and the Docker Compose plugin following your Linux distribution's documentation. Check both commands:

bash
docker --version
docker compose version

The published images are named thearchitect998/nodesentinel and thearchitect998/nodesentinel-agent. Use a version tag instead of latest for reproducible deployments.

Deploy the dashboard

  1. Prepare the files

    bash
    git clone https://github.com/TheArchitect998/NodeSentinel.git
    cd NodeSentinel
    cp nodesentinel.config.example.json nodesentinel.config.json
    chmod 600 nodesentinel.config.json
  2. Edit the configuration

    Remove unused examples. Give every push agent a name and a unique random key.

    nodesentinel.config.json
    {
      "agents": {
        "HomeLab1": {
          "mode": "push",
          "key": "at-least-16-random-characters"
        }
      }
    }
  3. Set the password and start

    bash
    docker compose pull
    docker compose run --rm dashboard /usr/local/bin/nodesentinel dashboard setup
    docker compose up -d
    docker compose ps
Back up state permanently

The password, settings and SQLite databases are stored in the dashboard-state volume. Back it up regularly. docker compose down -v deletes it and therefore the history.

Bind address and time zone

By default, the container listens on 127.0.0.1:8888. You can set NODESENTINEL_BIND_ADDRESS, NODESENTINEL_PORT and NODESENTINEL_TIMEZONE in the Compose environment. Recreate the container after making changes.

.env
NODESENTINEL_PORT=8888
NODESENTINEL_TIMEZONE=Europe/Berlin
# Only together with a firewall / reverse proxy:
# NODESENTINEL_BIND_ADDRESS=192.168.1.50

Agent with Compose

Use compose.agent.yaml together with a protected .env on every monitored host.

.env
NODESENTINEL_AGENT_NAME=HomeLab1
NODESENTINEL_AGENT_KEY=at-least-16-random-characters
NODESENTINEL_HUB_URL=wss://monitor.example.com
bash
chmod 600 .env
docker compose -f compose.agent.yaml pull
docker compose -f compose.agent.yaml up -d
docker compose -f compose.agent.yaml ps
Grant optional access deliberately

The agent starts with minimal privileges. Docker socket, host filesystem, journal, UFW, Fail2Ban and SMART are disabled by default. Docker socket access is effectively root access to the host.

Dockhand or Portainer

  1. Create the dashboard configuration on the Docker host first and grant the container user UID/GID 10001 read access.
  2. Create a stack from the repository or the contents of compose.yaml.
  3. If necessary, set the absolute path with NODESENTINEL_CONFIG_PATH.
  4. After deployment, open the container console and run /usr/local/bin/nodesentinel dashboard setup.
  5. Keep the stack name unchanged during replacement or updates so dashboard-state is reused.

Additional host sources

SourceRequiredNote
DockerNODESENTINEL_ENABLE_DOCKER=1 and socket mountRoot-equivalent permission
Host filesystemNODESENTINEL_ENABLE_HOST_ROOT=1 and read-only mountMay expose sensitive files
SSH eventsJournal mount and enable flagMay expose sensitive logs
UFWHost network, NET_ADMIN and UFW mountNET_ADMIN is a privileged capability
Fail2BanSocket mount and enable flagSocket allows administrative commands
S.M.A.R.T.Enable flag, SYS_RAWIO and device accessDoes not wake disks in standby