Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is:mynas9696.ml
I ran this command:service caddy restart
It produced this output:Timeout during connect (likely firewall problem), url: (attempt 1/3; challenge=http-01)
Jun 13 12:23:27 caddy caddy[6918]: 2020/06/13 12:23:27 [INFO] [mynas9696.ml] acme: Obtaining bundled SAN certificate
Jun 13 12:23:27 caddy caddy[6918]: 2020/06/13 12:23:27 [INFO] [mynas9696.ml] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/5215644860
Jun 13 12:23:27 caddy caddy[6918]: 2020/06/13 12:23:27 [INFO] [mynas9696.ml] acme: Could not find solver for: tls-alpn-01
Jun 13 12:23:27 caddy caddy[6918]: 2020/06/13 12:23:27 [INFO] [mynas9696.ml] acme: use http-01 solver
Jun 13 12:23:27 caddy caddy[6918]: 2020/06/13 12:23:27 [INFO] [mynas9696.ml] acme: Trying to solve HTTP-01
Jun 13 12:23:39 caddy caddy[6918]: 2020/06/13 12:23:39 [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/5215644860
Jun 13 12:23:39 caddy caddy[6918]: 2020/06/13 12:23:39 [INFO] Unable to deactivate the authorization: https://acme-v02.api.letsencrypt.org/acme/authz-v3/5215644860
Jun 13 12:23:39 caddy caddy[6918]: 2020/06/13 12:23:39 [ERROR][mynas9696.ml] failed to obtain certificate: acme: Error -> One or more domains had a problem:
My web server is (include version):Caddy 1.04
The operating system my web server runs on is (include version):
freenas 11.3U3
My hosting provider, if applicable, is:freenom and cloudflare
I can login to a root shell on my machine (yes or no, or I don’t know):yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel):
no
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):not using cerbot. using caddy
I trying to use DNS validation to create my certificate but I’m not have any luck. here is my Caddyfile
mynas9696.ml {
root /usr/local/www/html/
}
cloud.mynas9696.ml {
tls {
dns cloudflare
}
gzip
proxy / http://192.168.5.85 {
transparent
}
Yes
I'm thinking it doesn't work because I'm trying to do it in a Virtual Machine. I created a test jail in my Freenas. Now I'm getting the error "too many failed authorizations recently". I'll wait an hour and try again.
I don't know how Caddy works. But Letsencrypt has checked your domain via http validation so Caddy has used the http challenge url, not the dns challenge url.
The first line of the posted log excerpt confirms that Caddy's doing http validation.
Here's your problem. You've specified DNS validation for the cloud. subdomain, but the root domain is going to default to HTTP. You'd need to put a tls {} block in that section as well.
After 2 restarts I'm at the rate limit again. Here is the adjusted Caddyfile.
mynas9696.ml {
root /usr/local/www/html/
tls {
dns cloudflare
}
}
cloud.mynas9696.ml {
tls {
dns cloudflare
}
gzip
proxy / http://192.168.5.85 {
transparent
}
decided to simplify the Caddyfile and go with the one domain.
I get these errors. I’ve double checked the Global API and email in /etc/rc.conf
Jun 13 20:00:17 caddy caddy[49585]: 2020/06/13 20:00:17 [INFO] [cloud.mynas9696.ml] acme: Obtaining bundled SAN certificate
Jun 13 20:00:18 caddy caddy[49585]: 2020/06/13 20:00:18 [INFO] [cloud.mynas9696.ml] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz-v3/5222277641
Jun 13 20:00:18 caddy caddy[49585]: 2020/06/13 20:00:18 [INFO] [cloud.mynas9696.ml] acme: Could not find solver for: tls-alpn-01
Jun 13 20:00:18 caddy caddy[49585]: 2020/06/13 20:00:18 [INFO] [cloud.mynas9696.ml] acme: Could not find solver for: http-01
Jun 13 20:00:18 caddy caddy[49585]: 2020/06/13 20:00:18 [INFO] [cloud.mynas9696.ml] acme: use dns-01 solver
Jun 13 20:00:18 caddy caddy[49585]: 2020/06/13 20:00:18 [INFO] [cloud.mynas9696.ml] acme: Preparing to solve DNS-01
Jun 13 20:00:18 caddy caddy[49585]: 2020/06/13 20:00:18 [INFO] [cloud.mynas9696.ml] acme: Cleaning DNS-01 challenge
Jun 13 20:00:18 caddy caddy[49585]: 2020/06/13 20:00:18 [WARN] [cloud.mynas9696.ml] acme: error cleaning up: cloudflare: unknown record ID for ‘_acme-challenge.cloud.mynas9696.ml.’
Jun 13 20:00:19 caddy caddy[49585]: 2020/06/13 20:00:19 [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz-v3/5222277641
Jun 13 20:00:19 caddy caddy[49585]: 2020/06/13 20:00:19 [ERROR][cloud.mynas9696.ml] failed to obtain certificate: acme: Error -> One or more domains had a problem:
Jun 13 20:00:19 caddy caddy[49585]: [cloud.mynas9696.ml] [cloud.mynas9696.ml] acme: error presenting token: cloudflare: failed to create TXT record: error from makeRequest: HTTP status 401: invalid credentials (attempt 3/3; challenge=dns-01)
Jun 13 20:00:20 caddy caddy[49585]: 2020/06/13 20:00:20 failed to obtain certificate: acme: Error -> One or more domains had a problem:
My Caddyfile
cloud.mynas9696.ml {
root /usr/local/www/html/
tls {
dns cloudflare
}
gzip
proxy / http://192.168.5.85 {
transparent
}