hungnguyenm / edgemax-acme

Let's Encrypt setup instructions for Ubiquiti EdgeRouter using DNS-01
149 stars 31 forks source link

AM #20

Open stevland opened 10 months ago

stevland commented 10 months ago

I want to use a domain that I registered with Namecheap but they won't provide API access.

I have a GoDaddy Domain, so I'm trying to use it as a challenge alias.

So I set up a CNAME in the first domain's DNS Zone:

_acme-challenge.router.stev.land. | 600 | CNAME | _acme-challenge.rede.ca

/config/scripts/renew.acme.sh -d router.stev.land -n dns_gd -t "GD_Key" -t "GD_Secret" -k "RzfZQZ5t_UNYiKA2KtMVfodfyHcdmka" -k "Vv1WnB3EwspQEy22Yf2GFq" -- --challenge-alias challenge-domain.rede.ca

But I received this error:

TXT record '2B94IROyK_cmshrfgsqPdiZ5suIfIaLjq3y9OnuxkZ4' for '_acme-challenge.challenge-domain.rede.ca', value wasn't set!
Error add txt for domain:_acme-challenge.challenge-domain.rede.ca
Please check log file for more details: /var/log/acme.log

So I additionally set up a TXT record on the 2nd (challenge) domain:

_acme-challenge.challenge-domain.rede.ca. | 600 | TXT | 2B94IROyK_cmshrfgsqPdiZ5suIfIaLjq3y9OnuxkZ4

But when I ran the script again I received this error:

TXT record '_gQ-L8P67E9bdm8_deHAEELJoUIi2A5UixeMJHwAj98' for '_acme-challenge.challenge-domain.rede.ca', value wasn't set!
Error add txt for domain:_acme-challenge.challenge-domain.rede.ca
Please check log file for more details: /var/log/acme.log

It seems to want me to add a random TXT entry before I can possibly know what it will be. Or, am I missing something?

stevland commented 10 months ago

UPDATE:

I think I figured out the issue and almost have it sorted.

The domain I was using for the challenge is one I have registered at GoDaddy, but I manage the nameservers / DNS records myself.

I've subsequently realized that the script is meant to create the TXT record autonomously, using API access.

So I'm trying again with another domain, although now I've hit too many failed authorizations recently.

I will report back as it may help someone down the road.