Resolved-Unable to obtain LE certificates through npm(docker)

My domain is: example.com (using "site" subdomain on a proxy host forwarded to a vanilla nginx web service) (removed domain after issue fixed)

I ran this command: add SSL certificate (in npm)

It produced this output:

Error: Command failed: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-2" --agree-tos --email "removed for security" --domains "site.example.com" --authenticator dns-cloudflare --dns-cloudflare-credentials "/etc/letsencrypt/credentials/credentials-2"
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.


    at ChildProcess.exithandler (node:child_process:399:12)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

My web server is (include version): npm v2.9.18 (latest)

The operating system my web server runs on is (include version): Ubuntu 20.04.4 LTS

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know): yes (ubuntu server)

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):certbot 1.26.0 (obtained through container console in portainer)

I am a beginner, attempting to follow the guide on the following website:

https://www.zloki.com/2021/11/15/how-to-cloudflare-npm/

I have setup a proxy host entry pointing site.example.com to an internal nginx docker container. upon adding a SSL certificate entry as described on the website, I get an internal error, and i have to cancel the request.

I'm more than happy to supply any further information if required, although, being new to this, may need a little guidance for anything too technical :slight_smile:

Many Thanks

(edit - managed to add log output)
(edit - RESOLVED - appeared to be a formatting error. ensure there are no spaces between the '=' and the API key obtained from Cloudflare when filling in the 'credentials file content' field in the 'DNS provider' section. This was quite difficult to see :man_facepalming:)

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.