- Vault should be configured using a
config.hclfile.- This file is written in HCL
- Example:
storage "raft" { path = "./vault/data" node_id = "node1" } listener "tcp" { address = "127.0.0.1:8200" tls_disable = "true" } api_addr = "http://127.0.0.1:8200" cluster_addr = "https://127.0.0.1:8201" ui = true - Has two primary configurations
storagedetermines the physical backend that vault will use (in-devmode is memory, but e.g.raftis more suitable to production)listenerOne or more listeners determine how Vault listens for API requests.
api_addrdetermines where the api can be reached,cluster_addrdetermines the port for internal communication between vault nodes in a cluster
- Physical storage needs to be created
- In the case of
raft, the folder./vault/dataneeds to exist
- In the case of
- Server is started with
vault server -config=<path_to_config_file> - Once is created, the env variable
$VAULT_ADDRshould be set vault operator initallows for a first time only unauthorized access to initate vault- Outputs the 5 unseal keys and a initial root token
- A number of keys (normally 3/5) are required to unseal vault
- They are each input after
vault operator unseal - Ideally not one person has all unseal keys, and the process is done from different machines each with a key
- They are each input after
- Once unsealed , one can login with the initial root token