HashiCorp Vault is a free, open-source secrets management tool that provides secure storage, dynamic secrets, encryption as a service, and identity-based access.
What Is Vault?
Vault centralizes secret management — API keys, passwords, certificates, encryption keys — all behind a unified API.
Key features:
- Secure secret storage
- Dynamic secrets (auto-generated, auto-revoked)
- Encryption as a service
- Leasing and renewal
- Revocation
- Identity-based access (policies)
- Audit logging
- Multiple auth methods
- Multiple storage backends
Quick Start
# Dev mode (for testing)
vault server -dev
# Production (with file backend)
vault server -config=vault.hcl
Docker:
docker run -d --cap-add=IPC_LOCK \
-p 8200:8200 \
-e VAULT_DEV_ROOT_TOKEN_ID=myroot \
hashicorp/vault
Store and Retrieve Secrets
# Store
vault kv put secret/myapp/config \
db_password=supersecret \
api_key=abc123
# Retrieve
vault kv get secret/myapp/config
API Access
curl -H "X-Vault-Token: myroot" \
http://127.0.0.1:8200/v1/secret/data/myapp/config
Dynamic Secrets
Vault can generate database credentials on-the-fly:
# Configure database
vault write database/config/postgres \
plugin_name=postgresql-database-plugin \
connection_url="postgresql://admin:pass@db:5432/mydb"
# Get temporary credentials (auto-expire)
vault read database/creds/my-role
# Returns: username=v-token-my-role-abc123, password=randomly-generated
Credentials auto-expire. No more shared passwords.
Vault vs Alternatives
| Feature | Vault | AWS Secrets Manager | Infisical |
|---|---|---|---|
| Self-host | Yes | No | Yes |
| Dynamic secrets | Yes | Rotation only | No |
| Encryption as service | Yes | KMS | No |
| PKI (certificates) | Yes | ACM | No |
| Free | OSS version | $0.40/secret/mo | Self-host |
With 31K+ GitHub stars. The gold standard for secrets.
Secure your scraping credentials! Apify tools. Custom solutions: spinov001@gmail.com
Top comments (0)