mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #1109] npm uses deprecated path for certbot #915
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#915
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @aparaschiv on GitHub (May 19, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1109
Describe the bug
In
jc21/nginx-proxy-manager:latest(2.9.2) npm is using the old certbot pathconst certbot_command = '/opt/certbot/bin/certbot';This behavior breaks issuing/renewing let's encrypt certs with Cloudflare.
and
I saw in the changelogs that the image comes with certbot preinstalled. It is already included in the PATH, but can also be added as a constant
which certbot /usr/local/bin/certbotUsing this version of certbot fixes the issue.
For example:
@yieldhog commented on GitHub (May 28, 2021):
@aparaschiv @chaptergy I am running Docker on Synology (latest, 2.9.3) -- any idea what commands I need to fix this issue? Thanks
@aparaschiv commented on GitHub (May 31, 2021):
@yieldhog If you only need to renew your expiring certificates, you can re-run the command it runs at npm startup inside the container, but change the path of certbot.
By default the images uses certbot from
/opt/certbot/bin/certbot. If you use the one located here/usr/local/bin/certbot, the cloudflare plugin works.So, on your machine that runs the docker container run:
docker exec -ti your_npm_container_name bashand inside the container
/usr/local/bin/certbot renew --non-interactive --quiet --config "/etc/letsencrypt.ini" --preferred-challenges "dns,http" --disable-hook-validationThis will renew all expiring certificates, the only caveat is that it won't get updated in the GUI.
The alternative route I took is to rebuild the container locally using the certbot located in
/usr/local/bin/certbot, which solved the GUI problem.@jerkball commented on GitHub (Jun 1, 2021):
Thank you for the ticket and your workaround.
Everything worked well renewing the certificates.
Hopefully the fix well be in upstream fast. But as I can't code and contribute, I'm happy with the workaround as well +1
@scottpage commented on GitHub (Jun 2, 2021):
I deleted my existing cert to fix another issue "another instance of certbot is already running" from the previous version of NPM, then I experienced the above issue after upgrading to the latest image.
Since I deleted my cert, I wasn't able to follow the "renew" instructions from above.
I copied and overwrote
/usr/local/bin/certbotto/opt/certbot/bin/certbot, and was able to create a cert.Man, two major bugs in 10 minutes.
Hopefully this gets patched ASAP.
@yieldhog commented on GitHub (Jun 3, 2021):
@aparaschiv thanks!
@Na3blis commented on GitHub (Jun 4, 2021):
@aparaschiv I'm on 2.9.3, but I don't have certbot in /usr/local/bin. When I look at the dir I only have:
@spanjap commented on GitHub (Jun 10, 2021):
@aparaschiv. Your solution is working great for the time being.
When you use the "Renew Now" button on the SSL Certificates page with the 3 vertical dots then the date of the certificate is adjusted to the new Expire Date.
Wanted to let it know.
@aparaschiv commented on GitHub (Jun 10, 2021):
Ok, cool, thank you for sharing!
Hopefully we will get a fix for this in the near future
@chaptergy commented on GitHub (Jun 17, 2021):
Which certbot version do you get with each of the possibilities? so with
/opt/certbot/bin/certbot --versionand/usr/local/bin/certbot --version?@spanjap commented on GitHub (Jun 18, 2021):
I checked it by connecting to my docker installation with "sudo docker exec -ti nginx-proxy-manager bash"
/opt/certbot/bin/certbot --version
certbot 1.15.0
/usr/local/bin/certbot --version
certbot 1.16.0
@pgk83 commented on GitHub (Jul 1, 2021):
Hi, I solve my problem with this bash commands in the container ( sudo docker exec -ti nginx-proxy-manager bash ):
mkdir -p /opt/certbot/bin/certbot
cp -a /usr/bin/certbot /opt/certbot/bin/certbot
delete all experied cert and renew.
My certbot dir was:
which certbot /usr/local/bin/certbot =>
/usr/bin/certbot
@schevenin commented on GitHub (Sep 4, 2021):
How did you change which certbot your system was using? Mine still uses /opt/certbot/bin/certbot