[GH-ISSUE #2392] Letsencrypt disappearing from .conf files. / Secure Connection Failed randomly. #1686

Closed
opened 2026-02-26 07:32:02 +03:00 by kerem · 2 comments
Owner

Originally created by @outerregion on GitHub (Nov 11, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2392

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

The letsencrypt SSL information is being removed from the .conf file. It appears that this is happening when the check for updated certs is happening.

Nginx Proxy Manager Version

v2.9.19

To Reproduce
Steps to reproduce the behavior:
For my setup.

  1. Create a wildcard SSL through cloudflaredns for 3 domains.
  2. Create access list
  3. Create proxyhost
  4. Assign SSL and Access. Block exploits and allow websockets.
  5. Repeat steps 3 and 4 until done.
    In my case, I have 32 .conf files.

Expected behavior

Proxyhost should load and assign the SSL to that domain.

Screenshots

Operating System

Server: ubuntu server 22.04 on a proxmox host.

Additional context

Was experiencing this on the previous version. Problem seems to only appear after a set number of proxy hosts are created. I've attached a conf file, before (1.conf.bak) and after hitting save again (1.conf). If it happened once, It could be ok, but this is happening randomly on different proxy hosts. I have substituted the domain names in the uploaded files for privacy.
1.conf.bak.txt
1.conf.txt

Originally created by @outerregion on GitHub (Nov 11, 2022). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2392 <!-- 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. --> The letsencrypt SSL information is being removed from the .conf file. It appears that this is happening when the check for updated certs is happening. **Nginx Proxy Manager Version** <!-- What version of Nginx Proxy Manager is reported on the login page? --> v2.9.19 **To Reproduce** Steps to reproduce the behavior: For my setup. 1. Create a wildcard SSL through cloudflaredns for 3 domains. 2. Create access list 3. Create proxyhost 4. Assign SSL and Access. Block exploits and allow websockets. 5. Repeat steps 3 and 4 until done. In my case, I have 32 .conf files. **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> Proxyhost should load and assign the SSL to that domain. **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> **Operating System** <!-- Please specify if using a Rpi, Mac, orchestration tool or any other setups that might affect the reproduction of this error. --> Server: ubuntu server 22.04 on a proxmox host. **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. --> Was experiencing this on the previous version. Problem seems to only appear after a set number of proxy hosts are created. I've attached a conf file, before (1.conf.bak) and after hitting save again (1.conf). If it happened once, It could be ok, but this is happening randomly on different proxy hosts. I have substituted the domain names in the uploaded files for privacy. [1.conf.bak.txt](https://github.com/NginxProxyManager/nginx-proxy-manager/files/9993572/1.conf.bak.txt) [1.conf.txt](https://github.com/NginxProxyManager/nginx-proxy-manager/files/9993573/1.conf.txt)
kerem 2026-02-26 07:32:02 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@qbiecom commented on GitHub (Nov 12, 2022):

Could this be the same issue as #2254?

<!-- gh-comment-id:1312572435 --> @qbiecom commented on GitHub (Nov 12, 2022): Could this be the same issue as #2254?
Author
Owner

@outerregion commented on GitHub (Nov 12, 2022):

Yup, this is a duplicate of #2254. I have implemented a brute force work around for now, but it's not really sustainable.

For posterity, the workaround is setting up a cron to backup up only files that have letsencrypt.

*/5 * * * * rsync -az /root/npm/ /root/docker/nginx-proxy-manager/data/nginx/proxy_host/ >/dev/null 2>&1
1-59/2 * * * * find . -type f -exec grep -lr "letsencrypt-acme-challenge" {} ; -exec cp -r {} /root/npm/ ; >/dev/null 2>&1

<!-- gh-comment-id:1312586566 --> @outerregion commented on GitHub (Nov 12, 2022): Yup, this is a duplicate of #2254. I have implemented a brute force work around for now, but it's not really sustainable. For posterity, the workaround is setting up a cron to backup up only files that have letsencrypt. */5 * * * * rsync -az /root/npm/ /root/docker/nginx-proxy-manager/data/nginx/proxy_host/ >/dev/null 2>&1 1-59/2 * * * * find . -type f -exec grep -lr "letsencrypt-acme-challenge" {} ; -exec cp -r {} /root/npm/ ; >/dev/null 2>&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#1686
No description provided.