Skip to main content
Consul’s gossip protocol communicates in clear text by default, making it unsuitable for production clusters. Enabling gossip encryption ensures all cluster communication remains confidential and tamper-proof.
Never expose an unencrypted Consul gossip layer to public or untrusted networks. Always enable encryption in production.

Initial Configuration

To activate gossip encryption on a new Consul agent, add the encrypt key to your agent’s JSON configuration (e.g., /etc/consul.d/agent-config.json):
  1. Generate a new gossip key:
  2. Copy the output and paste it into the "encrypt" field above.
  3. Restart or start the Consul agent:
Alternatively, you can pass the key on the command line:

Key Parameters Overview

Modifying an Existing Cluster

The image is a slide titled "Modifying an Existing Cluster," explaining how to configure a cluster with gossip encryption, including the need for rolling restarts and two specific parameters.
You can introduce gossip encryption without downtime by performing a controlled rolling restart. Note that consul reload does not apply encryption changes—you must restart each agent (systemctl restart consul). Two flags manage the transition phase: Follow these steps:
  1. Generate a new encryption key
  2. Distribute the key and disable enforcement
    Update each agent’s config:
  3. Rolling restart #1
  4. Enable outgoing encryption
  5. Rolling restart #2
  6. Enable incoming encryption
  7. Rolling restart #3
After completing these steps, your entire cluster will encrypt gossip traffic using the new key. For production environments, integrate these steps into your configuration management or orchestration tool of choice.

Watch Video