> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shiftlabs.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Consul

> Connect HashiCorp Consul for service discovery

Connect your HashiCorp Consul instances to manage service discovery and configuration through ShiftLabs.

## How to Add a Consul Instance

<Steps>
  <Step title="Open Integrations">
    Go to **Settings → Integrations → Consul** tab.
  </Step>

  <Step title="Click Add Consul">
    Click the **Add Consul** button.
  </Step>

  <Step title="Enter Connection Details">
    * **Name** (required): Display name for this instance
    * **Host** (required): Consul server URL (e.g., `https://consul.example.com`)
    * **Token** (required): Consul ACL token for authentication
    * **Verify SSL**: Enable to validate SSL certificates
    * **Set as Default**: Make this the default Consul instance
  </Step>

  <Step title="Save">
    Click **Create**. Use the health check to verify connectivity.
  </Step>
</Steps>

## How to Edit a Consul Instance

1. Click the edit icon on the instance row
2. Modify the settings
3. Click **Save**

<Tip>
  Leave the token field empty when editing to keep the existing token.
</Tip>

## How to Check Health

Click the **Check** button on any instance to verify connectivity.

## How to Delete a Consul Instance

1. Click the delete icon on the instance row
2. Confirm the deletion

<Warning>
  Deleting a Consul instance removes the connection. Services registered in Consul are not affected.
</Warning>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Health check shows Unhealthy">
    1. Verify the host URL is correct
    2. Check if the ACL token is valid
    3. Ensure Consul is running and accessible
    4. If using self-signed certificates, disable SSL verification
  </Accordion>

  <Accordion title="Cannot view services or KV">
    The ACL token may not have sufficient permissions. Verify the token's policy allows read access.
  </Accordion>
</AccordionGroup>

## FAQ

<AccordionGroup>
  <Accordion title="Can I connect multiple Consul instances?">
    Yes. Add instances for different datacenters or environments.
  </Accordion>

  <Accordion title="What ACL permissions are required?">
    The token needs read access to services, intentions, and key/value store you want to manage.
  </Accordion>
</AccordionGroup>
