Hoplet configuration
Configure how a device connects to Hop, enrolls and reports changes.
Configuration file
Hoplet's main configuration file is /etc/hop/hoplet/config.yaml.
Use a different configuration file
To select a different main file, pass --config /path/to/config.yaml to a Hoplet command or set HOPLET_CONFIG to its path.
Settings reference
The tabs below describe each setting and its environment variable. File paths must be absolute, and required settings are marked with an asterisk ().
Set the address Hoplet connects to and the root that Hoplet trusts.
| Setting | Purpose |
|---|---|
server.urlHOPLET_SERVER_URL | The Hop device API address. It must use HTTPS.
|
trust.root_pinHOPLET_TRUST_ROOT_PIN | The pin of the Hop trust domain root: sha256/ and the Base64 SHA-256 of its public key. Hoplet accepts the first trust bundle only if it holds this root. See Get the trust root pin.
|
Hoplet enrolls with a bootstrap certificate and its private key. See Enroll a device.
| Setting | Purpose |
|---|---|
identity.bootstrap_certificateHOPLET_IDENTITY_BOOTSTRAP_CERTIFICATE | The PEM bootstrap certificate from your CA, optionally followed by its intermediates.
|
identity.bootstrap_keyHOPLET_IDENTITY_BOOTSTRAP_KEY | The matching unencrypted PEM private key. Both paths also support systemd credentials.
|
identity.key_providerHOPLET_IDENTITY_KEY_PROVIDER | The private key provider. file is the only supported value. It keeps the SVID key in state_dir.
|
Set the device ID, hardware details and labels reported to Hop. Unset values are detected automatically.
| Setting | Purpose |
|---|---|
device.idHOPLET_DEVICE_ID | The Margo Device ID.
|
device.vendorHOPLET_DEVICE_VENDOR | The device vendor reported to Hop.
|
device.model_numberHOPLET_DEVICE_MODEL_NUMBER | The device model reported to Hop.
|
device.serial_numberHOPLET_DEVICE_SERIAL_NUMBER | An explicit hardware serial number.
|
device.serial_number_fromHOPLET_DEVICE_SERIAL_NUMBER_FROM | Use auto for the configured or detected serial, or certificate for the serialNumber in the bootstrap certificate subject. The certificate option cannot be combined with an explicit device.serial_number. See Serial number.
|
device.labelsHOPLET_DEVICE_LABELS | Labels reported with the capabilities, for deployment eligibility rules. Values are strings, numbers, booleans, or lists of strings or of numbers. In the environment variable, use a JSON object.
|
Control how often Hoplet checks for changes to the device's capabilities, and whether the device hosts workloads.
| Setting | Purpose |
|---|---|
capabilities.refresh_intervalHOPLET_CAPABILITIES_REFRESH_INTERVAL | How often capabilities are checked. The minimum is 1m. A report is sent only when values change.
|
observability.otlp_endpointHOPLET_OBSERVABILITY_OTLP_ENDPOINT | The OpenTelemetry collector endpoint for workloads. The device hosts workloads only when this is set and a runtime plugin is available. See Hosting and non-hosting devices.
|
Choose the level of detail and format Hoplet uses for log messages.
| Setting | Purpose |
|---|---|
log.levelHOPLET_LOG_LEVEL | debug, info, warn or error.
|
log.formatHOPLET_LOG_FORMAT | text, json or auto. Automatic formatting uses text in a terminal or the system journal, and JSON otherwise.
|
Choose where Hoplet saves the device's identity and cached state between restarts.
| Setting | Purpose |
|---|---|
state_dirHOPLET_STATE_DIR | The SVID, its key, the trust bundle and cached state, stored in a directory with mode 0700.
|
Configuration order
Hoplet reads settings in the order below. Each source can replace values supplied by an earlier source:
- Built-in defaults.
- The main configuration file, normally
/etc/hop/hoplet/config.yaml. - Additional
config.d/*.yamlfiles next to the main file, in filename order. HOPLET_*environment variables.- Explicit command-line options.
Environment variables
Each setting has a HOPLET_ variable with its name in uppercase and dots replaced by underscores. For example, server.url becomes HOPLET_SERVER_URL, and log.level becomes HOPLET_LOG_LEVEL.
The Hoplet service also reads variables from /etc/hop/hoplet/environment. List all available variables with:
Check and apply changes
Use config check to validate settings and config print to inspect the combined result:
Unknown setting names and HOPLET_* variables are rejected. The check identifies each problem so it can be corrected before changes are applied.
A reload updates device and observability settings and checks capabilities again:
For changes to other settings, restart the service:
Check systemd credentials in the service context
If the bootstrap certificate or key uses credential://, configuration checks need the service's credentials directory. See Protect the bootstrap key for that setup.