jlesage / docker-nginx-proxy-manager

Docker container for Nginx Proxy Manager
MIT License
786 stars 178 forks source link

Internal Error when creating certificate #203

Closed lxup closed 1 year ago

lxup commented 3 years ago

So I have a problem with Nginx-Proxy-Manager. First of all, here is my setup :

So I added the ports in my container OpenVPN-Client like that : image

So when I go to the link "http://192.168.1.200:81/" I have the web interface of Nginx Proxy Manager

But when I try to add proxy host with SSL certificate, I got the error "Internal Error" There is my error log : ` [9/9/2021] [12:04:54 AM] [Nginx ] › ℹ info Reloading Nginx

[9/9/2021] [12:04:54 AM] [SSL ] › ℹ info Requesting Let'sEncrypt certificates for Cert #3: admin.naegativ.com

[9/9/2021] [12:04:54 AM] [SSL ] › ℹ info Command: certbot certonly --non-interactive --config "/etc/letsencrypt.ini" --cert-name "npm-3" --agree-tos --authenticator webroot --email "loup@naegativ.com" --preferred-challenges "dns,http" --domains "admin.naegativ.com"

[9/9/2021] [12:04:59 AM] [Nginx ] › ℹ info Reloading Nginx

[9/9/2021] [12:04:59 AM] [Express ] › ⚠ warning Command failed: certbot certonly --non-interactive --config "/etc/letsencrypt.ini" --cert-name "npm-3" --agree-tos --authenticator webroot --email "loup@naegativ.com" --preferred-challenges "dns,http" --domains "admin.naegativ.com"

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.`

For information I followed this tutorial to pass my Nginx-Proxy-Manager container through the OpenVPN-Client container : https://www.youtube.com/watch?v=xbSfaKwyfXE&t=297s

Thank for support, I'm totally lost

D-tech-pro commented 3 years ago

This was an issue that kept me down for a day. Not sure if this was your issue or not but:

My DNS for my domain is Cloudflare. Cloudflare recently changed to require an API key that is not the global one.

Sign in to Cloudflare Click your profile at the top right API Tokens Create Token Edit zone DNS Click "Use Template" Permissions: N/A Zone Resources: [Include] [All zones] Click "Continue to summary"

You will get your API Key, save this and treat it like a password.

Now go to the web gui for Nginx Proxy Manager.

Add Proxy Host > Details (fill out for what you need) > SSL

SSL Certificate [Request a new SSL Certificate] Force SSL: on Use a DNS Challenge: on DNS Provider: Cloudflare Credentials [# Cloudflare API token dns_cloudflare_api_token = replace with your API Key] "I Agree to the Let's Encrypt Terms of Service": On Save

This should leave you with an Online working proxy.

jlesage commented 3 years ago

We don't have a complete picture of the setup, but my guess is that the Nginx Proxy Manager container is not reachable from the Internet. I'm not sure that putting NPM behind an openvpn connection will work.