Configuration options can be set in three places:
Options set on the command line take precedence over all other sources. Options set in environment variables take precedence over options set in configuration files.
-name - The node name. Defaults to the hostname.-addr - The advertised public hostname:port for client communication. Defaults to 127.0.0.1:4001.-discovery - A URL to use for discovering the peer list. (i.e "https://discovery.etcd.io/your-unique-key").-bind-addr - The listening hostname for client communication. Defaults to advertised IP.-peers - A comma separated list of peers in the cluster (i.e "203.0.113.101:7001,203.0.113.102:7001").-peers-file - The file path containing a comma separated list of peers in the cluster.-ca-file - The path of the client CAFile. Enables client cert authentication when present.-cert-file - The cert file of the client.-key-file - The key file of the client.-config - The path of the etcd configuration file. Defaults to /etc/etcd/etcd.conf.-cors - A comma separated white list of origins for cross-origin resource sharing.-cpuprofile - The path to a file to output CPU profile data. Enables CPU profiling when present.-data-dir - The directory to store log and snapshot. Defaults to the current working directory.-max-result-buffer - The max size of result buffer. Defaults to 1024.-max-cluster-size - The max size of the cluster. Defaults to 9.-max-retry-attempts - The max retry attempts when trying to join a cluster. Defaults to 3.-peer-addr - The advertised public hostname:port for server communication. Defaults to 127.0.0.1:7001.-peer-bind-addr - The listening hostname for server communication. Defaults to advertised IP.-peer-ca-file - The path of the CAFile. Enables client/peer cert authentication when present.-peer-cert-file - The cert file of the server.-peer-key-file - The key file of the server.-peer-election-timeout - The number of milliseconds to wait before the leader is declared unhealthy.-snapshot=false - Disable log snapshots. Defaults to true.-v - Enable verbose logging. Defaults to false.-vv - Enable very verbose logging. Defaults to false.-version - Print the version and exit.The etcd configuration file is written in TOML
and read from /etc/etcd/etcd.conf by default.
addr = "127.0.0.1:4001"
bind_addr = "127.0.0.1:4001"
ca_file = ""
cert_file = ""
cors = []
cpu_profile_file = ""
data_dir = "."
discovery = "http://etcd.local:4001/v2/keys/_etcd/registry/examplecluster"
key_file = ""
peers = []
peers_file = ""
max_cluster_size = 9
max_result_buffer = 1024
max_retry_attempts = 3
name = "default-name"
snapshot = false
verbose = false
very_verbose = false
[peer]
addr = "127.0.0.1:7001"
bind_addr = "127.0.0.1:7001"
ca_file = ""
cert_file = ""
key_file = ""
ETCD_ADDRETCD_BIND_ADDRETCD_CA_FILEETCD_CERT_FILEETCD_CORS_ORIGINSETCD_CONFIGETCD_CPU_PROFILE_FILEETCD_DATA_DIRETCD_DISCOVERYETCD_KEY_FILEETCD_PEERSETCD_PEERS_FILEETCD_MAX_CLUSTER_SIZEETCD_MAX_RESULT_BUFFERETCD_MAX_RETRY_ATTEMPTSETCD_NAMEETCD_SNAPSHOTETCD_VERBOSEETCD_VERY_VERBOSEETCD_PEER_ADDRETCD_PEER_BIND_ADDRETCD_PEER_CA_FILEETCD_PEER_CERT_FILEETCD_PEER_KEY_FILEETCD_PEER_ELECTION_TIMEOUT