• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Consul
  • Install
  • Tutorials
  • Documentation
  • API
  • CLI
  • Try Cloud(opens in new tab)
  • Sign up
Consul Home

CLI

Skip to main content
  • CLI
  • agent
  • debug
  • event
  • exec
  • force-leave
  • info
  • join
  • keygen
  • keyring
  • leave
  • license
  • lock
  • login
  • logout
  • maint
  • members
  • monitor
  • partition
  • reload
  • rtt
    • Overview
    • ca
    • cert
  • validate
  • version
  • watch

  • Resources

  • Tutorial Library
  • Certifications
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  1. Developer
  2. Consul
  3. CLI
  4. tls
  • Consul
  • v1.13.x
  • v1.12.x
  • v1.11.x
  • v1.10.x
  • v1.9.x
  • v1.8.x

ยปConsul TLS

Command: consul tls

The tls command is used to help with setting up a CA and certificates for Consul TLS.

Basic Examples

Create a CA:

$ consul tls ca create
==> Saved consul-agent-ca.pem
==> Saved consul-agent-ca-key.pem

Create a client certificate:

$ consul tls cert create -client
==> Using consul-agent-ca.pem and consul-agent-ca-key.pem
==> Saved dc1-client-consul-0.pem
==> Saved dc1-client-consul-0-key.pem

For more examples, ask for subcommand help or view the subcommand documentation by clicking on one of the links in the sidebar.

Usage

Usage: consul tls <subcommand> <subcommand> [options]

For the exact documentation for your Consul version, run consul tls -h to view the complete list of subcommands.

Usage: consul tls <subcommand> <subcommand> [options]

  # ...

Subcommands:
  ca      Helpers for CAs
  cert    Helpers for certificates

For more information, examples, and usage about a subcommand, click on the name of the subcommand in the sidebar or one of the links below:

Edit this page on GitHub

On this page

  1. Consul TLS
  2. Basic Examples
  3. Usage
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)