2017-03-08 02:47:23 +00:00
---
layout: "docs"
page_title: "Server Configuration"
New Docs Website (#5535)
* conversion stage 1
* correct image paths
* add sidebar title to frontmatter
* docs/concepts and docs/internals
* configuration docs and multi-level nav corrections
* commands docs, index file corrections, small item nav correction
* secrets converted
* auth
* add enterprise and agent docs
* add extra dividers
* secret section, wip
* correct sidebar nav title in front matter for apu section, start working on api items
* auth and backend, a couple directory structure fixes
* remove old docs
* intro side nav converted
* reset sidebar styles, add hashi-global-styles
* basic styling for nav sidebar
* folder collapse functionality
* patch up border length on last list item
* wip restructure for content component
* taking middleman hacking to the extreme, but its working
* small css fix
* add new mega nav
* fix a small mistake from the rebase
* fix a content resolution issue with middleman
* title a couple missing docs pages
* update deps, remove temporary markup
* community page
* footer to layout, community page css adjustments
* wip downloads page
* deps updated, downloads page ready
* fix community page
* homepage progress
* add components, adjust spacing
* docs and api landing pages
* a bunch of fixes, add docs and api landing pages
* update deps, add deploy scripts
* add readme note
* update deploy command
* overview page, index title
* Update doc fields
Note this still requires the link fields to be populated -- this is solely related to copy on the description fields
* Update api_basic_categories.yml
Updated API category descriptions. Like the document descriptions you'll still need to update the link headers to the proper target pages.
* Add bottom hero, adjust CSS, responsive friendly
* Add mega nav title
* homepage adjustments, asset boosts
* small fixes
* docs page styling fixes
* meganav title
* some category link corrections
* Update API categories page
updated to reflect the second level headings for api categories
* Update docs_detailed_categories.yml
Updated to represent the existing docs structure
* Update docs_detailed_categories.yml
* docs page data fix, extra operator page remove
* api data fix
* fix makefile
* update deps, add product subnav to docs and api landing pages
* Rearrange non-hands-on guides to _docs_
Since there is no place for these on learn.hashicorp, we'll put them
under _docs_.
* WIP Redirects for guides to docs
* content and component updates
* font weight hotfix, redirects
* fix guides and intro sidenavs
* fix some redirects
* small style tweaks
* Redirects to learn and internally to docs
* Remove redirect to `/vault`
* Remove `.html` from destination on redirects
* fix incorrect index redirect
* final touchups
* address feedback from michell for makefile and product downloads
2018-10-19 15:40:11 +00:00
sidebar_title: "Configuration"
2017-03-08 02:47:23 +00:00
sidebar_current: "docs-configuration"
description: |-
Vault server configuration reference.
---
# Vault Configuration
Outside of development mode, Vault servers are configured using a file.
The format of this file is [HCL ](https://github.com/hashicorp/hcl ) or JSON.
An example configuration is shown below:
```javascript
2017-03-08 14:17:00 +00:00
storage "consul" {
2017-03-08 02:47:23 +00:00
address = "127.0.0.1:8500"
path = "vault"
}
listener "tcp" {
address = "127.0.0.1:8200"
tls_disable = 1
}
telemetry {
statsite_address = "127.0.0.1:8125"
disable_hostname = true
}
```
After the configuration is written, use the `-config` flag with `vault server`
to specify where the configuration is.
## Parameters
2017-03-14 14:11:47 +00:00
- `storage` < tt > ([StorageBackend][storage-backend]: \<required\>)</ tt > –
2017-03-08 02:47:23 +00:00
Configures the storage backend where Vault data is stored. Please see the
[storage backends documentation][storage-backend] for the full list of
2017-03-11 14:43:14 +00:00
available storage backends. Running Vault in HA mode would require
coordination semantics to be supported by the backend. If the storage backend
supports HA coordination, HA backend options can also be specified in this
parameter block. If not, a separate `ha_storage` parameter should be
configured with a backend that supports HA, along with corresponding HA
options.
2017-03-08 02:47:23 +00:00
2017-03-14 14:11:47 +00:00
- `ha_storage` < tt > ([StorageBackend][storage-backend]: nil)</ tt > – Configures
2017-03-08 02:47:23 +00:00
the storage backend where Vault HA coordination will take place. This must be
an HA-supporting backend. If not set, HA will be attempted on the backend
2017-03-11 14:43:14 +00:00
given in the `storage` parameter. This parameter is not required if the
storage backend supports HA coordination and if HA specific options are
already specified with `storage` parameter.
2017-03-08 02:47:23 +00:00
2017-03-14 14:11:47 +00:00
- `listener` < tt > ([Listener][listener]: \<required\>)</ tt > – Configures how
2017-03-08 02:47:23 +00:00
Vault is listening for API requests.
2017-11-14 11:13:11 +00:00
- `seal` < tt > ([Seal][seal]: nil)</ tt > – Configures the seal type to use for
2018-02-12 20:20:07 +00:00
auto-unsealing, as well as for
2017-11-14 17:26:58 +00:00
[seal wrapping][sealwrap] as an additional layer of data protection.
2017-11-14 11:13:11 +00:00
2018-02-12 20:20:07 +00:00
- `cluster_name` `(string: <generated>)` – Specifies the identifier for the
Vault cluster. If omitted, Vault will generate a value. When connecting to
Vault Enterprise, this value will be used in the interface.
2017-05-19 16:32:44 +00:00
- `cache_size` `(string: "32000")` – Specifies the size of the read cache used
2017-06-05 16:32:09 +00:00
by the physical storage subsystem. The value is in number of entries, so the
total cache size depends on the size of stored entries.
2017-03-08 02:47:23 +00:00
- `disable_cache` `(bool: false)` – Disables all caches within Vault, including
the read cache used by the physical storage subsystem. This will very
significantly impact performance.
- `disable_mlock` `(bool: false)` – Disables the server from executing the
`mlock` syscall. `mlock` prevents memory from being swapped to disk. Disabling
`mlock` is not recommended in production, but is fine for local development
and testing.
Disabling `mlock` is not recommended unless the systems running Vault only
use encrypted swap or do not use swap at all. Vault only supports memory
2017-05-01 21:36:37 +00:00
locking on UNIX-like systems that support the mlock() syscall (Linux, FreeBSD, etc).
2017-04-22 20:56:01 +00:00
Non UNIX-like systems (e.g. Windows, NaCL, Android) lack the primitives to keep a
2017-03-08 02:47:23 +00:00
process's entire memory address space from spilling to disk and is therefore
automatically disabled on unsupported platforms.
On Linux, to give the Vault executable the ability to use the `mlock`
syscall without running the process as root, run:
```shell
sudo setcap cap_ipc_lock=+ep $(readlink -f $(which vault))
```
2018-03-16 13:05:01 +00:00
Note: Since each plugin runs as a separate process, you need to do the same for each plugin in your [plugins directory ](https://www.vaultproject.io/docs/internals/plugins.html#plugin-directory ).
2017-12-18 14:29:37 +00:00
If you use a Linux distribution with a modern version of systemd, you can add
the following directive to the "[Service]" configuration section:
```ini
LimitMEMLOCK=infinity
```
2017-12-04 15:56:16 +00:00
2017-06-03 12:11:03 +00:00
- `plugin_directory` `(string: "")` – A directory from which plugins are
allowed to be loaded. Vault must have permission to read files in this
directory to successfully load plugins.
2018-05-17 15:48:10 +00:00
- `telemetry` < tt > ([Telemetry][telemetry]: < none> )</ tt > – Specifies the telemetry
2017-03-08 02:47:23 +00:00
reporting system.
2018-09-05 19:52:54 +00:00
- `log_level` `(string: "")` – Specifies the log level to use; overridden by
CLI and env var parameters. On SIGHUP, Vault will update the log level to the
current value specified here (including overriding the CLI/env var
parameters). Not all parts of Vault's logging can have its level be changed
dynamically this way; in particular, secrets/auth plugins are currently not
2019-02-07 19:27:08 +00:00
updated dynamically. Supported log levels: Trace, Debug, Error, Warn, Info.
2018-09-05 19:52:54 +00:00
2017-06-20 14:12:59 +00:00
- `default_lease_ttl` `(string: "768h")` – Specifies the default lease duration
2017-03-08 02:47:23 +00:00
for tokens and secrets. This is specified using a label suffix like `"30s"` or
`"1h"` . This value cannot be larger than `max_lease_ttl` .
2017-06-20 14:12:59 +00:00
- `max_lease_ttl` `(string: "768h")` – Specifies the maximum possible lease
2017-03-08 02:47:23 +00:00
duration for tokens and secrets. This is specified using a label
suffix like `"30s"` or `"1h"` .
2018-09-18 21:30:21 +00:00
- `default_max_request_duration` `(string: "90s")` – Specifies the default
maximum request duration allowed before Vault cancels the request. This can
be overridden per listener via the `max_request_duration` value.
2017-12-18 14:29:37 +00:00
- `raw_storage_endpoint` `(bool: false)` – Enables the `sys/raw` endpoint which
allows the decryption/encryption of raw data into and out of the security
barrier. This is a highly privileged endpoint.
2017-09-15 04:21:35 +00:00
2018-05-17 15:48:10 +00:00
- `ui` `(bool: false)` – Enables the built-in web UI, which is available on all
listeners (address + port) at the `/ui` path. Browsers accessing the standard
Vault API address will automatically redirect there. This can also be provided
via the environment variable `VAULT_UI` . For more information, please see the
[ui configuration documentation ](/docs/configuration/ui/index.html ).
2017-03-08 02:47:23 +00:00
2017-09-16 21:09:37 +00:00
- `pid_file` `(string: "")` - Path to the file in which the Vault server's
Process ID (PID) should be stored.
2017-11-11 01:06:07 +00:00
### High Availability Parameters
The following parameters are used on backends that support [high availability][high-availability].
2017-12-05 17:01:35 +00:00
- `api_addr` `(string: "")` - Specifies the address (full URL) to advertise to
other Vault servers in the cluster for client redirection. This value is also
used for [plugin backends][plugins]. This can also be provided via the
2018-03-26 17:46:54 +00:00
environment variable `VAULT_API_ADDR` . In general this should be set as a full
URL that points to the value of the [`listener` ](#listener ) address.
2017-11-11 01:06:07 +00:00
- `cluster_addr` `(string: "")` - – Specifies the address to advertise to other
Vault servers in the cluster for request forwarding. This can also be provided
via the environment variable `VAULT_CLUSTER_ADDR` . This is a full URL, like
`api_addr` , but Vault will ignore the scheme (all cluster members always
use TLS with a private key/certificate).
- `disable_clustering` `(bool: false)` – Specifies whether clustering features
such as request forwarding are enabled. Setting this to true on one Vault node
will disable these features _only when that node is the active node_ .
2018-08-28 16:08:50 +00:00
### Vault Enterprise Parameters
2018-08-28 19:48:02 +00:00
The following parameters are only used with Vault Enterprise
2018-08-28 16:08:50 +00:00
- `disable_sealwrap` `(bool: false)` – Disables using [seal wrapping][sealwrap]
for any value except the master key. If this value is toggled, the new
behavior will happen lazily (as values are read or written).
2018-08-28 19:48:02 +00:00
- `disable_performance_standby` `(bool: false)` – Specifies whether performance
standbys should be disabled on this node. Setting this to true on one Vault
node will disable this feature when this node is Active or Standby. It's
2019-05-01 07:24:59 +00:00
recommended to sync this setting across all nodes in the cluster.
2018-08-28 16:08:50 +00:00
2017-03-08 02:47:23 +00:00
[storage-backend]: /docs/configuration/storage/index.html
[listener]: /docs/configuration/listener/index.html
2017-11-14 11:13:11 +00:00
[seal]: /docs/configuration/seal/index.html
2017-11-14 17:26:58 +00:00
[sealwrap]: /docs/enterprise/sealwrap/index.html
2017-03-08 02:47:23 +00:00
[telemetry]: /docs/configuration/telemetry.html
2017-11-11 01:06:07 +00:00
[high-availability]: /docs/concepts/ha.html
2018-02-12 20:20:07 +00:00
[plugins]: /docs/plugin/index.html