github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/website/source/docs/config/index.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Server Configuration"
     4  sidebar_current: "docs-config"
     5  description: |-
     6    Vault server configuration reference.
     7  ---
     8  
     9  # Server Configuration
    10  
    11  Outside of development mode, Vault servers are configured using a file.
    12  The format of this file is [HCL](https://github.com/hashicorp/hcl) or JSON.
    13  An example configuration is shown below:
    14  
    15  ```javascript
    16  backend "consul" {
    17    address = "127.0.0.1:8500"
    18    path = "vault"
    19  }
    20  
    21  listener "tcp" {
    22    address = "127.0.0.1:8200"
    23    tls_disable = 1
    24  }
    25  
    26  telemetry {
    27    statsite_address = "127.0.0.1:8125"
    28    disable_hostname = true
    29  }
    30  ```
    31  
    32  After the configuration is written, use the `-config` flag with `vault server`
    33  to specify where the configuration is.
    34  
    35  ## Reference
    36  
    37  * `backend` (required) - Configures the storage backend where Vault data
    38    is stored. There are multiple options available for storage backends,
    39    and they're documented below.
    40  
    41  * `listener` (required) - Configures how Vault is listening for API requests.
    42    "tcp" is currently the only option available. A full reference for the
    43     inner syntax is below.
    44  
    45  * `disable_mlock` (optional) - A boolean. If true, this will disable the
    46    server from executing the `mlock` syscall to prevent memory from being
    47    swapped to disk. This is not recommended in production (see below).
    48  
    49  * `telemetry` (optional)  - Configures the telemetry reporting system
    50    (see below).
    51  
    52  * `default_lease_duration` (optional) - Configures the default lease
    53    duration for tokens and secrets, specified in hours. Default value
    54    is 30 days. This value cannot be larger than `max_lease_duration`.
    55  
    56  * `max_lease_duration` (optional) - Configures the maximum possible
    57    lease duration for tokens and secrets, specified in hours. Default
    58    value is 30 days.
    59  
    60  In production, you should only consider setting the `disable_mlock` option
    61  on Linux systems that only use encrypted swap or do not use swap at all.
    62  Vault does not currently support memory locking on Mac OS X and Windows
    63  and so the feature is automatically disabled on those platforms.  To give
    64  the Vault executable access to the `mlock` syscall on Linux systems:
    65  
    66  ```shell
    67  sudo setcap cap_ipc_lock=+ep $(readlink -f $(which vault))
    68  ```
    69  
    70  ## Backend Reference
    71  
    72  For the `backend` section, the supported backends are shown below.
    73  Vault requires that the backend itself will be responsible for backups,
    74  durability, etc.
    75  
    76    * `consul` - Store data within [Consul](https://www.consul.io). This
    77        backend supports HA. It is the most recommended backend for Vault
    78        and has been shown to work at high scale under heavy load.
    79  
    80    * `etcd` - Store data within [etcd](https://coreos.com/etcd/).
    81        This backend supports HA.
    82  
    83    * `zookeeper` - Store data within [Zookeeper](https://zookeeper.apache.org/).
    84        This backend supports HA.
    85  
    86    * `s3` - Store data within an S3 bucket [S3](https://aws.amazon.com/s3/).
    87        This backend does not support HA.
    88  
    89    * `mysql` - Store data within MySQL. This backend does not support HA.
    90  
    91    * `inmem` - Store data in-memory. This is only really useful for
    92        development and experimentation. Data is lost whenever Vault is
    93        restarted.
    94  
    95    * `file` - Store data on the filesystem using a directory structure.
    96        This backend does not support HA.
    97  
    98  #### Common Backend Options
    99  
   100  All backends support the following options:
   101  
   102    * `advertise_addr` (optional) - For backends that support HA, this
   103        is the address to advertise to other Vault servers in the cluster
   104        for request forwarding. Most HA backends will attempt to determine
   105        the advertise address if not provided.
   106  
   107  #### Backend Reference: Consul
   108  
   109  For Consul, the following options are supported:
   110  
   111    * `path` (optional) - The path within Consul where data will be stored.
   112        Defaults to "vault/".
   113  
   114    * `address` (optional) - The address of the Consul agent to talk to.
   115        Defaults to the local agent address, if available.
   116  
   117    * `scheme` (optional) - "http" or "https" for talking to Consul.
   118  
   119    * `datacenter` (optional) - The datacenter within Consul to write to.
   120        This defaults to the local datacenter.
   121  
   122    * `token` (optional) - An access token to use to write data to Consul.
   123  
   124    * `tls_skip_verify` (optional) - If non-empty, then TLS host verification
   125        will be disabled for Consul communication.
   126        Defaults to false.
   127  
   128    The following settings should be set according to your [Consul encryption settings](https://www.consul.io/docs/agent/encryption.html):
   129  
   130    * `tls_ca_file` (optional) - The path to the CA certificate used for Consul communication.
   131        Defaults to system bundle if not specified.
   132        Set accordingly to the [ca_file](https://www.consul.io/docs/agent/options.html#ca_file) setting in Consul.
   133  
   134    * `tls_cert_file` (optional) - The path to the certificate for Consul communication.
   135        Set accordingly to the [cert_file](https://www.consul.io/docs/agent/options.html#cert_file) setting in Consul.
   136  
   137    * `tls_key_file` (optional) - The path to the private key for Consul communication.
   138        Set accordingly to the [key_file](https://www.consul.io/docs/agent/options.html#key_file) setting in Consul.
   139  
   140  #### Backend Reference: Zookeeper
   141  
   142  For Zookeeper, the following options are supported:
   143  
   144    * `path` (optional) - The path within Zookeeper where data will be stored.
   145        Defaults to "vault/".
   146  
   147    * `address` (optional) - The address(es) of the Zookeeper instance(s) to talk to.
   148        Can be comma separated list (host:port) of many Zookeeper instances.
   149        Defaults to "localhost:2181" if not specified.
   150  
   151  #### Backend Reference: etcd
   152  
   153  For etcd, the following options are supported:
   154  
   155    * `path` (optional) - The path within etcd where data will be stored.
   156        Defaults to "vault/".
   157  
   158    * `address` (optional) - The address(es) of the etcd instance(s) to talk to.
   159        Can be comma separated list (protocol://host:port) of many etcd instances.
   160        Defaults to "http://localhost:4001" if not specified.
   161  
   162  #### Backend Reference: S3
   163  
   164  For S3, the following options are supported:
   165  
   166    * `bucket` (required) - The name of the S3 bucket to use.
   167  
   168    * `access_key` - (required) The AWS access key. It must be provided, but it can also be sourced from the AWS_ACCESS_KEY_ID environment variable.
   169  
   170    * `secret_key` - (required) The AWS secret key. It must be provided, but it can also be sourced from the AWS_SECRET_ACCESS_KEY environment variable.
   171  
   172    * `session_token` - (optional) The AWS session_token. It can also be sourced from the AWS_SESSION_TOKEN environment variable.
   173  
   174    * `region` (optional) - The AWS region. It can be sourced from the AWS_DEFAULT_REGION environment variable and will default to "us-east-1" if not specified.
   175  
   176  #### Backend Reference: MySQL
   177  
   178  The MySQL backend has the following options:
   179  
   180    * `username` (required) - The MySQL username to connect with.
   181  
   182    * `password` (required) - The MySQL password to connect with.
   183  
   184    * `address` (optional) - The address of the MySQL host. Defaults to
   185      "127.0.0.1:3306.
   186  
   187    * `database` (optional) - The name of the database to use. Defaults to "vault".
   188  
   189    * `table` (optional) - The name of the table to use. Defaults to "vault".
   190  
   191    * `tls_ca_file` (optional) - The path to the CA certificate to connect using TLS
   192  
   193  #### Backend Reference: Inmem
   194  
   195  The in-memory backend has no configuration options.
   196  
   197  #### Backend Reference: File
   198  
   199  The file backend has the following options:
   200  
   201    * `path` (required) - The path on disk to a directory where the
   202        data will be stored.
   203  
   204  ## Listener Reference
   205  
   206  For the `listener` section, the only supported listener currently
   207  is "tcp". Regardless of future plans, this is the recommended listener,
   208  since it allows for HA mode.
   209  
   210  The supported options are:
   211  
   212    * `address` (optional) - The address to bind to for listening. This
   213        defaults to "127.0.0.1:8200".
   214  
   215    * `tls_disable` (optional) - If non-empty, then TLS will be disabled.
   216        This is an opt-in; Vault assumes by default that TLS will be used.
   217  
   218    * `tls_cert_file` (required unless disabled) - The path to the certificate
   219        for TLS.
   220  
   221    * `tls_key_file` (required unless disabled) - The path to the private key
   222        for the certificate.
   223  
   224    * `tls_min_version` (optional) - **(Vault > 0.2)** If provided, specifies
   225        the minimum supported version of TLS. Accepted values are "tls10", "tls11"
   226        or "tls12". This defaults to "tls12". WARNING: TLS 1.1 and lower
   227        are generally considered less secure; avoid using these if
   228        possible.
   229  
   230  ## Telemetry Reference
   231  
   232  For the `telemetry` section, there is no resource name. All configuration
   233  is within the object itself.
   234  
   235  * `statsite_address` (optional) - An address to a [Statsite](https://github.com/armon/statsite)
   236    instances for metrics. This is highly recommended for production usage.
   237  
   238  * `statsd_address` (optional) - This is the same as `statsite_address` but
   239    for StatsD.
   240  
   241  * `disable_hostname` (optional) - Whether or not to prepend runtime telemetry
   242    with the machines hostname. This is a global option. Defaults to false.