Configuration
Configuration precedence is evaluated in the following order:
When loading configuration, the Consul agent loads the configuration from files and directories in lexical order. For example, configuration file will be processed before extra_config.json
. Configuration can be in either HCL or JSON format. Available in Consul 1.0 and later, the HCL support now requires an or .json
extension on all configuration files in order to specify their format.
Configuration specified later will be merged into configuration specified earlier. In most cases, “merge” means that the later version will override the earlier. In some cases, such as event handlers, merging appends the handlers to the existing configuration. The exact merging behavior is specified for each option below.
The Consul agent also supports reloading configuration when it receives the SIGHUP signal. Not all changes are respected, but those that are documented below in the section. The reload command can also be used to trigger a configuration reload.
You can test the following configuration options by following the tutorials to install a local agent.
Consul requires up to 6 different ports to work properly, some on TCP, UDP, or both protocols.
Review the required ports table for a list of required ports and their default settings.
Reloadable Configuration
ACL Tokens
Checks
HTTP Client Address
Log level
Some Raft options (since Consul 1.10.0)
- raft_snapshot_threshold
- raft_trailing_logs
- These can be important in certain outage situations so being able to control them without a restart provides a recovery path that doesn’t involve downtime. They generally shouldn’t be changed otherwise.
Services
TLS Configuration
To avoid a potential security issue, the following TLS configuration parameters do not automatically reload when is enabled:
Watches