HashiCorp Vault — Install Vault
Vault is distributed as a single binary. This page covers every major installation method so you can get Vault running on any platform.
Install on macOS
Homebrew (Recommended)
# Add HashiCorp tap
brew tap hashicorp/tap
# Install Vault
brew install hashicorp/tap/vault
# Verify installation
vault version
Expected output:
Vault v1.15.4 (9b61934559ba31150860e618cf18e816cbddc630), built 2024-01-26T14:53:40Z
Binary Download
# Download the binary
curl -O https://releases.hashicorp.com/vault/1.15.4/vault_1.15.4_darwin_amd64.zip
# For Apple Silicon (M1/M2/M3)
curl -O https://releases.hashicorp.com/vault/1.15.4/vault_1.15.4_darwin_arm64.zip
# Unzip
unzip vault_1.15.4_darwin_arm64.zip
# Move to PATH
sudo mv vault /usr/local/bin/
# Verify
vault version
Install on Linux
Ubuntu / Debian (apt)
# Add HashiCorp GPG key
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
# Add the repository
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
# Update and install
sudo apt update && sudo apt install vault
# Verify
vault version
RHEL / CentOS / Amazon Linux (yum)
# Add HashiCorp repository
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
# Install Vault
sudo yum install -y vault
# Verify
vault version
Binary Download (Any Linux)
# Download
curl -O https://releases.hashicorp.com/vault/1.15.4/vault_1.15.4_linux_amd64.zip
# Unzip
unzip vault_1.15.4_linux_amd64.zip
# Move to PATH
sudo mv vault /usr/local/bin/
# Set capabilities (avoids running as root for mlock)
sudo setcap cap_ipc_lock=+ep /usr/local/bin/vault
# Verify
vault version
Install on Windows
Chocolatey
# Install via Chocolatey
choco install vault
# Verify
vault version
Binary Download
- Download from releases.hashicorp.com/vault
- Unzip
vault_1.15.4_windows_amd64.zip - Add the folder to your
PATHenvironment variable - Open a new terminal and run
vault version
Install with Docker
Docker is the fastest way to run Vault without installing anything:
# Pull the image
docker pull hashicorp/vault:1.15
# Verify
docker run --rm hashicorp/vault:1.15 vault version
Expected output:
Vault v1.15.4 (9b61934559ba31150860e618cf18e816cbddc630), built 2024-01-26T14:53:40Z
Run Dev Server in Docker
docker run --rm -d \
--name vault-dev \
-p 8200:8200 \
-e 'VAULT_DEV_ROOT_TOKEN_ID=my-root-token' \
-e 'VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:8200' \
hashicorp/vault:1.15
# Set environment
export VAULT_ADDR='http://127.0.0.1:8200'
export VAULT_TOKEN='my-root-token'
# Verify
vault status
Enable Shell Autocompletion
Vault supports tab completion for bash and zsh:
# Install autocomplete
vault -autocomplete-install
# Restart your shell
exec $SHELL
# Now you can tab-complete
vault secr<TAB> # completes to "vault secrets"
vault secrets l<TAB> # completes to "vault secrets list"
Verify Installation
After installing via any method, run these checks:
# Check version
vault version
# Check that the binary is in PATH
which vault
# Test a basic command (will fail without a server, but proves CLI works)
vault status
# Expected: Error connecting — that's OK, no server is running yet
Quick Reference
| Method | Command | Best For |
|---|---|---|
| Homebrew | brew install hashicorp/tap/vault |
macOS users |
| apt | sudo apt install vault |
Ubuntu / Debian |
| yum | sudo yum install vault |
RHEL / CentOS / Amazon Linux |
| Binary | Download + move to PATH | Any OS, air-gapped environments |
| Docker | docker pull hashicorp/vault:1.15 |
Quick labs, CI/CD |
| Chocolatey | choco install vault |
Windows users |
Next: Dev Server