With Vault installed, the next step is to start a Vault server.
Vault operates as a client/server application. The Vault server is the only piece of the Vault architecture that interacts with the data storage and backends. All operations done via the Vault CLI interact with the server over a TLS connection.
In this guide, you will start and interact with the Vault server running in development mode.
»Starting the Dev Server
First, start a Vault dev server. The dev server is a built-in, pre-configured server that is not very secure but useful for playing with Vault locally. Later in the Deploy Vault guide, you will configure and start a non-dev server.
To start the Vault dev server, run:
vault server -dev ==> Vault server configuration: Api Address: http://127.0.0.1:8200 Cgo: disabled Cluster Address: https://127.0.0.1:8201 Listener 1: tcp (addr: "127.0.0.1:8200", cluster address: "127.0.0.1:8201", max_request_duration: "1m30s", max_request_size: "33554432", tls: "disabled") Log Level: info Mlock: supported: false, enabled: false Recovery Mode: false Storage: inmem Version: Vault v1.4.1 WARNING! dev mode is enabled! In this mode, Vault runs entirely in-memory and starts unsealed with a single unseal key. The root token is already authenticated to the CLI, so you can immediately begin using Vault. You may need to set the following environment variable: $ export VAULT_ADDR='http://127.0.0.1:8200' The unseal key and root token are displayed below in case you want to seal/unseal the Vault or re-authenticate. Unseal Key: 1+yv+v5mz+aSCK67X6slL3ECxb4UDL8ujWZU/ONBpn0= Root Token: s.XmpNPoi9sRhYtdKHaQhkHP6x Development mode should NOT be used in production installations! ==> Vault server started! Log data will stream in below: ...
You should see output similar to that above. Notice that Unseal Key and Root Token values are displayed.
The dev server stores all its data in-memory (but still encrypted), listens
localhost without TLS, and automatically unseals and shows you the unseal
key and root access key.
With the dev server started, perform the following:
Launch a new terminal session.
Copy and run the
export VAULT_ADDR ...command from the terminal output. This will configure the Vault client to talk to our dev server.
Save the unseal key somewhere. Don't worry about how to save this securely. For now, just save it anywhere.
VAULT_DEV_ROOT_TOKEN_IDenvironment variable value to the generated Root Token value displayed in the terminal output.
Setting this environment variable is a way to provide the token to Vault. Later, you will learn the
vault login <token_value>command to authenticate with Vault.
»Verify the Server is Running
Verify the server is running by running the
vault status command. If it ran
successfully, the output should look like the following:
vault status Key Value --- ----- Seal Type shamir Initialized true Sealed false Total Shares 1 Threshold 1 Version 1.4.1 Cluster Name vault-cluster-8f0173e3 Cluster ID e1cf6a00-5e33-f8fd-b035-4889fbca1ebc HA Enabled false
If the output looks different, restart the dev server and try again. The only reason these would ever be different is if you're running a dev server from going through this guide previously.
You will learn more about the status output in the Deploy Vault guide.
Congratulations! You've started your first Vault server. Continue onto the Your First Secret guide to store secrets in Vault.