Skip to content

Configuration

Docs path: Operate / Configuration

config.toml normally lives at /etc/openkms/config.toml. The canonical example in the repository is examples/config.toml. The drift test in tests/docs_drift.rs parses and .validate()-checks that file, so documented field names stay live.

The loader rejects duplicate key labels, duplicate object_id values, missing policy blocks, and invalid allowlist strings before the service starts. Evaluation order for the policy fields is in Policy Authoring.

FieldRequiredDefaultDescription
listenyesBind address. 127.0.0.1:9443 for loopback / reverse proxy; 0.0.0.0:PORT only on a hardened staging host.
signer_token_fileyesBearer token for /sign/* and /policy/*. Must be 0600.
admin_token_fileyesBearer token for /admin/*. Must be 0600.
inflight_limitno64Max concurrent in-flight signing requests. Excess returns 503 from the buffer/limit layer.
replay_window_secsno120Replay-cache lifetime for deterministic signatures.
FieldRequiredDefaultDescription
connector_urlyesyubihsm-connector HTTP endpoint, normally on loopback.
auth_key_idyesYubiHSM auth-key slot the runtime authenticates as. 3 is the signer slot from openkms setup.
password_fileyes64 hex digits (32 bytes) for the signer auth-key password. Generate with openkms ceremony print-signer-password. Must be 0600.
FieldRequiredDefaultDescription
pathyesAppend-only JSONL audit log (typically under state_dir).
hmac_key_filenoWhen set, every audit record includes an HMAC of the prior chain. The key file must be 0600.

Top-level path used for runtime persistence: admin policy overlays, kill-switch flags, and the audit log when [audit].path is relative. Set this on a writable, dedicated directory (e.g. /var/lib/openkms).

FieldRequiredDefaultDescription
accepted_pubkey_type_urlsnosecp256k1, Ethermint ethsecp256k1, Injective ethsecp256k1AuthInfo.signer_infos[].public_key.type_url values the decoder will accept. Add chain-specific URLs without code changes.

One block per signing key.

FieldRequiredDefaultDescription
labelyesStable identifier used in HTTP requests and the audit log.
chainyessolana or cosmos.
object_idyesYubiHSM asymmetric-key object id (decimal or 0x0100).
derivation_pathnoBIP-32 / SLIP-10 path used when keys provision imports a deterministic key (Cosmos: m/44'/118'/0'/0/0; Solana: m/44'/501'/0'/0').
address_stylenocosmoscosmos, evm, or solana. Drives address derivation and recipient comparisons.
default_hrpnoBech32 prefix for Cosmos-style derivations (e.g. cosmos, osmo).
policyyes[keys.policy] block (see below).
[[keys]]
label = "solana-hot-0"
chain = "solana"
object_id = 0x0101
[keys.policy]
enabled = true
max_signs_per_minute = 30
max_signs_per_day = 5000
per_tx_cap_lamports = "5000000000"
[[keys.policy.allowed_programs]]
id = "11111111111111111111111111111111"
comment = "system transfers"
[[keys]]
label = "cosmos-hub-0"
chain = "cosmos"
object_id = 0x0100
derivation_path = "m/44'/118'/0'/0/0"
address_style = "cosmos"
default_hrp = "cosmos"
[keys.policy]
enabled = true
max_signs_per_minute = 6
max_signs_per_hour = 120
max_signs_per_day = 500
daily_cap_lamports = "5000000000"
per_tx_cap_lamports = "500000000"
[[keys.policy.allowed_messages]]
type_url = "/cosmos.bank.v1beta1.MsgSend"
allowed_recipients = ["cosmos1replace_me"]
per_tx_cap = { uatom = "500000000" }
FieldDefaultDescription
enabledfalseMaster switch for the key. The admin kill switch and overlays can override this at runtime.
max_signs_per_minuteunsetToken-bucket rate limit.
max_signs_per_hourunsetToken-bucket rate limit.
max_signs_per_dayunsetToken-bucket rate limit.
per_tx_cap_lamportsunsetSolana keys: cap on outgoing lamport totals per signed transaction. Cosmos keys: prefer denom-keyed per_tx_cap inside [[allowed_messages]].
daily_cap_lamportsunsetSolana keys: cap on accepted signed transfers in a rolling 24h window.
[[keys.policy.allowed_programs]]emptySolana program allowlist (id, optional comment). Empty means no programs are permitted.
[[keys.policy.allowed_messages]]emptyCosmos message-type allowlist with optional allowed_recipients, allowed_contracts, allowed_methods, and denom-keyed per_tx_cap. Empty means no Cosmos message types are permitted.
[[keys.policy.allowed_recipients]]emptyRecipient allowlist tied to a program family.

Empty allowlists are meaningful: a Solana key with no allowed_programs and a Cosmos key with no allowed_messages will deny every signing request.

These must be mode 0600 or openKMS refuses to start:

  • signer.token
  • admin.token
  • hsm-password
  • audit-hmac.key (when hmac_key_file is set)