>**Note:** Configuration file settings are documented here for the latest official release - the [sample configuration file on GitHub](https://github.com/influxdb/influxdb/blob/1.6/etc/config.sample.toml) might be slightly newer.
## Environment variables
All of the configuration settings in the configuration file can be specified either in the configuration file or in an environment variable.
The environment variable overrides the equivalent option in the configuration
file.
If a configuration option is not specified in either the configuration file or in an environment variable, InfluxDB uses its internal default configuration.
> ***Note:*** If an environment variable has already been set, the equivalent configuration setting in the configuration file is ignored.
### InfluxDB environment variables (`INFLUXDB_*`)
The InfluxDB environment variables are documented below with the corresponding configuration file settings. All of the InfluxDB-specific environment variables are prefixed with `INFLUXDB_`.
### `GOMAXPROCS` environment variable
> ***Note:*** The GOMAXPROCS environment variable cannot be set using the InfluxDB configuration file settings, like other environment variables.
The `GOMAXPROCS` [Go language environment variable](https://golang.org/pkg/runtime/#hdr-Environment_Variables) can be used to set the maximum number of CPUs that can execute simultaneously.
The default value of `GOMAXPROCS` is the number of CPUs (whatever your operating system considers to be a CPU) that are visible to the program *on startup.* For a 32-core machine, the `GOMAXPROCS` value would be `32`.
You can override this value to be less than the maximum value, which can be useful in cases where you are running the InfluxDB along with other processes on the same machine and want to ensure that the database doesn't completely starve those processes.
> ***Note:***
> Setting `GOMAXPROCS=1` will eliminate all parallelization.
## Using the configuration file
The InfluxDB system has internal defaults for all of the settings in the configuration file. To view the default configuration settings, use the `influxd config` command.
The local InfluxDB configuration file is located here:
- Linux: `/etc/influxdb/influxdb.conf`
- macOS: `/usr/local/etc/influxdb.conf`
Settings that are commented out are set to the internal system defaults. Uncommented settings override the internal defaults.
Note that the local configuration file does not need to include every configuration setting.
There are two ways to launch InfluxDB with your configuration file:
* Point the process to the configuration file by using the `-config`
option. For example:
```bash
influxd -config /etc/influxdb/influxdb.conf
```
* Set the environment variable `INFLUXDB_CONFIG_PATH` to the path of your
configuration file and start the process.
For example:
```
echo $INFLUXDB_CONFIG_PATH
/etc/influxdb/influxdb.conf
influxd
```
InfluxDB first checks for the `-config` option and then for the environment
variable.
## Configuration file settings
> **Note:**
> To set or override settings in a config section that allows multiple
> configurations (any section with `[[double_brackets]]` in the header supports
> multiple configurations), the desired configuration must be specified by ordinal
> number.
> For example, for the first set of `[[graphite]]` environment variables,
> prefix the configuration setting name in the environment variable with the
> relevant position number (in this case: `0`):
>
INFLUXDB_GRAPHITE_0_BATCH_PENDING
INFLUXDB_GRAPHITE_0_BATCH_SIZE
INFLUXDB_GRAPHITE_0_BATCH_TIMEOUT
INFLUXDB_GRAPHITE_0_BIND_ADDRESS
INFLUXDB_GRAPHITE_0_CONSISTENCY_LEVEL
INFLUXDB_GRAPHITE_0_DATABASE
INFLUXDB_GRAPHITE_0_ENABLED
INFLUXDB_GRAPHITE_0_PROTOCOL
INFLUXDB_GRAPHITE_0_RETENTION_POLICY
INFLUXDB_GRAPHITE_0_SEPARATOR
INFLUXDB_GRAPHITE_0_TAGS
INFLUXDB_GRAPHITE_0_TEMPLATES
INFLUXDB_GRAPHITE_0_UDP_READ_BUFFER
>
>For the Nth Graphite configuration in the configuration file, the relevant
>environment variables would be of the form `INFLUXDB_GRAPHITE_(N-1)_BATCH_PENDING`.
>For each section of the configuration file the numbering restarts at zero.
## Global settings
### `reporting-disabled = false`
InfluxData uses voluntarily reported data from running InfluxDB nodes
primarily to track the adoption rates of different InfluxDB versions.
This data helps InfluxData support the continuing development of
InfluxDB.
The `reporting-disabled` option toggles
the reporting of data every 24 hours to `usage.influxdata.com`.
Each report includes a randomly-generated identifier, OS, architecture,
InfluxDB version, and the
number of [databases](/influxdb/v1.6/concepts/glossary/#database),
[measurements](/influxdb/v1.6/concepts/glossary/#measurement), and
The bind address to use for the RPC service for [backup and restore](/influxdb/v1.6/administration/backup_and_restore/).
Environment variable: `INFLUXDB_BIND_ADDRESS`
## Metastore settings `[meta]`
This section controls parameters for InfluxDB's metastore,
which stores information on users, databases, retention policies, shards, and continuous queries.
### `dir = "/var/lib/influxdb/meta"`
The `meta` directory.
Files in the `meta` directory include `meta.db`, the InfluxDB metastore file.
>**Note:** The default directory for macOS installations is `/Users/<username>/.influxdb/meta`
Environment variable: `INFLUXDB_META_DIR`
### `retention-autocreate = true`
Retention policy auto-creation automatically creates the [`DEFAULT` retention policy](/influxdb/v1.6/concepts/glossary/#retention-policy-rp) `autogen` when a database is created.
The retention policy `autogen` has an infinite duration and is also set as the
database's `DEFAULT` retention policy, which is used when a write or query does
not specify a retention policy.
Disable this setting to prevent the creation of this retention policy when creating databases.
The `[data]` settings control where the actual shard data for InfluxDB lives and how it is flushed from the WAL. `dir` may need to be changed to a suitable place for your system, but the WAL settings are an advanced configuration. The defaults should work for most systems.
### `dir = "/var/lib/influxdb/data"`
The directory where InfluxDB stores the data.
This directory may be changed.
>**Note:** The default directory for macOS installations is `/Users/<username>/.influxdb/data`.
Environment variable: `INFLUXDB_DATA_DIR`
### `index-version = "inmem"`
The type of shard index to use for new shards.
The default (`inmem`) index is an in-memory index that is recreated at startup.
To enable the Time Series Index (TSI) disk-based index, set the value to `tsi1`.
The cache snapshot write cold duration is the length of time at which the engine will snapshot the cache and write it to a new TSM file if the shard hasn't received writes or deletes.
The compact full write cold duration is the duration at which the engine will compact all TSM files in a shard if it hasn't received a write or delete.
The maximum number of concurrent full and level [compactions](/influxdb/v1.6/concepts/storage_engine/#compactions) that can run at one time.
The default value of `0` results in 50% of the CPU cores being used at runtime for compactions.
If explicitly set, the number of cores used for compaction is limited to the specified value.
This setting does not apply to cache snapshotting. For more information on GOMAXPROCS environment variable, see the [`GOMAXPROCS` environment variable](#gomaxprocs-environment-variable) section on this page.
If `true`, then the MMap Advise value `MADV_WILLNEED` advises the kernel about how to handle the mapped memory region in terms of input/output paging and to expect access to the mapped memory region in the near future, with respect to TSM files. Because this setting has been problematic on some kernels (including CentOS and RHEL ), the default is `false`.
Changing the value to `true` might help users who have slow disks in some cases.
This section controls InfluxDB's [system self-monitoring](https://github.com/influxdata/influxdb/blob/1.6/monitor/README.md).
By default, InfluxDB writes the data to the `_internal` database.
If that database does not exist, InfluxDB creates it automatically.
The `DEFAULT` retention policy on the `_internal` database is seven days.
If you want to use a retention policy other than the seven-day retention policy, you must [create](/influxdb/v1.6/query_language/database_management/#retention-policy-management) it.
### `store-enabled = true`
Set to `false` to disable recording statistics internally.
If set to `false` it will make it substantially more difficult to diagnose issues with your installation.
The `[http]` settings control how InfluxDB configures the HTTP endpoints.
These are the primary mechanisms for getting data into and out of InfluxDB.
Edit the settings in this section to enable HTTPS and authentication.
See [Authentication and Authorization](/influxdb/v1.6/administration/authentication_and_authorization/).
### `enabled = true`
Determines whether HTTP endpoint is enabled. Set to `false` to disable HTTP. Note that the InfluxDB [command line interface (CLI)](/influxdb/v1.6/tools/shell/) connects to the database using the HTTP API.
Specifies the maximum size (in bytes) of a client request body.
When a client sends data that exceeds the configured maximum size, a `413 Request Entity Too Large` HTTP response is returned. Setting this value to `0` disables the limit.
Available options are `auto`, `logfmt`, and `json`. With the default `auto` option, if the output is to a TTY device (e.g., a terminal), a more user-friendly console encoding is used. If the output is to files, the auto option uses the `logfmt` encoding. The `logfmt` and `json` options are useful for integration with external tools.
Environment variable: `INFLUXDB_LOGGING_FORMAT`
### `level = "info"`
Sets the log level to be emitted. Valid logging level values are `error`, `warn`, `info`(default), and `debug`. Logs that are equal to, or above, the specified level will be emitted.
Environment variable: `INFLUXDB_LOGGING_LEVEL`
### `suppress-logo = false`
Suppresses the logo output that is printed when the program is started.
The logo is always suppressed if `STDOUT` is not a TTY.
If the requirement is not met the return value will be either `partial write` if some points in the batch fail or `write failure` if all points in the batch fail.
For more information, see the Query String Parameters for Writes section in the [Line Protocol Syntax Reference ](/influxdb/v1.6/write_protocols/line_protocol_reference/).
When set to `split`, multi-value plugin data (e.g. df free:5000,used:1000) will be split into separate measurements (e.g., (df_free, value=5000) (df_used, value=1000)). When set to `join`, multi-value plugin will be stored as a single multi-value measurement (e.g., (df, free=5000,used=1000)). Defaults to `split`.
## OpenTSDB settings `[[opentsdb]]`
Controls the listener for OpenTSDB data.
See the [README](https://github.com/influxdb/influxdb/blob/1.6/services/opentsdb/README.md) on GitHub for more information.
[Time precision](/influxdb/v1.6/query_language/spec/#durations) used when decoding time values. Defaults to `nanoseconds` which is the default of the database.
The interval at which InfluxDB checks to see if a CQ needs to run. Set this option to the lowest interval at which your CQs run. For example, if your most frequent CQ runs every minute, set `run-interval` to `1m`.
## Transport Layer Security (TLS) settings `[tls]`
Global configuration settings for Transport Layer Security (TLS) in InfluxDB.
If the TLS configuration settings is not specified, InfluxDB supports all of the cipher suite IDs listed and all TLS versions implemented in the [Constants section of the Go `crypto/tls` package documentation](https://golang.org/pkg/crypto/tls/#pkg-constants), depending on the version of Go used to build InfluxDB.
Use the `SHOW DIAGNOSTICS` command to see the version of Go used to build InfluxDB.
### Recommended server configuration for "modern compatibility"
InfluxData recommends configuring your InfluxDB server's TLS settings for "modern compatibility" that provides a higher level of security and assumes that backward compatibility is not required.
Our recommended TLS configuration settings for `ciphers`, `min-version`, and `max-version` are based on Mozilla's "modern compatibility" TLS server configuration described in [Security/Server Side TLS](https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility).
InfluxData's recommended TLS settings for "modern compatibility" are specified in the following configuration settings example.
> **Important:*** The order of the cipher suite IDs in the `ciphers` setting determines which algorithms are selected by priority. The TLS `min-version` and the `max-version` settings restrict support to TLS 1.2.
Specifies the set of cipher suite IDs to negotiate. If not specified, `ciphers` supports all existing cipher suite IDs listed in the Go `crypto/tls` package. This is consistent with the behavior within previous releases. In this example, only the two specified cipher suite IDs would be supported.
Environment variable: `INFLUXDB_TLS_CIPHERS`
### `min-version = "tls1.0"`
Minimum version of the TLS protocol that will be negotiated. Valid values include: `tls1.0`, `tls1.1`, and `tls1.2`. If not specified, `min-version` is the minimum TLS version specified in the [Go `crypto/tls` package](https://golang.org/pkg/crypto/tls/#pkg-constants). In this example, `tls1.0` specifies the minimum version as TLS 1.0, which is consistent with the behavior of previous InfluxDB releases.
Environment variable: `INFLUXDB_TLS_MIN_VERSION`
### `max-version = "tls1.2"`
Maximum version of the TLS protocol that will be negotiated. Valid values include: `tls1.0`, `tls1.1`, and `tls1.2`. If not specified, `max-version` is the maximum TLS version specified in the [Go `crypto/tls` package](https://golang.org/pkg/crypto/tls/#pkg-constants). In this example, `tls1.2` specifies the maximum version as TLS 1.2, which is consistent with the behavior of previous InfluxDB releases.