config.json that stores server identity, networking, security, logging, and metrics settings. It lives at:
Full field reference
All fields below are written byhirocli 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.| Field | Type | Default | Description |
|---|---|---|---|
device_id | string | random UUID | Unique identity for this workspace. Generated once, carried forward on re-setup. |
gateway_url | string | "ws://localhost:8765" | WebSocket URL of the gateway this workspace connects to. Set interactively or via --gateway-url. |
http_host | string | "127.0.0.1" | Bind address for the local HTTP server. |
http_port | int | 18080 | HTTP server port (slot-derived). Override with --http-port. |
plugin_port | int | 18081 | Port the server exposes for channel plugin connections (slot-derived). |
admin_port | int | 18083 | Admin UI port (slot-derived). |
master_key_file | string | "master_key.pem" | ECDSA private key filename, resolved relative to the workspace folder. |
pairing_code_length | int | 6 | Number of digits in device pairing codes. |
pairing_code_ttl_seconds | int | 300 | How long a pairing code stays valid (seconds). |
attestation_expires_days | int | 30 | Days before a device attestation must be refreshed. |
log_level | string | "INFO" | Root log level. One of DEBUG, INFO, WARNING, ERROR. |
log_dir | string | "" | Custom log directory. Empty string means <workspace>/logs/. |
module_log_levels | object | {} | Per-module log level overrides, e.g. {"hirocli.runtime": "DEBUG"}. |
metrics_enabled | bool | false | Enable system metrics collection. Set with --metrics during setup. |
metrics_interval | float | 2.0 | Seconds between metric samples (minimum 1.0). Set with --metrics-interval during setup. |
metrics_history_size | int | 1800 | Number of snapshots kept in memory. At the default 2 s interval this is ~1 hour. |
autostart_method | string | null | null | Written by setup after auto-start registration. Possible values: "elevated", "schtasks", "registry", "skipped", "failed". |
Example
A typicalconfig.json after running hirocli setup on Windows:
Enabling metrics
Metrics are disabled by default. Three ways to turn them on:- During setup — pass
--metrics(and optionally--metrics-interval):
- At runtime — POST to the running server:
- Edit
config.json— set"metrics_enabled": trueand restart the server.
Notes
log_dir: ""falls back to the workspace’slogs/subdirectory.master_key_fileis resolved relative to the workspace folder.- Re-running
hirocli setuppreservesdevice_idand any fields you have not overridden via flags.
