[GH-ISSUE #3465] Deleting Active SSL Certificate Breaks All Hosts Using It #2312

Open
opened 2026-02-26 07:34:57 +03:00 by kerem · 4 comments
Owner

Originally created by @coanghel on GitHub (Jan 18, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3465

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

Deleting a certificate that is currently in use sends NPM into a reboot loop. Similar to #3420

Nginx Proxy Manager Version

2.10.4

To Reproduce
Steps to reproduce the behavior:

  1. Configure a proxy host
  2. Configure an SSL cert and add it to the above
  3. Delete the proxy host
  4. NPM will now return "internal error" for any attempted activities (such as swapping hosts to a new certificate); recreating the container presents the below error, where npm-# is the certificate you just deleted.
[emerg] cannot load certificate "/etc/letsencrypt/live/npm-3/fullchain.pem": BIO_new_file() failed

Expected behavior

Either do not allow an actively used certificate to be deleted, or update the nginx.conf files for all hosts using it prior to resolving the delete request.

Operating System

Docker running on Ubuntu server

Additional context

Upon investigating, I found that the sqlite database reflected the new SSL certificate in the certificate table and the hosts I swapped to the new certificate reflected the correct certificate in the proxy_host table, however the nginx .conf files in /proxy_host/ folder still had the path of the old certificate in them. Manually editing these config files and then restarting the container allowed it to start up as expected.

Originally created by @coanghel on GitHub (Jan 18, 2024). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3465 <!-- 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** <!-- A clear and concise description of what the bug is. --> Deleting a certificate that is currently in use sends NPM into a reboot loop. Similar to #3420 **Nginx Proxy Manager Version** <!-- What version of Nginx Proxy Manager is reported on the login page? --> 2.10.4 **To Reproduce** Steps to reproduce the behavior: 1. Configure a proxy host 2. Configure an SSL cert and add it to the above 3. Delete the proxy host 4. NPM will now return "internal error" for any attempted activities (such as swapping hosts to a new certificate); recreating the container presents the below error, where npm-# is the certificate you just deleted. ``` [emerg] cannot load certificate "/etc/letsencrypt/live/npm-3/fullchain.pem": BIO_new_file() failed ``` **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> Either do not allow an actively used certificate to be deleted, or update the nginx.conf files for all hosts using it prior to resolving the delete request. **Operating System** <!-- Please specify if using a Rpi, Mac, orchestration tool or any other setups that might affect the reproduction of this error. --> Docker running on Ubuntu server **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. --> Upon investigating, I found that the sqlite database reflected the new SSL certificate in the `certificate` table and the hosts I swapped to the new certificate reflected the correct certificate in the `proxy_host` table, however the nginx .conf files in /proxy_host/ folder still had the path of the old certificate in them. Manually editing these config files and then restarting the container allowed it to start up as expected.
Author
Owner

@zimbres commented on GitHub (Mar 7, 2024):

Same problem here

<!-- gh-comment-id:1984124527 --> @zimbres commented on GitHub (Mar 7, 2024): Same problem here
Author
Owner

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

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

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

@flinthamm commented on GitHub (Feb 20, 2025):

Same problem here

<!-- gh-comment-id:2672321734 --> @flinthamm commented on GitHub (Feb 20, 2025): Same problem here
Author
Owner

@PietroBer commented on GitHub (Sep 6, 2025):

unfortunately i made the same mistake of deleting 1 ssl certificate and now NPM is in a loop.

<!-- gh-comment-id:3262086656 --> @PietroBer commented on GitHub (Sep 6, 2025): unfortunately i made the same mistake of deleting 1 ssl certificate and now NPM is in a loop.
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#2312
No description provided.