Initializing TKeeper
Tip
You can also init TKeeper from the control plane by visiting /ui.
Information described in this section is about initializing a keeper from the command line or programmatically.
You need tkeeper.system.init permission to run initialization.
Initialization is a one-time operation that binds a keeper node to a cluster configuration and prepares its local storage and sealing state.
Prerequisites
- All keepers in the same cluster must use the same cluster threshold and cluster total settings (quorum parameters). A mismatch will prevent the cluster from operating correctly.
- The caller must have the
tkeeper.system.initpermission to run initialization.
Initialize (System API)
Initialization is performed via:
- POST
/v1/keeper/system/init{ "peerId": 1, "threshold": 2, "total": 3 }
Fields descriptions:
peerId(int) - Intended keeper instance ID. MUST be unique and >=1 among all keepers in the cluster.threshold(int) - Cluster threshold. MUST match the threshold used by all keepers in the cluster.total(int) - Total keeper count in the cluster. MUST match the total used by all keepers in the cluster.
The request provides the initialization payload. The concrete payload shape depends on the sealing method.
Shamir sealing and returned shares
When the sealing provider is Shamir, initialization produces a set of unseal shares. Shamir initialization data is represented as:
threshold(int)total(int)shares64(list of base64 strings)
Important distinction:
- Cluster threshold/total: quorum parameters for distributed operations across keeper peers (t-of-n keepers).
- Shamir
threshold/totalreturned on init: parameters for unsealing shares of the unseal key only. They do not describe the keeper cluster quorum.
Warning
Treat shares64 as high-value recovery material. Loosing threshold count of shares will make keeper unsealing impossible.
Note
For non-Shamir sealing providers (AWS or Google), initialization does not return any shares (204 status code).
After initialization: sealing state and readiness
After initialization the keeper is ready to be unsealed and used.
Readiness endpoint
- GET
/v1/keeper/system/readyreturns 204 only when the keeper is UNSEALED, otherwise 503.
Status endpoint
- GET
/v1/keeper/system/statusreturns the current state and unseal progress. - If the caller lacks
tkeeper.system.unseal, the server returnssealedBy = nulleven when sealed.
Recommended operational flow
- Start all keepers with the intended cluster configuration.
- Call init on each keeper once.
- If using Shamir sealing, store
shares64in an operator-controlled, offline location or distribute shares accross core team members. - Unseal each keeper until it reports UNSEALED (readiness returns 204).
- Proceed with normal operations (key lifecycle, signing, encryption/decryption).
Tip
We recommend using Shamir sealing for production clusters.
Although it is possible to use cloud KMS, Shamir shares save you from vendor lock-in.