Building a production-ready OpenBao cluster with Raft integrated storage: understanding the role of active and standby nodes, Raft consensus, and configuring a 3 or 5 node cluster with bao operator raft join.

In episode 14 you automated provisioning with OpenTofu or Terraform and Ansible. Episode 15 shifts to the production foundation: how to keep OpenBao available when a single server dies. You will understand Raft integrated storage, the active and standby node architecture, and the steps to build a 3 or 5 node cluster from scratch.
OpenBao is the gatekeeper of all secrets. If its main server dies, every application depending on it is crippled too — not to mention that secret rotation and reads stop. High availability ensures there is another node ready to take over the moment the active node fails, so the service keeps serving with minimal downtime.
Storage determines where OpenBao's data is stored and how data is replicated between nodes. Previously the common architecture used Consul as external storage. OpenBao brings a much more compact alternative: Raft integrated storage.
Raft integrated storage uses the Raft consensus protocol to replicate data among the OpenBao nodes themselves, without an external server:
storage "raft" configuration.For small teams wanting to move out of single-node mode, this is the fastest path to high availability.
In a Raft cluster, only one node is active (leader) at any given time — this node is the only one serving read and write requests. The other nodes are standby (followers), replicating data and ready to be promoted if the leader fails. Leader election is handled by the consensus protocol, not manual intervention.
Raft enforces a majority rule: a new operation is considered successful only when a majority of nodes approve it. Therefore, 3 nodes need 2 approvals, and 5 nodes need 3. This majority requirement is what keeps the cluster consistent even when some nodes go down.
| Node Role | Task | When it fails |
|---|---|---|
| Active (leader) | Serves all reads and writes | Fails over to a standby |
| Standby (follower) | Replicates data, ready to take over | Data stays safe on other nodes |
| Cluster member | Participates in consensus voting | Cluster adjusts to the quorum |
The choice of node count follows quorum logic: 3 nodes are enough for a majority of 2 and tolerate losing 1 node; 5 nodes tolerate losing 2 nodes. Below 3 nodes, the cluster has no healthy majority.
Let's set up a cluster with three servers: node1, node2, and node3.
Each node uses the same storage configuration, with a different node_id. Example for node1:
storage "raft" {
path = "/opt/openbao/data"
node_id = "node1"
}
listener "tcp" {
address = "0.0.0.0:8200"
tls_disable = true
}
api_addr = "http://node1.example.com:8200"
cluster_addr = "http://node1.example.com:8201"node_id must be unique on each server; api_addr and cluster_addr point to each node's own address. For node2 and node3, change the node_id and addresses to match their names.
The first node is initialized and unsealed before the other nodes join:
export BAO_ADDR=http://node1.example.com:8200
bao operator init
bao operator unseal
bao operator raft list-peersbao operator init produces the unseal keys and root token; store both in a safe place. After unsealing, node1 becomes active.
On node2 and node3, run the following command on each:
export BAO_ADDR=http://node2.example.com:8200
bao operator raft join http://node1.example.com:8200
bao operator unsealbao operator raft join pairs the new node with leader node1; after being unsealed, the node joins data replication. Repeat for node3 with its own address.
bao operator raft list-peersThe output shows all nodes, their roles, and addresses. Make sure every node appears with a healthy status before adding real load.
Warning
Never let the number of healthy nodes drop below the quorum. For a 3-node cluster, if two nodes die, the majority is lost and the cluster stops serving. In production, watch the standby nodes closely — bao operator raft list-peers is your best friend.
In this episode 15, you understood the advantages of Raft integrated storage over Consul, the active and standby node architecture with Raft consensus, the quorum rules for a 3 or 5 node cluster, the storage "raft" block, and the joining process via bao operator raft join.
Key takeaways:
bao operator raft list-peers is the window into cluster health.In the next episode, episode 16, we eliminate the ritual operators face most often: manual unsealing after maintenance with cloud KMS-based auto-unseal.