Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caddyfile: Add "resolvers" as a subdirective of "tls" #4008

Closed
francislavoie opened this issue Feb 3, 2021 · 3 comments
Closed

Caddyfile: Add "resolvers" as a subdirective of "tls" #4008

francislavoie opened this issue Feb 3, 2021 · 3 comments
Labels
feature ⚙️ New feature or request
Milestone

Comments

@francislavoie
Copy link
Member

Currently, resolvers only exists as an option of issuer https://caddyserver.com/docs/caddyfile/directives/tls#issuers. If a user wants to configure resolvers, then they need to do it like this, to manually propagate the resolvers to all the relevant issuers:

tls {
	issuer zerossl {
		resolvers 8.8.8.8:53
		dns gandi {env.GANDI_APIKEY}
	}
	issuer acme {
		resolvers 8.8.8.8:53
		dns gandi {env.GANDI_APIKEY}
	}
}

Most tls options like email and dns get copied down to the default issuers, if no issuers are specified. A user on Discord wanted the same to be done for resolvers as well.

Basically, the ideal config would be this, to avoid repetition and specifying the issuers:

tls {
	dns gandi {env.GANDI_APIKEY}
	resolvers 8.8.8.8:53
}
@francislavoie francislavoie added the feature ⚙️ New feature or request label Feb 3, 2021
@francislavoie francislavoie added this to the v2.4.0 milestone Feb 3, 2021
@mholt mholt closed this as completed in 8c29129 Feb 3, 2021
@mholt
Copy link
Member

mholt commented Feb 3, 2021

Easy breezy.

@MagnuM2K
Copy link

Thanks!
This works like a charm.
Anyway to specify the order of issuer, though?

I had put ZeroSSL as primary (just because I could.. ;) ) and now with this change, it grabs a cert from LE.

@mholt
Copy link
Member

mholt commented Feb 15, 2021

@MagnuM2K It honors the order you specify in your config. To get more help, please ask on our forum: https://caddy.community - and fill out the template. Thanks!

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

No branches or pull requests

3 participants