hassio-addons/addon-nginx-proxy-manager

Cannot anymore generate SSL certificate using Cloudflare API tokens

lstep opened this issue · 1 comments

Problem/Motivation

Running NPM as an addon under Home Assistant on a x86-64 machine.

When running, getting "internal error" when trying to get a let's encrypt certificate using DNS challenge with cloudflare API. It was working with the < 1.0.0 version.

Expected behavior

Generate a certificate

Actual behavior

image

[1/15/2024] [10:05:33 AM] [SSL ] › ℹ info Requesting Let'sEncrypt certificates via Cloudflare for Cert #7: xxxx.xxxxx.org
[1/15/2024] [10:05:33 AM] [SSL ] › ℹ info Command: mkdir -p /etc/letsencrypt/credentials 2> /dev/null; echo '# Cloudflare API token
dns_cloudflare_api_token = xxxxxxxxxxxxxxxxxxxxxxxxxxx' > '/etc/letsencrypt/credentials/credentials-7' && chmod 600 '/etc/letsencrypt/credentials/credentials-7' && pip install certbot-dns-cloudflare==$(certbot --version | grep -Eo '0-9+') cloudflare && certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-7" --agree-tos --email "xxx@xxxxxx.xxx" --domains "xxxx.xxxxx.org" --authenticator dns-cloudflare --dns-cloudflare-credentials "/etc/letsencrypt/credentials/credentials-7"
[1/15/2024] [10:05:40 AM] [Nginx ] › ℹ info Reloading Nginx
[1/15/2024] [10:05:40 AM] [Express ] › ⚠ warning Command failed: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-7" --agree-tos --email "xxx@xxxxxx.xxx" --domains "xxxx.xxxxx.org" --authenticator dns-cloudflare --dns-cloudflare-credentials "/etc/letsencrypt/credentials/credentials-7"
Saving debug log to /tmp/letsencrypt-log/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.9.11)
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/letsencrypt-log/letsencrypt.log or re-run Certbot with -v for more details.

Note: I'm 100% sure I specified the correct API token.

Steps to reproduce

Selecting DNS challenge, then Cloudflare, then entering the api token in the textarea with the dns_api_token variable

image

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!