Manually install a Vault binary
Install Vault using a compiled binary.
Before you start
- You must have a valid Vault binary. You can download and unzip a precompiled binary or build a local instance of Vault from source code.
Step 1: Configure the environment
Set the
VAULT_DATA
environment variable to your preferred Vault data directory. For example,/opt/vault/data
:Set the
VAULT_CONFIG
environment variable to your preferred Vault configuration directory. For example,/etc/vault.d
:Move the Vault binary to
/usr/bin
:Ensure the Vault binary can use
mlock()
to run as a non-root user:See the support article Vault and mlock() for more information.
Create your Vault data directory:
Create your Vault configuration directory:
Best practice
We recommend storing Vault data and Vault logs on different volumes than the operating system.Step 2: Configure user permissions
Create a system user called
vault
to run Vault when your Vault data directory ashome
andnologin
as the shell:Change directory ownership of your data directory to the
vault
user:Grant the
vault
user full permission on the data directory, search permission for the group, and deny access to others:
Step 3: Create a basic configuration file
Create a basic Vault configuration file for testing and development.
Always enable TLS for production
The sample configuration below disables TLS for simplicity and is not appropriate for production use. Refer to the configuration documentation for a full list of supported parameters.
Create a file called
vault.hcl
under your configuration directory:Change ownership and permissions on the Vault configuration file.
Step 4: Verify your installation
To confirm your Vault installation, use the help option with the Vault CLI to confirm the CLI is accessible and bring up the server in development mode to confirm you can run the binary.
Bring up the help menu in the Vault CLI:
Use the Vault CLI to bring up a Vault server in development mode:
Related tutorials
The following tutorials provide additional guidance for installing Vault and production cluster deployment: