[GH-ISSUE #3701] No module named certbot #2445

Closed
opened 2026-02-26 07:35:36 +03:00 by kerem · 4 comments
Owner

Originally created by @milkywayfarer on GitHub (Apr 15, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3701

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug
Any of the attempts to renew or create Let's Encrypt certificates is met with the error No module named 'certbot'. Everything worked before then suddenly stopped after a restart. Docker image was not modified in any way, I'm running vanilla.

Nginx Proxy Manager Version
v2.11.1

To Reproduce
Steps to reproduce the behavior:

  1. Go to NPM and create a proxy host, request a certificate for it
  2. Go to Kubernetes log and see an error:
[4/15/2024] [7:44:58 AM] [SSL      ] › ℹ  info      Renewing Let'sEncrypt certificates for Cert #3: domain
[4/15/2024] [7:44:58 AM] [SSL      ] › ℹ  info      Command: certbot renew --force-renewal --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-3" --preferred-challenges "dns,http" --no-random-sleep-on-renew --disable-hook-validation 
[4/15/2024] [7:44:58 AM] [Global   ] › ⬤  debug     CMD: certbot renew --force-renewal --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-3" --preferred-challenges "dns,http" --no-random-sleep-on-renew --disable-hook-validation 
[4/15/2024] [7:44:58 AM] [SSL      ] › ✖  error     Traceback (most recent call last):
File "/opt/certbot/bin/certbot", line 5, in <module>
from certbot.main import main
ModuleNotFoundError: No module named 'certbot'
2024-04-15T12:44:58.775440460+05:00
[4/15/2024] [7:44:58 AM] [SSL      ] › ℹ  info      Completed SSL cert renew process
[4/15/2024] [7:49:05 AM] [Nginx    ] › ⬤  debug     Deleting file: /data/nginx/default_host/site.conf
[4/15/2024] [7:49:05 AM] [Nginx    ] › ⬤  debug     Could not delete file: {
"errno": -2,
"code": "ENOENT",
"syscall": "unlink",
"path": "/data/nginx/default_host/site.conf"
}
[4/15/2024] [7:49:05 AM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -t -g "error_log off;"
[4/15/2024] [7:49:05 AM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -t -g "error_log off;"
[4/15/2024] [7:49:05 AM] [Nginx    ] › ℹ  info      Reloading Nginx

Expected behavior

Expect it to work again without needing to install certbot by hand.

Operating System
FreeBSD/Docker

Originally created by @milkywayfarer on GitHub (Apr 15, 2024). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3701 **Checklist** - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - Yes - Are you sure you're not using someone else's docker image? - Yes - Have you searched for similar issues (both open and closed)? - Yes **Describe the bug** Any of the attempts to renew or create Let's Encrypt certificates is met with the error `No module named 'certbot'`. Everything worked before then suddenly stopped after a restart. **Docker image was not modified in any way, I'm running vanilla.** **Nginx Proxy Manager Version** v2.11.1 **To Reproduce** Steps to reproduce the behavior: 1. Go to NPM and create a proxy host, request a certificate for it 2. Go to Kubernetes log and see an error: ``` [4/15/2024] [7:44:58 AM] [SSL ] › ℹ info Renewing Let'sEncrypt certificates for Cert #3: domain [4/15/2024] [7:44:58 AM] [SSL ] › ℹ info Command: certbot renew --force-renewal --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-3" --preferred-challenges "dns,http" --no-random-sleep-on-renew --disable-hook-validation [4/15/2024] [7:44:58 AM] [Global ] › ⬤ debug CMD: certbot renew --force-renewal --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-3" --preferred-challenges "dns,http" --no-random-sleep-on-renew --disable-hook-validation [4/15/2024] [7:44:58 AM] [SSL ] › ✖ error Traceback (most recent call last): File "/opt/certbot/bin/certbot", line 5, in <module> from certbot.main import main ModuleNotFoundError: No module named 'certbot' 2024-04-15T12:44:58.775440460+05:00 [4/15/2024] [7:44:58 AM] [SSL ] › ℹ info Completed SSL cert renew process [4/15/2024] [7:49:05 AM] [Nginx ] › ⬤ debug Deleting file: /data/nginx/default_host/site.conf [4/15/2024] [7:49:05 AM] [Nginx ] › ⬤ debug Could not delete file: { "errno": -2, "code": "ENOENT", "syscall": "unlink", "path": "/data/nginx/default_host/site.conf" } [4/15/2024] [7:49:05 AM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;" [4/15/2024] [7:49:05 AM] [Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;" [4/15/2024] [7:49:05 AM] [Nginx ] › ℹ info Reloading Nginx ``` **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> Expect it to work again without needing to install `certbot` by hand. **Operating System** FreeBSD/Docker
kerem 2026-02-26 07:35:36 +03:00
  • closed this issue
  • added the
    stale
    bug
    labels
Author
Owner

@milkywayfarer commented on GitHub (Apr 15, 2024):

UPD: Fixed by running this set of instructions on the running container. I believe I do not need to do this myself :)

<!-- gh-comment-id:2056040239 --> @milkywayfarer commented on GitHub (Apr 15, 2024): **UPD:** Fixed by running [this](https://certbot.eff.org/instructions?ws=other&os=pip) set of instructions on the running container. I believe I do not need to do this myself :)
Author
Owner

@thebigbone commented on GitHub (Apr 15, 2024):

I am running the same version and I haven't had any issues with certbot (ubuntu server). Could it be a BSD problem?

<!-- gh-comment-id:2056769591 --> @thebigbone commented on GitHub (Apr 15, 2024): I am running the same version and I haven't had any issues with certbot (ubuntu server). Could it be a BSD problem?
Author
Owner

@github-actions[bot] commented on GitHub (Oct 25, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2436659965 --> @github-actions[bot] commented on GitHub (Oct 25, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Oct 29, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:3459344772 --> @github-actions[bot] commented on GitHub (Oct 29, 2025): Issue was closed due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2445
No description provided.