etcd(1)
πΈ etcd πΈ (that's etcd(1) bestie, a User Command, she's iconic)
okay so picture this: you need a key value store that is highly-available. That's her. That's etcd. She's the main character of your cluster and she never misses. π
β¨ NAME β¨
etcd β highly-available key value store. yes that's the whole name. she's simple like that. π
β¨ SYNOPSIS β¨
etcd [flags]
that's it. that's the whole vibe. flags only, no positional args, no drama. π
π FLAGS π
π Member π
all the stuff about this member specifically, her little identity crisis corner π¦
--name'default'β a human-readable name for this member. give her a name bestie, she deserves one.--data-dir'${name}.etcd'β path to the data directory. notice the default literally interpolates the member name, she's self-referential like that.--wal-dir''β path to the dedicated wal directory.--snapshot-count'100000'β how many committed transactions pile up before she triggers a snapshot to disk.--heartbeat-interval'100'β heartbeat interval, in milliseconds.--election-timeout'1000'β how long, in milliseconds, an election gets before it times out. See the tuning documentation for the deets, iykyk.--initial-election-tick-advance'true'β whether to fast-forward the initial election ticks on boot so the election happens faster.--listen-peer-urls'http://localhost:2380'β the list of URLs to listen on for peer traffic.--listen-client-urls'http://localhost:2379'β the list of URLs to listen on for client traffic.--max-snapshots'5'β max snapshot files to keep around (0means unlimited, go off).--max-wals'5'β max wal files to keep around (0means unlimited).--quota-backend-bytes'0'β raises alarms when the backend size goes over the quota you gave (0defaults to the low space quota).--backend-batch-interval''βBackendBatchIntervalis the maximum time before committing the backend transaction.--backend-batch-limit'0'βBackendBatchLimitis the maximum operations before committing the backend transaction.--max-txn-ops'128'β max number of operations allowed inside one transaction.--max-request-bytes'1572864'β biggest client request size in bytes the server will accept.--max-concurrent-streams'math.MaxUint32'β max concurrent streams each client can have open at once.--grpc-keepalive-min-time'5s'β minimum duration a client should wait before pinging the server.--grpc-keepalive-interval'2h'β how often the server pings the client to check the connection is alive (0to disable).--grpc-keepalive-timeout'20s'β extra wait before closing a non-responsive connection (0to disable).
π Clustering π
she's not like other girls, she's a distributed consensus girlie π
--initial-advertise-peer-urls'http://localhost:2380'β the list of this member's peer URLs to advertise to the rest of the cluster.--initial-cluster'default=http://localhost:2380'β initial cluster config for bootstrapping.--initial-cluster-state'new'β initial cluster state, either'new'or'existing'.--initial-cluster-token'etcd-cluster'β the initial cluster token for the etcd cluster during bootstrap. specifying this protects you from unintended cross-cluster interaction when you're running multiple clusters. very much a "boundaries" moment. π--advertise-client-urls'http://localhost:2379'β the list of this member's client URLs to advertise to the public. these advertised client URLs should be reachable by machines that talk to the etcd cluster, and etcd client libraries parse these URLs to connect to the cluster. no cap.--discovery''β discovery URL used to bootstrap the cluster.--discovery-fallback'proxy'β expected behavior ('exit'or'proxy') when the discovery service fails."proxy"supports the v2 API only. π«--discovery-proxy''β HTTP proxy to use for traffic to the discovery service.--discovery-srv''β DNS srv domain used to bootstrap the cluster.--discovery-srv-name''β suffix to the dns srv name queried when bootstrapping.--strict-reconfig-check'true'β reject reconfiguration requests that would cause quorum loss. she's protective, we love that.--pre-vote'false'β enable this to run an additional Raft election phase.--auto-compaction-retention'0'β auto compaction retention length.0means auto compaction is disabled.--auto-compaction-mode'periodic'β how to interpret'auto-compaction-retention', one of:periodic|revision.'periodic'is duration-based retention and defaults to hours if you don't give a time unit (e.g.'5m').'revision'is revision-number-based retention.--enable-v2'false'β accept etcd V2 client requests.
π Security π
TLS era. lock it down bestie, she's got certificates and she's not afraid to use them πβ¨
--cert-file''β path to the client server TLS cert file.--key-file''β path to the client server TLS key file.--client-cert-auth'false'β enable client cert authentication.--client-crl-file''β path to the client certificate revocation list file.--client-cert-allowed-hostname''β allowed TLS hostname for client cert authentication.--trusted-ca-file''β path to the client server TLS trusted CA cert file.--auto-tls'false'β client TLS using generated certificates.--peer-cert-file''β path to the peer server TLS cert file.--peer-key-file''β path to the peer server TLS key file.--peer-client-cert-auth'false'β enable peer client cert authentication.--peer-trusted-ca-file''β path to the peer server TLS trusted CA file.--peer-cert-allowed-cn''β required CN for client certs connecting to the peer endpoint.--peer-cert-allowed-hostname''β allowed TLS hostname for inter-peer authentication.--peer-auto-tls'false'β peer TLS using self-generated certificates if--peer-key-fileand--peer-cert-filearen't provided.--peer-crl-file''β path to the peer certificate revocation list file.--cipher-suites''β comma-separated list of supported TLS cipher suites between client/server and peers (empty means Go auto-populates it).--cors'*'β comma-separated whitelist of origins for CORS, aka cross-origin resource sharing (empty or*means allow all).--host-whitelist'*'β acceptable hostnames from HTTP client requests, if the server isn't secure (empty or*means allow all).
π Auth π
--auth-token'simple'β specify a v3 authentication token type and its options, either'simple'or'jwt'.--bcrypt-cost10β specify the cost / strength of the bcrypt algorithm for hashing auth passwords. valid values are between4and31.--auth-token-ttl300β time, in seconds, of the auth-token-ttl.
π Profiling and Monitoring π
she's not just pretty, she's observable ππ
--enable-pprof'false'β enable runtime profiling data via the HTTP server. the address lives at client URL +"/debug/pprof/".--metrics'basic'β set the level of detail for exported metrics. specify'extensive'to include histogram metrics.--listen-metrics-urls''β list of URLs to listen on for the metrics and health endpoints.
π Logging π
--logger'capnslog'β specify'zap'for structured logging, or'capnslog'. [WARN]'capnslog'will be deprecated in v3.5. β οΈ--log-outputs'default'β specify'stdout'or'stderr'to skip journald logging even when running under systemd, or a list of comma separated output targets.--log-level'info'β configures the log level. only supportsdebug,info,warn,error,panic, orfatal.
π v2 Proxy (to be deprecated in v4) π
she's on her way out but we still love her π₯²
--proxy'off'β proxy mode setting, one of'off','readonly'or'on'.--proxy-failure-wait5000β time, in milliseconds, an endpoint gets held in a failed state.--proxy-refresh-interval30000β time, in milliseconds, of the endpoints refresh interval.--proxy-dial-timeout1000β time, in milliseconds, for a dial to timeout.--proxy-write-timeout5000β time, in milliseconds, for a write to timeout.--proxy-read-timeout0β time, in milliseconds, for a read to timeout.
π Experimental feature π
"experimental" is the technical term for "we're trying something, wish us luck" πβ¨
--experimental-initial-corrupt-check'false'β enable to check for data corruption before serving any client/peer traffic.--experimental-corrupt-check-time'0s'β duration of time between cluster corruption check passes.--experimental-enable-v2v3''β serve v2 requests through the v3 backend under a given prefix.--experimental-backend-bbolt-freelist-type'array'βExperimentalBackendFreelistTypespecifies the type of freelist the boltdb backend uses (arrayandmapare the supported types).--experimental-enable-lease-checkpoint'false'βExperimentalEnableLeaseCheckpointenables the primary lessor to persist leaseremainingTTLso long lived leases don't auto-renew indefinitely.--experimental-compaction-batch-limit1000βExperimentalCompactionBatchLimitsets the maximum revisions deleted in each compaction batch.--experimental-peer-skip-client-san-verification'false'β skip verification of the SAN field in the client certificate for peer connections.--experimental-watch-progress-notify-interval'10m'β duration of periodical watch progress notification.--experimental-warning-apply-duration'100ms'β a warning is generated if requests take longer than this duration.
π Unsafe feature π
--force-new-cluster'false'β force the creation of a new one-member cluster.
β οΈ CAUTIOUS with unsafe flag! It may break the guarantees given by the consensus protocol! seriously bestie, this one is not a vibe, it's a threat π
π TO BE DEPRECATED π
--debug'false'β enable debug-level logging for etcd. [WARN] will be deprecated in v3.5. use'--log-level=debug'instead.--log-package-levels''β specify a particular log level for each etcd package (eg:'etcdmain=CRITICAL,etcdserver=DEBUG').
π SEE ALSO π
ectdctl(1), /usr/share/doc/etcd-server/op-guide/configuration.md.gz
(no i'm not fixing the typo in ectdctl(1), she's part of the lore now π)
and that's the whole page bestie!! this is 3.4.23, dated January 2022, from the etcd(1) manual β go be highly available, you absolute icon π«Άβ¨
π¦ where this page comes from
- debian trixie: etcd-server 3.5.16-4
- ubuntu questing: etcd-server 3.5.16-4
- ubuntu resolute: etcd-server 3.5.16-10
- ubuntu stonking: etcd-server 3.5.30-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms