1---
2layout: "docs"
3page_title: "Commands: Operator Autopilot"
4sidebar_current: "docs-commands-operator-autopilot"
5description: >
6  The operator autopilot subcommand is used to view and modify Consul's Autopilot configuration.
7---
8
9# Consul Operator Autopilot
10
11Command: `consul operator autopilot`
12
13The Autopilot operator command is used to interact with Consul's Autopilot subsystem. The
14command can be used to view or modify the current Autopilot configuration. See the
15[Autopilot Guide](https://learn.hashicorp.com/consul/day-2-operations/autopilot) for more information about Autopilot.
16
17```text
18Usage: consul operator autopilot <subcommand> [options]
19
20The Autopilot operator command is used to interact with Consul's Autopilot
21subsystem. The command can be used to view or modify the current configuration.
22
23Subcommands:
24
25    get-config    Display the current Autopilot configuration
26    set-config    Modify the current Autopilot configuration
27```
28
29## get-config
30
31This command displays the current Raft peer configuration.
32
33Usage: `consul operator autopilot get-config [options]`
34
35#### API Options
36
37<%= partial "docs/commands/http_api_options_client" %>
38<%= partial "docs/commands/http_api_options_server" %>
39
40The output looks like this:
41
42```
43CleanupDeadServers = true
44LastContactThreshold = 200ms
45MaxTrailingLogs = 250
46ServerStabilizationTime = 10s
47RedundancyZoneTag = ""
48DisableUpgradeMigration = false
49UpgradeMigrationTag = ""
50```
51
52## set-config
53
54Modifies the current Autopilot configuration.
55
56Usage: `consul operator autopilot set-config [options]`
57
58#### API Options
59
60<%= partial "docs/commands/http_api_options_client" %>
61<%= partial "docs/commands/http_api_options_server" %>
62
63#### Command Options
64
65* `-cleanup-dead-servers` - Specifies whether to enable automatic removal of dead servers
66upon the successful joining of new servers to the cluster. Must be one of `[true|false]`.
67
68* `-last-contact-threshold` - Controls the maximum amount of time a server can go without contact
69from the leader before being considered unhealthy. Must be a duration value such as `200ms`.
70
71* `-max-trailing-logs` - Controls the maximum number of log entries that a server can trail
72the leader by before being considered unhealthy.
73
74* `-min-quorum` - Sets the minimum number of servers required in a cluster
75before autopilot is allowed to prune dead servers.
76
77* `-server-stabilization-time` - Controls the minimum amount of time a server must be stable in
78the 'healthy' state before being added to the cluster. Only takes effect if all servers are
79running Raft protocol version 3 or higher. Must be a duration value such as `10s`.
80
81* `-disable-upgrade-migration` - (Enterprise-only) Controls whether Consul will avoid promoting
82new servers until it can perform a migration. Must be one of `[true|false]`.
83
84* `-redundancy-zone-tag`- (Enterprise-only) Controls the [`-node-meta`](/docs/agent/options.html#_node_meta)
85key name used for separating servers into different redundancy zones.
86
87* `-upgrade-version-tag` - (Enterprise-only) Controls the [`-node-meta`](/docs/agent/options.html#_node_meta)
88tag to use for version info when performing upgrade migrations. If left blank, the Consul version will be used.
89
90The output looks like this:
91
92```
93Configuration updated!
94```
95
96The return code will indicate success or failure.
97