HashiCorp Certified: Consul Associate Certification
Deploy a Single Datacenter
Manage the Consul Process
In this guide, we cover essential tasks for Consul process management: restarting the agent, performing a graceful node removal, stopping the service, and reloading configuration without downtime.
Table of Contents
- Restarting Consul
- Stopping Consul
- Graceful Node Removal
- Reloading Configuration
- Command Reference
- Links and References
Restarting Consul
To apply updates or recover from errors, restart the Consul agent via your system's service manager. On systemd-based Linux distributions:
systemctl restart consul
Stopping Consul
Shutting down the Consul agent cleans up local resources and halts background processes:
systemctl stop consul
Warning
If you exit the service abruptly, active sessions and health checks may fail. Always prefer a graceful approach when decommissioning nodes.
Graceful Node Removal
When decommissioning a server, notify the Consul cluster that the node is leaving before stopping the service:
consul leave
systemctl stop consul
Warning
Running consul leave
ensures the cluster marks this node as offline. Skipping this step can result in stale node entries and disrupted service discovery.
Reloading Configuration
Consul supports reloading a subset of configuration changes in-place without restarting the agent. After editing reloadable files—such as ACL tokens, health checks, log levels, node metadata, service definitions, TLS certificates, or watches—apply them on-the-fly:
consul reload
This command instructs the running agent to re-read its configuration and continue operation.
Note
Not all settings are reloadable. Changes to network parameters, bootstrap options, or data directory settings require a full service restart. For a detailed list, refer to the Consul reload documentation.
Reloadable Configuration Types
Configuration Type | Reloadable |
---|---|
ACL Tokens | Yes |
Health Checks | Yes |
Log Levels | Yes |
Node Metadata | Yes |
Service Definitions | Yes |
TLS Settings | Yes |
Watches | Yes |
Network & Bootstrap | No |
Data Directory Options | No |
Command Reference
Action | Command |
---|---|
Restart the Consul service (systemd) | systemctl restart consul |
Stop the Consul service | systemctl stop consul |
Gracefully leave the Consul cluster | consul leave |
Reload agent configuration without downtime | consul reload |
Links and References
Watch Video
Watch video content