This page covers common configuration steps for Consul deployments.
Use the same configuration file referenced in the setup guide for your installation.
Typical location:
/etc/consul.d/consul.hcl
consul.hcl)datacenter = "dc1"
data_dir = "/var/lib/consul"
bind_addr = "10.0.0.10"
client_addr = "127.0.0.1 10.0.0.10"
server = true
bootstrap_expect = 3
retry_join = ["10.0.0.11", "10.0.0.12"]
ui_config {
enabled = true
}
encrypt = "replace-with-gossip-key"
Reload services or restart the cluster nodes after updates.
sudo systemctl restart consul
Run a service discovery query to confirm configuration is valid.
consul members
consul catalog services
consul operator raft list-peers