Skip to main content
Each workspace has a config.json that stores server identity, networking, security, logging, and metrics settings. It lives at:
<workspace>/config.json
See CLI storage for the full workspace folder layout.

Full field reference

All fields below are written by hirocli setup. Fields not explicitly set by a CLI flag keep their defaults (or carry forward the value from a previous setup run).
Ports (http_port, plugin_port, admin_port) are derived from the workspace’s port slot — see port derivation. You normally do not edit them by hand.
FieldTypeDefaultDescription
device_idstringrandom UUIDUnique identity for this workspace. Generated once, carried forward on re-setup.
gateway_urlstring"ws://localhost:8765"WebSocket URL of the gateway this workspace connects to. Set interactively or via --gateway-url.
http_hoststring"127.0.0.1"Bind address for the local HTTP server.
http_portint18080HTTP server port (slot-derived). Override with --http-port.
plugin_portint18081Port the server exposes for channel plugin connections (slot-derived).
admin_portint18083Admin UI port (slot-derived).
master_key_filestring"master_key.pem"ECDSA private key filename, resolved relative to the workspace folder.
pairing_code_lengthint6Number of digits in device pairing codes.
pairing_code_ttl_secondsint300How long a pairing code stays valid (seconds).
attestation_expires_daysint30Days before a device attestation must be refreshed.
log_levelstring"INFO"Root log level. One of DEBUG, INFO, WARNING, ERROR.
log_dirstring""Custom log directory. Empty string means <workspace>/logs/.
module_log_levelsobject{}Per-module log level overrides, e.g. {"hirocli.runtime": "DEBUG"}.
metrics_enabledboolfalseEnable system metrics collection. Set with --metrics during setup.
metrics_intervalfloat2.0Seconds between metric samples (minimum 1.0). Set with --metrics-interval during setup.
metrics_history_sizeint1800Number of snapshots kept in memory. At the default 2 s interval this is ~1 hour.
autostart_methodstring | nullnullWritten by setup after auto-start registration. Possible values: "elevated", "schtasks", "registry", "skipped", "failed".

Example

A typical config.json after running hirocli setup on Windows:
{
  "device_id": "9da7528b-05b8-4559-b32c-3bf86f004db9",
  "gateway_url": "ws://localhost:8765",
  "http_host": "127.0.0.1",
  "http_port": 18080,
  "plugin_port": 18081,
  "admin_port": 18083,
  "master_key_file": "master_key.pem",
  "pairing_code_length": 6,
  "pairing_code_ttl_seconds": 300,
  "attestation_expires_days": 30,
  "log_level": "INFO",
  "log_dir": "",
  "module_log_levels": {},
  "metrics_enabled": false,
  "metrics_interval": 2.0,
  "metrics_history_size": 1800,
  "autostart_method": "registry"
}

Enabling metrics

Metrics are disabled by default. Three ways to turn them on:
  1. During setup — pass --metrics (and optionally --metrics-interval):
hirocli setup --metrics --metrics-interval 5
  1. At runtime — POST to the running server:
curl -X POST http://127.0.0.1:18080/metrics/configure \
  -H "Content-Type: application/json" \
  -d '{"enabled": true}'
  1. Edit config.json — set "metrics_enabled": true and restart the server.

Notes

  • log_dir: "" falls back to the workspace’s logs/ subdirectory.
  • master_key_file is resolved relative to the workspace folder.
  • Re-running hirocli setup preserves device_id and any fields you have not overridden via flags.