HashiCorp Certified: Vault Associate Certification
Vault Replication
Configure Replication using the Vault UI
In this guide, you’ll learn how to set up Disaster Recovery (DR) replication using HashiCorp Vault’s web interface. While you can configure replication via the CLI or API, the UI offers an intuitive workflow for most users. By the end, you’ll have a primary cluster replicating to a secondary for robust disaster recovery.
Prerequisites
- Vault Enterprise license (1.5+)
- Admin-level token with
replication
capabilities - Two Vault clusters (primary and secondary) with network connectivity
1. Enable DR Replication on the Primary Cluster
- Log in to your primary Vault cluster through the UI.
- In the sidebar, click Status, then select Replication.
- Click Enable Replication.
- From the Type dropdown, choose Disaster Recovery (DR) Replication.
- Set Cluster Mode to Primary, then confirm by clicking Enable Replication.
Vault will initialize DR replication in seconds and show the status panel, which initially displays No known secondaries.
2. Register a Secondary Cluster
- In the Replication panel, click Add a Secondary.
- Provide a descriptive Name for your secondary cluster.
- (Optional) Adjust the Token TTL to control how long the secondary activation token remains valid.
- Click Generate Token and Copy the output.
eyJhbGciOiJFUzUxMlsInR5c6IkpXVCJ9.eyJhY2Nlc3Nlc3NfdHlwZSI6ImFkZGl0aW9uIiwic2Vjb25kYXJ5X3Rva2VuIjoiJodHRwOitYrR1hY2J2stcHJgyMDAiLCJleHBpcmF0aW9uIjoxMjM0NTY3ODkwMH19
Warning
Keep the generated token secure. It grants replication activation rights on the secondary cluster.
3. Activate DR Replication on the Secondary Cluster
- Log in to your secondary Vault cluster.
- Navigate to Status → Replication → Enable Replication.
- Select Disaster Recovery (DR) Replication.
- Choose Secondary for Cluster Mode.
- Paste the token you copied from the primary.
- Click Enable Replication to start synchronization.
Vault will now synchronize changes from the primary to the secondary, completing your DR setup.
DR vs. Performance Replication
Replication Type | Use Case | Data Direction |
---|---|---|
Disaster Recovery (DR) | Failover during outages | Primary → Secondary |
Performance Replication | Read-scaling and geo-distribution | Bidirectional |
Next Steps & References
Your Vault clusters are now configured for DR replication via the UI. Regularly monitor the Replication status page to ensure health and sync progress.
Watch Video
Watch video content