CLAUDE_CODE_CLIENT_CERT
Updated by Alex Sorokoletov
CLAUDE_CODE_CLIENT_CERT is a Claude Code environment variable: Path to client certificate for mTLS. Present since v2.1.69 or earlier and still present in v2.1.332. It is listed in the official reference.
| Status | Present in v2.1.332 |
|---|---|
| Added | Present since v2.1.69 or earlier |
| Category | Authentication |
| Official docs | Listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_CODE_CLIENT_CERT=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_CLIENT_CERT": "<value>"
}
}Release notes that mention it
- Claude Code "self signed certificate in certificate chain": NODE_EXTRA_CA_CERTS, CLAUDE_CODE_CERT_STORE and the emSign Block
- 165 Environment Variables in Claude Code 2.1.69 — What Changed in 50 Versions
Related variables
CLAUDE_CODE_CERT_STORE: Comma-separated CA sources to trust: bundled, system, or both (the default since v2.1.101).CLAUDE_CODE_CLIENT_KEY: Path to client private key.CLAUDE_CODE_CLIENT_KEY_PASSPHRASE: Passphrase for encrypted client key.CLAUDE_CODE_DESIGN_OAUTH_CLIENT_ID: Overrides the OAuth client ID used for the design authentication flow; design OAuth counts as configured only when the value does not start with 00000000-.CLAUDE_CODE_DISABLE_LOOPED_CROSS_CERT_DROP: Keeps system-store certificates that certify each other in a loop beside their root, which Claude Code otherwise drops.CLAUDE_CODE_DISABLE_SELF_NAMED_CERT_DROP: Keeps certificates that name themselves as their own issuer, which Claude Code drops by default when it cannot confirm the certificate's key signed it and no CA in the list chains to a root that did.CLAUDE_CODE_OAUTH_CLIENT_ID: Custom OAuth client ID.ANTHROPIC_API_KEY: Primary API key for Claude API.
Frequently asked questions
What does CLAUDE_CODE_CLIENT_CERT do?
Path to client certificate for mTLS
Which Claude Code version has CLAUDE_CODE_CLIENT_CERT?
Present since v2.1.69 or earlier and still present in v2.1.332.
How do I set CLAUDE_CODE_CLIENT_CERT?
Export it before starting Claude Code (export CLAUDE_CODE_CLIENT_CERT=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.