Instalation
Vault is a single binary. To install in a linux system there is two options
- Use the repository (for example in Ubuntu, more here)
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" sudo apt-get update && sudo apt-get install vault
-
Dowload the binary, unzip it and move it to the path.
Afterwards use this command to test it:
vault --help
dev
mode
Vault server can be initated in -dev
mode Is not secure but allows to interact locally with vault
To run it
vault server -dev
...
vault status
Afterwards, in order to run a client, the following environment variables and data should be present
export VAULT_ADDR='http://127.0.0.1:8200'
export VAULT_TOKEN="s.aG0eAygkOQB7pITOH9xF5uln"
Unseal Key: vvP1DiOAjUoxDS4lm+bvFKewbAOieB3B1R6g6nEdzRU=
In the -dev
mode, vault gives this data in a non secure manner.
$VAULT_ADDR
is used by the CLI to determine to which instance of vault to connect$VAULT_TOKEN
is need to authenticate the CLI to vault. By setting it as env variable, there is no need forvault login
UI
Running on -dev
mode, an UI is exposed at port 8200