Failed to apply for a certificate

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. |, so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: no

I ran this command: Nginx proxy manager fails to apply for a certificate using Cloudflare API_token。
It produced this output:

log:Error: Command failed: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-100" --agree-tos --email "" --domains "*," --authenticator dns-cloudflare --dns-cloudflare-credentials "/etc/letsencrypt/credentials/credentials-100"
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error determining zone_id: 6003 Invalid request headers. Please confirm that you have supplied valid Cloudflare API credentials. (Did you copy your entire API token/key? To use Cloudflare tokens, you'll need the python package cloudflare>=2.3.1. This certbot is running cloudflare 2.11.6)
Ask for help or search for solutions at See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

at ChildProcess.exithandler (node:child_process:402:12)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

My web server is (include version): Ubuntu 22.04

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

My hosting provider, if applicable, is: local deployment

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): yes

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): Linux Young-Docker 6.2.0-25-generic #25-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 16 17:05:07 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Have you checked your credentials like the message says?

The below topic might help


Yes, I have provided the Global API Key according to the error message, but it still doesn't work.

You're using Nginx Proxy Manager. It's documentation is lousy. I did not see anything on how to set the Cloudflare credentials or any documentation about the Let's Encrypt integration to begin with.

Your best chances, I think, to manage this is to request the Nginx Proxy Manager support channel/community for help with this.

1 Like

Thanks for the proposal, I will try to apply.

1 Like

Ok, I'll try to find the answer first, using the link suggested by MikeMcQ

Thanks for the solution, have successfully solved the problem but have encountered a new problem, problem link

1 Like

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