V2 client auth not working anymore (ok in beta2)


just switched from v2-beta2 to v2-beta4. Beta2 accepted the following config:

host.name.com {
  tls /opt/caddy2/config/cloudflare-origin.pem /opt/caddy2/config/cloudflare-origin.key {
    clients require /opt/caddy2/config/origin-pull-ca.pem
  reverse_proxy /

Beta4 returns an error: Error during parsing: unknown subdirective: clients

I couldn’t find the correct (new) directive in the v2 documentation. Could someone give me a hint?


Hey Jan, thanks for trying Caddy 2!

The TLS directive is still a WIP and doesn’t quite yet support client auth: Home · caddyserver/caddy Wiki · GitHub

What you can do for now though is use the adapt command to convert your Caddyfile to JSON and then update the connection policy to enable client auth: Home · caddyserver/caddy Wiki · GitHub

I’m a bit swamped at the moment with things, but I want to make this configurable with the Caddyfile, so if you want to contribute it, feel free to open an issue to discuss it first, and then a PR would be greatly appreciated!

Hi Matt,

sorry it took me so long - unfortunately I don’t think I have the skills to actively contribute.

However, TLS client auth works like a charm as described by adding the relevant directive to te JSON config file.


1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.