Skip to main content
In this guide, you’ll learn how to configure a HashiCorp Consul agent—both server and client modes—using example files hosted on GitHub. Follow along by visiting the Consul folder in the repository: https://github.com/btkrausen/hashicorp/tree/main/Consul

Consul Server Agent Configuration (JSON)

Below is a complete JSON example for a Consul server agent. This configuration enables Raft consensus, TLS encryption, and ACL enforcement.

Key Settings Overview

For production clusters, configure at least 3–5 server agents and set bootstrap_expect accordingly to ensure high availability.

Minimal Consul Client Agent Configuration (JSON)

Use the following JSON snippet for a lightweight Consul client that joins an existing cluster. It includes essential TLS settings, gossip encryption, and ACL tokens.
Ensure your client node has network connectivity to the server agents and valid ACL tokens to authenticate API calls.
The image shows a GitHub repository page for "hashicorp" with a list of configuration files, including JSON and HCL files, and a recent commit message about removing Consul items from the Vault folder.

Watch Video