See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.shPlease add '--debug' or '--log' to check more details.Error add txt for domain:_acme-challenge.somedomain.cominvalid domainAdding txt value: <somestring> for domain: _acme-challenge.somedomain.comGetting webroot for domain='*.somedomain.com'Getting domain auth token for each domainSingle domain='*.somedomain.com'Using CA: https://acme-v02.api.letsencrypt.org/directory
I noticed that when creating the cloudflare api token, Acme required: Zone Resources set: Include | All zones. This appears to be the problem.To sum it up:Zone | DNS | EditZone Resources | Include | All ZonesClient IP (not using this field)TTL | set a valid date rangeThis appears to work OK.
AcmeClient: domain validation failed (dns01)
[Wed May 29 12:54:39 CEST 2024] Add txt record error.
2024-05-29T14:56:40 opnsense AcmeClient: running acme.sh command: /usr/local/sbin/acme.sh --issue --syslog 8 --debug 2 --server 'letsencrypt' --dns 'dns_cf' --dnssleep '300' --home '/var/etc/acme-client/home' --cert-home '/var/etc/acme-client/cert-home/62b86c7fd6ddb9.24403730' --certpath '/var/etc/acme-client/certs/62b86c7fd6ddb9.24403730/cert.pem' --keypath '/var/etc/acme-client/keys/62b86c7fd6ddb9.24403730/private.key' --capath '/var/etc/acme-client/certs/62b86c7fd6ddb9.24403730/chain.pem' --fullchainpath '/var/etc/acme-client/certs/62b86c7fd6ddb9.24403730/fullchain.pem' --domain 'mydomain.com' --domain 'mydomain.com' --days '1' --force --keylength '4096' --accountconf '/var/etc/acme-client/accounts/5f806aef5d0241.03202364_prod/account.conf'2024-05-29T14:56:40 opnsense AcmeClient: using challenge type: Cloudflare DNS Validation2024-05-29T14:56:40 opnsense AcmeClient: account is registered: avbs-acme2024-05-29T14:56:40 opnsense AcmeClient: using CA: letsencrypt2024-05-29T14:56:40 opnsense AcmeClient: issue certificate: mydomain.com2024-05-29T14:56:40 opnsense AcmeClient: certificate must be issued/renewed: mydomain.com2024-05-29T12:54:44 opnsense AcmeClient: validation for certificate failed: mydomain.com2024-05-29T12:54:44 opnsense AcmeClient: domain validation failed (dns01)2024-05-29T12:54:44 opnsense /usr/local/opnsense/scripts/OPNsense/AcmeClient/lecert.php: AcmeClient: The shell command returned exit code '1': '/usr/local/sbin/acme.sh --issue --syslog 7 --debug --server 'letsencrypt_test' --dns 'dns_cf' --dnssleep '300' --home '/var/etc/acme-client/home' --cert-home '/var/etc/acme-client/cert-home/62b86c7fd6ddb9.24403730' --certpath '/var/etc/acme-client/certs/62b86c7fd6ddb9.24403730/cert.pem' --keypath '/var/etc/acme-client/keys/62b86c7fd6ddb9.24403730/private.key' --capath '/var/etc/acme-client/certs/62b86c7fd6ddb9.24403730/chain.pem' --fullchainpath '/var/etc/acme-client/certs/62b86c7fd6ddb9.24403730/fullchain.pem' --domain 'mydomain.com' --domain 'mydomain.com' --days '1' --force --keylength '4096' --accountconf '/var/etc/acme-client/accounts/5f806aef5d0241.03202364_stg/account.conf''2024-05-29T12:54:29 opnsense AcmeClient: running acme.sh command: /usr/local/sbin/acme.sh --issue --syslog 7 --debug --server 'letsencrypt_test' --dns 'dns_cf' --dnssleep '300' --home '/var/etc/acme-client/home' --cert-home '/var/etc/acme-client/cert-home/62b86c7fd6ddb9.24403730' --certpath '/var/etc/acme-client/certs/62b86c7fd6ddb9.24403730/cert.pem' --keypath '/var/etc/acme-client/keys/62b86c7fd6ddb9.24403730/private.key' --capath '/var/etc/acme-client/certs/62b86c7fd6ddb9.24403730/chain.pem' --fullchainpath '/var/etc/acme-client/certs/62b86c7fd6ddb9.24403730/fullchain.pem' --domain 'mydomain.com' --domain 'mydomain.com' --days '1' --force --keylength '4096' --accountconf '/var/etc/acme-client/accounts/5f806aef5d0241.03202364_stg/account.conf'2024-05-29T12:54:29 opnsense AcmeClient: using challenge type: Cloudflare DNS Validation2024-05-29T12:54:29 opnsense AcmeClient: account is registered: avbs-acme2024-05-29T12:54:29 opnsense AcmeClient: using CA: letsencrypt_test2024-05-29T12:54:29 opnsense AcmeClient: issue certificate: mydomain.com2024-05-29T12:54:29 opnsense AcmeClient: certificate must be issued/renewed: mydomain.com