Prerequisites
- Vault Enterprise license
- Two Vault clusters (Primary and Secondary)
- Network connectivity on port
8200between clusters - Vault CLI configured (
VAULT_ADDRand token)
[!note] DR replication is an enterprise-only feature. Verify your Vault version supports DR replication before proceeding.
Step 1: Enable DR on the Primary Cluster
On the primary Vault server, run:| Endpoint | Action |
|---|---|
| sys/replication/dr/primary/enable | Enable DR replication on primary |
Step 2: Generate the Secondary Token
Still on the primary cluster, generate a token for the secondary:id: A meaningful identifier (e.g., region or datacenter).- The command returns a
tokento use in Step 3.
[!warning] Keep the secondary token secret—avoid committing it to code repositories or logs.
Step 3: Enable DR on the Secondary Cluster
On the secondary Vault server, use the token from Step 2:| Endpoint | Action |
|---|---|
| sys/replication/dr/secondary/enable | Enable DR replication on secondary |
Example Workflow
Troubleshooting
| Issue | Resolution |
|---|---|
| Network connectivity issues | Open TCP port 8200 between Vault clusters |
| DNS or endpoint misconfiguration | Verify DNS records or update VAULT_ADDR |
| Vault API not reachable | Ensure Vault service is running and accessible |
[!note] After setup, the secondary cluster continuously receives data. In a primary outage, promote the secondary to minimize downtime.