[GH-ISSUE #3969] [emerg] cannot load certificate #2594

Open
opened 2026-02-26 07:36:07 +03:00 by kerem · 3 comments
Owner

Originally created by @Bluscream on GitHub (Aug 31, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3969

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
can be seen in the log below

Nginx Proxy Manager Version

2.11.3

To Reproduce
Steps to reproduce the behavior:

  1. Go to certs
  2. Click on new cert
  3. use cloudflare
  4. click ok

Expected behavior
new cert

Screenshots

CommandError: nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/npm-16/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/npm-16/fullchain.pem, r) error:10000080:BIO routines::no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

    at /app/lib/utils.js:16:13
    at ChildProcess.exithandler (node:child_process:430:5)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket. (node:internal/child_process:457:11)
    at Socket.emit (node:events:519:28)
    at Pipe. (node:net:338:12)

Operating System
raspbian latest

Additional context

Originally created by @Bluscream on GitHub (Aug 31, 2024). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3969 <!-- Are you in the right place? - If you are looking for support on how to get your upstream server forwarding, please consider asking the community on Reddit. - If you are writing code changes to contribute and need to ask about the internals of the software, Gitter is the best place to ask. - If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the *right place.* --> **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** can be seen in the log below **Nginx Proxy Manager Version** <!-- What version of Nginx Proxy Manager is reported on the login page? --> 2.11.3 **To Reproduce** Steps to reproduce the behavior: 1. Go to certs 2. Click on new cert 3. use cloudflare 4. click ok **Expected behavior** new cert **Screenshots** ```log CommandError: nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/npm-16/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/npm-16/fullchain.pem, r) error:10000080:BIO routines::no such file) nginx: configuration file /etc/nginx/nginx.conf test failed at /app/lib/utils.js:16:13 at ChildProcess.exithandler (node:child_process:430:5) at ChildProcess.emit (node:events:519:28) at maybeClose (node:internal/child_process:1105:16) at Socket. (node:internal/child_process:457:11) at Socket.emit (node:events:519:28) at Pipe. (node:net:338:12) ``` **Operating System** raspbian latest **Additional context** <!-- Add any other context about the problem here, docker version, browser version, logs if applicable to the problem. Too much info is better than too little. -->
Author
Owner

@totorus commented on GitHub (Sep 21, 2024):

Same bug, same errors.

<!-- gh-comment-id:2365214482 --> @totorus commented on GitHub (Sep 21, 2024): Same bug, same errors.
Author
Owner

@biscottiman commented on GitHub (Sep 23, 2024):

Had the same issue. Turns out this is caused by proxy hosts I had which were still trying to load the SSL which was deleted. Was able to resolve it with:

  1. entered the container for nginx-app-1
    docker exec -it nginx-app-1 bash
  2. recreated the folder in /etc/letsencrypt/live that was missing (in my case /npm3)
    mkdir /etc/letsencrypt/live/npm-3
  3. copied files from another live SSL
    cp /etc/letsencrypt/live/npm-5/fullchain.pem /etc/letsencrypt/live/npm-3/fullchain.pem
    cp /etc/letsencrypt/live/npm-5/privkey.pem /etc/letsencrypt/live/npm-3/privkey.pem
  4. Exit container
    exit
  5. Restart your container
    docker compose restart
    (if using docker compose and currently in the directory containing your docker compose file)

After that I was able to access the webui and remove the proxy hosts that were causing the issue. Remember to go back and clean up the files you created previously.

<!-- gh-comment-id:2368665691 --> @biscottiman commented on GitHub (Sep 23, 2024): Had the same issue. Turns out this is caused by proxy hosts I had which were still trying to load the SSL which was deleted. Was able to resolve it with: 1. entered the container for nginx-app-1 `docker exec -it nginx-app-1 bash` 2. recreated the folder in /etc/letsencrypt/live that was missing (in my case /npm3) `mkdir /etc/letsencrypt/live/npm-3` 3. copied files from another live SSL `cp /etc/letsencrypt/live/npm-5/fullchain.pem /etc/letsencrypt/live/npm-3/fullchain.pem` `cp /etc/letsencrypt/live/npm-5/privkey.pem /etc/letsencrypt/live/npm-3/privkey.pem` 4. Exit container `exit` 5. Restart your container `docker compose restart` (if using docker compose and currently in the directory containing your docker compose file) After that I was able to access the webui and remove the proxy hosts that were causing the issue. Remember to go back and clean up the files you created previously.
Author
Owner

@github-actions[bot] commented on GitHub (May 18, 2025):

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

<!-- gh-comment-id:2888714987 --> @github-actions[bot] commented on GitHub (May 18, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
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#2594
No description provided.