mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 09:25:55 +03:00
[GH-ISSUE #3610] NPM crashes when deleting a few hosts and ssl certs, then resets to default and it is empty without any records #2390
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#2390
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 @comfuzio on GitHub (Mar 7, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3610
Hi, I am running NPM for more than 1 year now in a proxmox vm from template of ubuntu 22.04.3 server (full updated).
I have installed docker via the official docker instructions and then portainer for gui.
My docker compose file is this:
`version: '3.3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
goaccess:
image: 'xavierh/goaccess-for-nginxproxymanager:latest'
container_name: goaccess
restart: always
ports:
- '7880:7880'
environment:
- PUID=0
- PGID=0
- TZ=Europe/Athens
- SKIP_ARCHIVED_LOGS=False # optional
- DEBUG=False # optional
- BASIC_AUTH=False # optional
- BASIC_AUTH_USERNAME=user # optional
- BASIC_AUTH_PASSWORD=pass # optional
- EXCLUDE_IPS=127.0.0.1 # optional - comma delimited
- LOG_TYPE=NPM # optional - more information below
volumes:
- ./data/logs:/opt/log
`
to clarify the problem which I will describe happens also before I have added the goaccess to my npm compose.
So I have a few domain names and some subdomains etc and it works perfect and thank you for this amazing project!
The problem happens now that I am moving my websites to another VM running a webhosting software than keeping them in docker compose.
I have migrated all my sites to the new host, change A records to match the new IP and all runs good!
So I go to NPM to delete those sites, if I delete 1-2 domains and their certs, I don't see any problem but when I try to delete more, one at a time of course, NPM is not responding.
So I stop the stack and restart it, when it starts, it is in factory default settings! I have to login with the default info and it doesn't contain any record at all!
So I roll back to the backup I am always taking before I do such actions.
Checklist
jc21/nginx-proxy-manager:latestdocker image?Describe the bug
NPM crashes when deleting hosts and certs and when re-started it is in factory default state.
Nginx Proxy Manager Version
v2.11.1
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Delete the hosts and certifications and not crash or lose all remaining records after restart
Operating System
Ubuntu 22.04.3 server full updated on proxmox 8.1 host
notes
I had an ARM64 vm debian 12 in hetzner with same installation of docker and portainer and npm with this yaml and it did the same there as well.
It did the same even before i discovered the goaccess
@bluekitedreamer commented on GitHub (Mar 9, 2024):
Were there any wildcard domains used with any of these hosts? I experienced the same thing, but only happens when an existing proxy was still dependent upon a deleted certificate. I did a full example so I could grab the logs for further debugging on this, those are below.
During SSL cert deletion the web interface indicates that the hosts will need to be updated later, which infers it would not create a catastrophic break. This results in an unrecoverable error state.
When a certificate is deleted NPM goes out and properly revokes the certificate and then proceeds to delete it from local file store
This is somewhat functionally related to a different bug I reported here https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3604, where a dependency on the cert checking/validation is causing an unrecoverable error in the backend and doesn't allow the application to start up in order to remedy using the web app.
@bluekitedreamer commented on GitHub (Mar 9, 2024):
Work arounds
For Now:
Manually run certbot for the deleted certs, and insert the certs into DB with the same ID as the original cert and restart the container. The original cert records will still be in the db for reference, with the
is_deletedcolumn marked as the value1.Clone the record, change the old ID and create a new record in its place with the original ID.In the Future:
With the above being stated, take backups of the SSL cert store (not generally recommended if security controls on the backups aren't in place) and NPM database for now.
You can easily recover by restoring the files, this will get the backend and frontend in a working state again. Once it's up go to
@comfuzio commented on GitHub (Mar 9, 2024):
most of them were in the style of domain.com and www.domain.com but some where subdomains such as subdomain.domain.com.
Indeed some of the certs if I go to the certs tab are red and outdated, this is also odd because NPM never updates them there, the certs themselves if you visit the sites, they were autorenew but the certs tab didn't seem to get the update
@comfuzio commented on GitHub (Mar 9, 2024):
For now I just want to remove all those domains that I have transferred to the other vm and just keep those that remain in the same portainer instance (they still are plenty).
My workaround for now seems to be to make a record of what I want to keep and the internal ip/port and redo them all since I don't want to create another interruption to the transferred domains to change the A record back, do SSL renew, change A record again.
@bluekitedreamer commented on GitHub (Mar 9, 2024):
yeah basically my comment but in a different way. Sometimes getting out of a one-time problem manually is the easiest answer.
@github-actions[bot] commented on GitHub (Oct 28, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@comfuzio commented on GitHub (Oct 28, 2024):
Is there any update on this issue? if not, it is safe to close it. As an issue, for me it still remains unfortunatelly.
@dominicm00 commented on GitHub (Apr 18, 2025):
Can confirm this is still happening 👍🏼, this makes NPM insta-crash on startup unless you manually edit the DB/files
@github-actions[bot] commented on GitHub (Oct 31, 2025):
Issue is now considered stale. If you want to keep it open, please comment 👍