SG SealGrid Athena Docs

Agent Configuration File (appsettings.json)

Each managed host runs the Hermes agent, and the agent reads its settings from a local appsettings.json file next to its executable. This page is the reference for the Agent section of that file: what every key means, its default, where the file lives on Windows and Linux, how to override values with environment variables, and how changes take effect. For most day-to-day edits you should let the Agent CLI (HermesCLI) write the file for you — but when you're templating a mass rollout or reviewing a host by hand, this is the map.

This is the agent-side configuration on the endpoint. It is separate from Agent Settings (fleet-wide defaults the server pushes down) and from the server's own configuration. Where an agent-side value and a server-pushed value both exist, the server can override the agent at registration for the intervals noted below.

Where the file lives#

The agent loads appsettings.json from its install directory. The data directory (state, certificate, logs) is separate and controlled by the DataPath key below. Edit the file with an editor that preserves UTF-8 without a byte-order mark, and keep a backup before large changes.

WindowsLinux
Configuration fileC:\Program Files\Hermes\appsettings.json/opt/hermes/appsettings.json
Data directory (default)C:\ProgramData\Hermes/var/lib/hermes
ServiceWindows service HermesAgentsystemd unit hermes-agent

To find the exact paths in use on a given host — including whether each file currently exists — run HermesCLI debug paths. For where log files are written and how to raise the log level, see Agent Logs.

Overall shape#

All agent settings live under a single Agent object. A minimal, production-shaped file looks like this:

{
  "Agent": {
    "Servers": [
      {
        "Name": "production",
        "Url": "https://athena.example.com:8444",
        "RegistrationToken": "<one-time-token>",
        "Enabled": true
      }
    ],
    "HeartbeatIntervalSeconds": 30,
    "StatusUpdateIntervalSeconds": 60,
    "DataPath": "",
    "ValidateServerCertificate": true,
    "CertificateRenewalDays": 7,
    "ConnectionTimeoutSeconds": 30,
    "ReconnectDelaySeconds": 10,
    "MaxReconnectAttempts": 0
  }
}

The file also carries a Serilog section that controls agent logging (level, sinks, and the log-file path) — see Agent Logs — and may include the optional UpdateScanner and RemoteSession blocks described below.

The Agent section, key by key#

KeyWhat it controlsDefault
ServersThe list of servers this agent connects to. At least one valid, enabled entry is required. See Server connections.
HeartbeatIntervalSecondsHow often the agent sends a heartbeat to the server. The server may override this value when the agent registers.30
StatusUpdateIntervalSecondsHow often the agent performs a full inventory/metrics update. Between these, the heartbeat carries only changed items.60
DataPathDirectory where the agent stores its certificate, private key, and persisted state. Leave blank to use the platform default (%ProgramData%\Hermes on Windows, /var/lib/hermes on Linux).platform default
ValidateServerCertificateWhether the agent validates the server's TLS certificate. Keep true in production. false accepts self-signed certificates and is intended only for lab/dev.true
CertificateRenewalDaysHow many days before its client certificate expires the agent starts trying to renew it automatically.7
ConnectionTimeoutSecondsMaximum time the agent waits for a server response before treating the attempt as failed.30
ReconnectDelaySecondsHow long the agent waits before retrying after a connection failure.10
MaxReconnectAttemptsHow many reconnect attempts to make before giving up. 0 means retry forever (recommended for always-on services).0
Never ship ValidateServerCertificate: false to production

Setting this to false disables verification of the server's TLS certificate and exposes the agent to interception. It exists only to smooth first-run lab setups with self-signed certificates. In production, install a trusted server certificate (see Server TLS Certificate) and leave this at true.

Server connections#

Servers is an array — an agent can report to more than one server at once (multi-homing). Each entry has four fields:

FieldMeaning
NameA unique, case-insensitive label for the connection. It also becomes the on-disk sub-directory for that server's identity, so it must be a valid folder name (no path separators, not . or ..).
UrlThe server's agent endpoint, for example https://athena.example.com:8444.
RegistrationTokenA one-time token used only for first-time registration with that server. Once the agent holds a certificate, the token is no longer needed and can be removed from the file.
Enabledtrue to use this connection; set false to disable it temporarily without deleting the entry. Omitting the field defaults to true.

You rarely need to hand-edit this array: HermesCLI config server add / disable / enable / remove maintains it safely. For the concepts and reporting behaviour of multi-homed agents, see Multi-Homed Agents; for how tokens are created and scoped, see Registration Tokens and Agent Enrollment.

Optional feature blocks#

Two optional top-level blocks tune specific agent behaviours. Both are safe to omit.

Windows Update scanning#

On Windows, the agent can scan for missing updates against an offline WSUS catalog file. This is disabled by default and enabled with:

  "UpdateScanner": {
    "Enabled": true
  }

For the full offline-update workflow — supplying the catalog and managing update scans and deployment — see Windows Update Management.

Screen-share helper gate#

A single agent-side switch controls whether the agent is willing to launch the screen-share helper when the server authorises a session:

  "RemoteSession": {
    "EnableHelperLaunch": true
  }

Setting EnableHelperLaunch to false prevents this host from ever starting a screen-share session, regardless of server-side settings. Note that this switch only gates willingness: an attended session still requires the per-session consent prompt and on-screen indicator, and unattended access still requires it to be allowed for the agent on the server. See Remote Commands & Desktop, Unattended Access, and Screen-Share Helper Binaries.

Environment-variable overrides#

Any value in the file can be supplied — or overridden — through an environment variable, which is convenient for container images and templated deployments where you'd rather not bake secrets into a JSON file. Use the standard nested form, joining path segments with a double underscore (__):

# Linux / container
Agent__HeartbeatIntervalSeconds=30
Agent__ValidateServerCertificate=true
Agent__Servers__0__Url=https://athena.example.com:8444
Agent__Servers__0__RegistrationToken=<one-time-token>

Array entries are addressed by index (Servers__0, Servers__1, …). Environment variables take precedence over the values in appsettings.json, so a variable set on the service or container wins over the file.

How changes take effect#

Except for the logging level (which the agent hot-reloads), edits to appsettings.json apply when the agent restarts. After changing any value:

# Windows
HermesCLI service restart

# Linux
sudo systemctl restart hermes-agent
Let the CLI edit the file

Rather than editing JSON by hand, use HermesCLI config set <Key> <Value> and the config server commands. The CLI validates the value, preserves the rest of the file, and can create a fresh file with config init. See the Agent CLI (HermesCLI) reference.

Template it once, deploy it everywhere

Because every setting is plain configuration, you can bake a standard appsettings.json (or the matching environment variables) into your golden image or deployment script and roll it out across an air-gapped fleet with no internet dependency. See Air-Gapped Operation and AD Agent Deployment.