openbao-hsm package installed to use the Futurex PKCS #11 library for HSM auto-unseal. OpenBao seals its root key with an RSA key pair on the Excrypt HSM by using the CKM_RSA_PKCS_OAEP mechanism.
The OpenBao configuration on this page is an example to help you get started. Adjust it for your environment, security requirements, and operational preferences, such as TLS and audit logging. Always review and align settings with your organization’s security policies.
Create the seal key
Create an RSA key pair on the HSM. OpenBao uses the public key to encrypt its root key and the private key to decrypt it at startup. Use the OpenSCpkcs11-tool, or the Futurex PKCS11Manager program.
1
If
pkcs11-tool isn’t installed, install the OpenSC package, for example on Debian or Ubuntu:Shell
2
Generate a 2048-bit RSA key pair. Enter the identity password when prompted. Choose any label; you use it again in the OpenBao configuration:
Shell
HSM key labels can contain only letters, digits, and underscores.
3
Verify that the key pair exists:
Shell
The output lists a private key object with the label that you chose.
Give the openbao user access
The OpenBao service runs as theopenbao user, which must be able to read the library and its configuration file.
1
Verify that the
openbao user can read libfxpkcs11.so and fxpkcs11.cfg:Shell
Each command returns the file details or contents without a permission-denied error.
2
If you use mutual authentication, make the TLS client key readable by the
openbao user, for example:Shell
3
If
fxpkcs11.cfg sets a <LOG-FILE>, create the file and give it to the openbao user. Adjust the path to match your configuration:Shell
Set the HSM PIN
OpenBao reads the identity password from theBAO_HSM_PIN environment variable. The service loads it from /etc/openbao/openbao.env.
1
Add the PIN to the environment file. Replace If
[identity_password] with the password of the identity that you created for OpenBao:Shell
fxpkcs11.cfg isn’t at /etc/fxpkcs11.cfg, also add FXPKCS11_CFG=[path_to_cfg] to this file.2
Restrict the file so that only root and the
openbao group can read it:Shell
Configure OpenBao settings
1
Replace the contents of The
/etc/openbao/openbao.hcl with the following configuration. Replace [server_address] with the address of the OpenBao server and bao_seal_rsa with the label of your seal key.This example disables TLS on the listener for simplicity, so
api_addr uses HTTP. Before you deploy to production, enable TLS in the listener stanza (the package generated a self-signed certificate in /opt/openbao/tls) and update api_addr to use https://. For multi-node Raft deployments, add node_id to the storage stanza./etc/openbao/openbao.hcl
seal stanza defines the following parameters:The configuration file doesn’t contain the PIN. OpenBao reads it from the
BAO_HSM_PIN environment variable.2
Make the configuration file readable by the
openbao user:Shell
Start the OpenBao server
1
Delay the OpenBao service at system startup. With the Futurex PKCS #11 library, OpenBao can fail to auto-unseal when it starts in the first minute after the computer boots: it stays sealed and logs The drop-in waits until the computer has been up for 90 seconds. It doesn’t delay a restart of the service after that.
CKR_OBJECT_HANDLE_INVALID. Starting it later avoids the problem.Create a systemd drop-in file:Shell
2
Enable and start the OpenBao service:
Shell
3
Check the service status:
Shell
The service is
active (running). Until you initialize OpenBao, the log repeats stored unseal keys are supported, but none were found: is the server initialized? every few seconds. That’s expected.Initialize OpenBao
1
Set the OpenBao address. Replace
[server_address] with the address of the OpenBao server:Shell
2
Check the OpenBao status:
Shell
The output shows
Seal Type pkcs11, Initialized false, and Sealed true.3
Initialize OpenBao:
Shell
The output lists five recovery keys and an initial root token, and ends with the following lines. OpenBao 2.6 still prints “Vault” in this message:
4
Verify that OpenBao is unsealed:
Shell
The output shows
Initialized true and Sealed false.Troubleshooting
The service doesn’t start or OpenBao stays sealed
Check the service log first:Shell
For any other library error, enable traffic logging in
fxpkcs11.cfg, restart the service, and check the log file for ERROR lines. See Edit the Futurex PKCS #11 configuration file.

