Install the Vault binary
You must first install Vault on your computer before you can use it. Vault is available as source code, as a pre-compiled binary, or in packaged formats.
This page will not cover how to compile Vault from source, but compiling from source is covered in the documentation for those who want to be sure they're compiling source they trust into the binary.
Install Vault
Note
To use Homebrew with macOS, you need to have Command Line Tools (CLT) for Xcode
installed as described in the Homebrew installation
documentation. If you encounter an error
like xcrun: error: invalid active developer path
when following these steps,
ensure that you have installed the latest CLT for Xcode and try again.
Homebrew is a free and open-source package management system for Mac OS X. Install the official Vault formula from the terminal.
Install the HashiCorp tap, a repository of all our Homebrew packages.
$ brew tap hashicorp/tap
Install Vault with hashicorp/tap/vault
.
$ brew install hashicorp/tap/vault
Note
This installs a signed binary and is automatically updated with every new official release.
To update to the latest, run
$ brew upgrade hashicorp/tap/vault
Vault Enterprise
To install Vault Enterprise, you will need a license to run it. Your customer support contact can generate a trial license for any HashiCorp enterprise product. If you are an existing HashiCorp enterprise customer, you may contact your organization's customer success manager (CSM) for information on how to get your organization's enterprise license.
After you have a license, run the following command:
$ brew install hashicorp/tap/vault-enterprise
Other operating systems
If you need to Install Vault on another operating system, please see the following:
Verifying the installation
After installing Vault, verify the installation worked by opening a new
terminal session and checking that the vault
binary is available. By executing
vault
, you should see help output similar to the following:
$ vaultUsage: vault <command> [args] Common commands: read Read data and retrieves secrets write Write data, configuration, and secrets delete Delete secrets and configuration list List data or secrets login Authenticate locally agent Start a Vault agent server Start a Vault server status Print seal and HA status unwrap Unwrap a wrapped secret Other commands: audit Interact with audit devices auth Interact with auth methods debug Runs the debug command kv Interact with Vault's Key-Value storage lease Interact with leases monitor Stream log messages from a Vault server namespace Interact with namespaces operator Perform operator-specific tasks path-help Retrieve API help for paths plugin Interact with Vault plugins and catalog policy Interact with policies print Prints runtime configurations secrets Interact with secrets engines ssh Initiate an SSH session token Interact with tokens
If you get an error that the binary could not be found, then your PATH
environment variable might no be properly set. Please go back and ensure that your
PATH
variable contains the directory where Vault was installed.
Otherwise, Vault is installed and ready to go.
Summary
Vault is available to install for most operating systems and through common
software distribution tools such as apt
and yum
. In addition to the
pre-compiled binaries, you can also review the Vault source code and compile
your own binary.