NginxProxyManager / NginxProxyManager/nginx-proxy-manager

NPM crashes when deleting a few hosts and ssl certs, then resets to default and it is empty without any records

Open
#3,610 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
34.2k
Forks
3.9k
Avg merge
21h 12m
Merged PRs (30d)
20

Description

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

  • 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

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:

  1. Go to 'Hosts>proxy hosts'
  2. Click on '3 dots on a host and delete'
  3. Go to 'SSL Certificates'
  4. Delete the matching record.
  5. Repeat that 5 times or so.
  6. NPM is not responding.
  7. Restart service and NPM is in factory defaults.

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied Docker Compose configuration, its app container, and the mounted ./data and ./letsencrypt paths; reproduce the sequence through Proxy Hosts and SSL Certificates while checking the container's behavior. Done means repeated host and certificate deletions no longer make NPM stop responding or restart with factory-default data.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, typescript
Domain
backend, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.