Skip to content

tls: Add tls_resolvers global option for DNS challenge configuration#7297

Merged
francislavoie merged 5 commits intocaddyserver:masterfrom
Siomachkin:global-resolvers
Mar 1, 2026
Merged

tls: Add tls_resolvers global option for DNS challenge configuration#7297
francislavoie merged 5 commits intocaddyserver:masterfrom
Siomachkin:global-resolvers

Conversation

@Siomachkin
Copy link
Contributor

@Siomachkin Siomachkin commented Oct 9, 2025

This PR adds support for a tls_resolvers global option in the Caddyfile to configure DNS resolvers for ACME DNS challenges at the global level, addressing issue closes #7192.

Changes

  • Added tls_resolvers global option that accepts one or more DNS resolver addresses
  • Global resolvers are stored in the TLS app configuration
  • Resolvers are automatically applied to ACME issuers that use DNS challenges
  • Local resolvers directive in tls blocks can override global settings

Assistance Disclosure

I consulted Claude to understand the project architecture.

@mholt
Copy link
Member

mholt commented Oct 9, 2025

Thanks for the PR. I suppose there are many places we would need to apply the resolver config -- not just the TLS app. We might need to also apply this to, for example, reverse proxy, etc.

If this option is truly intended to be only for the TLS app, then maybe it should be renamed to something like tls_resolver or something.

@Gunni
Copy link

Gunni commented Nov 19, 2025

Still draft? I'd like this feature, but I mirror the above comment about calling it tls_resolvers or similar.

@Siomachkin Siomachkin marked this pull request as ready for review November 21, 2025 18:27
@francislavoie francislavoie added the feature ⚙️ New feature or request label Mar 1, 2026
@francislavoie francislavoie added this to the v2.11.2 milestone Mar 1, 2026
@francislavoie
Copy link
Member

Sorry, this fell off our radar. I think this is probably ready to go, giving it a quick review.

@francislavoie francislavoie enabled auto-merge (squash) March 1, 2026 20:28
@francislavoie francislavoie changed the title Add global resolvers directive for DNS challenge configuration tls: Add tls_resolvers global option for DNS challenge configuration Mar 1, 2026
@francislavoie francislavoie merged commit f145bce into caddyserver:master Mar 1, 2026
27 checks passed
@github-actions github-actions bot mentioned this pull request Mar 6, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature ⚙️ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow global DNS resolvers directive

4 participants