You are viewing the documentation of an older version of the TiDB database (TiDB v2.1).

It is recommended that you use the latest LTS version of the TiDB database.

TiKV Configuration Flags

TiKV supports some readable unit conversions for command line parameters.

  • File size (based on byte): KB, MB, GB, TB, PB (or lowercase)
  • Time (based on ms): ms, s, m, h

-A, --addr

  • The address that the TiKV server monitors
  • Default: ""
  • To deploy a cluster, you must use --addr to specify the IP address of the current host, such as "". If the cluster is run on Docker, specify the IP address of Docker as "".


  • The server advertise address for client traffic from outside
  • Default: ${addr}
  • If the client cannot connect to TiKV through the default monitoring address because of Docker or NAT network, you must manually set the advertise address explicitly.
  • For example, the internal IP address of Docker is, while the IP address of the host is and the port mapping is set to -p 20160:20160. In this case, you can set --advertise-addr to "". The client can find this service through

-C, --config

  • The config file
  • Default: ""
  • If you set the configuration using the command line, the same setting in the config file will be overwritten.


  • The store capacity
  • Default: 0 (unlimited)
  • PD uses this flag to determine how to balance the TiKV servers. (Tip: you can use 10GB instead of 1073741824)


  • The path to the data directory
  • Default: "/tmp/tikv/store"

-L, --Log

  • The log level
  • Default: "info"
  • You can choose from trace, debug, info, warn, error, or off.


  • The log file
  • Default: ""
  • If this flag is not set, logs will be written to stderr. Otherwise, logs will be stored in the log file which will be automatically rotated every day.


  • The address list of PD servers
  • Default: ""
  • To make TiKV work, you must use the value of --pd to connect the TiKV server to the PD server. Separate multiple PD addresses using comma, for example ",,".
Was this page helpful?