Skip to content
BENIBIX Learn

CLAUDE_CODE_CLIENT_CERT

AI⌨️ Claude CodeConfiguration

Also known as CLAUDE_CODE_CLIENT_KEY, CLAUDE_CODE_CLIENT_KEY_PASSPHRASE, Claude Code mTLS

It gives Claude Code a certificate to prove who it is.

Think of it like

It is like you show your own badge at a door that checks each one.

Example

Emma's bank lets no program reach its gateway without a certificate. Her laptop sets the cert and key paths, and Claude Code gets through.

Why it matters

Some networks trust a certificate, not a password. This is how Claude Code shows one.

Definition

CLAUDE_CODE_CLIENT_CERT gives the path to a client certificate. With it, Claude Code can prove who it is to a gateway. A second variable, CLAUDE_CODE_CLIENT_KEY, gives the path to its private key. If that key is locked, a third one holds the pass phrase. A gateway that asks each caller for a certificate needs these.

Example code

bash
export CLAUDE_CODE_CLIENT_CERT=~/certs/me.crt
export CLAUDE_CODE_CLIENT_KEY=~/certs/me.key
claude
Show your cert to a gateway that asks for one.
Your certificate goes out with each request.

Common mistake

Setting only the certificate. The private key is needed too, or the check fails.

Key takeaways

  1. 1
    Cert path. Who you are.
  2. 2
    Key path. Proves it.
  3. 3
    Passphrase. If the key is locked.