-
Notifications
You must be signed in to change notification settings - Fork 245
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
Base the server's own name on "nsname", not "domain" #225
base: master
Are you sure you want to change the base?
Conversation
It doesn't seem strictly necessary for the API to be accessed at nsname; it could be exposed through any name within the zone that has been delegated to acme-dns. You might want to use a different name for it because then you could do this: Static records (external):
Static records (in acme-dns):
Dynamic records (challenge responses):
Edit: |
@joohoi I merged in the latest |
I think this is a reasonable request, and indeed it confused me why I wasn't able to do this initially. It would also remove the need to put static A/AAAA records inside the acme zone, and for glue records outside the acme zone. However, I just wanted to point out that it adds another setup requirement: for acme-dns to be able to fetch a certificate for itself, the user will need to add something to the DNS to allow it to answer its own dns-01 challenge. Either:
or for consistency with how acme-dns handles other domains:
Then 'something' needs to be defined which doesn't clash with any user domains. It could be empty for this special case. |
FYI this appears to be related to #295 |
Sorry for being late to the party, just answering for others finding this PR. This PR should not be needed if used as intended (see "DNS records" in README): the NS and the DOMAIN have the IP addresses of acme-dns, and are therefore identical. Configuration at DNS provider and in acme-dns config.cfg must match. If NS and DOMAIN are the same (e.g.
Still NS and DOMAIN must have the same IP addresses, so using DOMAIN ( |
Summary:
When
nsname
anddomain
in the config are not identical, and the API is set to use Let's Encrypt for its own HTTPS needs, the API is unusable because it gets a cert for the name given indomain
, but the API is accessed atnsname
. All connections to the API then fail because the API cannot locate its own cert in the filesystem, though the cert would be invalid even if it could be located. Setting theapi_domain
config variable has no effect because this setting has been deprecated.This bug is masked whenever
nsname == domain
, so the problem would not be noticeable in this very common case.This PR fixes the problem by using
nsname
instead ofdomain
for the API's Let's Encrypt cert's CN and SAN.Examples:
Where the config file includes these entries:
Without this patch:
With this patch: