mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #1402] Entries not showing on the front-end after updating image from 2.9.4 to 2.9.9 (database overwritten) #1096
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#1096
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 @MaxVRAM on GitHub (Sep 13, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1402
Issue Summary
After updating the NPM image and redeploying my Docker-Compose stack, my previous login details were reset to the
admin@example.com / changemedefaults, which was the first flag something wasn't right.And yup, none of existing configuration are showing in the NPM front-end. I have approximately 15 proxy hosts and a redirect set, but obviously the front-end has no idea of this.
Existing reverse proxy routing all appear to be working fine, i.e. I can reach my hosted web services from external networks using the subdomain routes that I configured in NPM previously. I just can't see the entries on the NPM front-end.
Investigation
The Docker stack's mount folder
data/nginx/proxy_hostdirectory still contains all of theconffiles. And while all the routes are currently working (thankfully), I obviously can't make any changes to the existing configs, and I'm assuming it might cause problems with Certbot updates.I checked the container logs and it seems like NPM couldn't find/connect to the existing database (logs provided below). I opened up the database container port, and connected to it using DBeaver. Low and behold, it's an entirely fresh database with no entries.
Hypothesis
So what I gather from all this is that the instance of Nginx running in the NPM container works fine because all my
proxy_host .conffiles are still in the data directory, and NPM just points Nginx to those directories. Whereas NPM keeps all the user config in the database, and simply generates the proxy host.conffiles to the data directory.Unfortunately I didn't make a backup before the update. So I'm guessing that my best course of action is just to grab all the
.conffiles, open them up in an editor, and manually enter all entries in a fresh NPM instance.Ironically, that would have taken me far less time to gather and write up all this information.
Conclusion
.conffiles either from the front-end GUI, or from thedata/nginx/proxy_hostafter it builds a new database file.Steps
Running an existing NPM installation with 2.9.4, I updated NPM using Portainer:
latestimage of NPM.81.Deployment Specifics
docker-compose.yml
Digging around
After having a poke around in the NPM container, it certainly seems like NPM couldn't find the existing database, and just created a new one while keeping all the Nginx files intact.
NPM container log
Database log
Docker container bind mount check
CLIing into the container, I can navigate to a complete set of proxy host entries in the mounted host directory. I confirmed the bind was correct using
touch testfrom the container, and the file showing up in the host's directory.Here's the proxy_host directory print out:
Container Nginx config
The
/etc/nginx/nginx.confin the container appears to be referencing the proxy files generated by the previous NPM container, which is why the proxies are still working:@github-actions[bot] commented on GitHub (Mar 4, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@Pinguinteddy commented on GitHub (Apr 7, 2024):
Do you have a solution by now? I have the same problem.
@github-actions[bot] commented on GitHub (Dec 7, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@github-actions[bot] commented on GitHub (Dec 31, 2025):
Issue was closed due to inactivity.