mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #1907] [Bug] "The migration directory is corrupt, the following files are missing:" when re-building the container ("Bad Gateway" at login) #1388
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#1388
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 @ErikUden on GitHub (Mar 4, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1907
I am on a Raspberry Pi 4b with 4GB of RAM on Raspbian Lite (Debian) obviously with an arm processor!
Checklist
jc21/nginx-proxy-manager:latestdocker image?Here are some of the solutions I found:
https://gitmotion.com/nginx-proxy-manager/667768676/bad-gateway-app-login-serious-issue
This does not seem to work for me, however.
https://github.com/NginxProxyManager/nginx-proxy-manager/issues/310
The same kind of issue was discussed here too.
Describe the bug

This is what it shows on the login page when I try to login with the proper credentials.
I am using the yobasystems/alpine-mariadb:latest database.
I am getting the following error(s) when trying to build the image:
The last error just repeats until infinity.
Although the erorr comes from the "app_1" container, so NGINX itself (which is why it is reported as "Unhealthy" when running docker ps) I still think this is an issue with the database.
I tried changing to the jc21/mariadb-aria:10.4, but that image seems to not exist, so it did not work out.
Nginx Proxy Manager Version
v2.8.1
To Reproduce
Steps to reproduce the behavior:
On the same server as the NGINX Proxy Manager is running there is also my Pi-hole. I updated the Pi-hole, this, however, deleted the edit I made which turned the admin panel to 8080 instead of 80. After the update, Nginx obviously did not function since the Pi hole was listening on port 80. I made the change in the lighttpd.conf file, restarted the Pi, and the error with NGINX occurred. I am using an NGINX service that rebuilds the container after every reboot to autostart it.
Operating System
Raspberry Pi on Raspbian Lite
Additional context
Recently updated Pi-Hole which reset the Pi-Hole to running on port 80, after undoing this (without editing anything regarding Nginx) the error occurred.
@ErikUden commented on GitHub (Mar 4, 2022):
My config.json has private and public keys beyond the standard config, just wanted to add this as a note.
The NGINX Service itself seems to fully function, however, I simply cannot login. Hence I believe this may be a database error.
@texneus commented on GitHub (Mar 8, 2022):
Same problem here, also on a Pi 4b with Raspian and docker, but just using the docker command line. NginxPM seems to be running and proxying, but I am unable to login. "Bad Gateway" as shown above. Version 2.9.16. Unsure of when this started.
@ErikUden commented on GitHub (Mar 8, 2022):
Bruh
@ErikUden commented on GitHub (Mar 12, 2022):
Any updates?
@ErikUden commented on GitHub (Mar 12, 2022):
I have found my error:
@texneus (maybe you have the same issue too?)
I reset my database to yobasystems' maria-db, however, that did not solve it. The issue lied within four files I had:
so nginx/data/mysql/npm
In here there there is
migrations.frm
migrations.ibd
migrations_lock.frm
migrations_lock.ibd
I replaced all of these files with a backup I made of them a while ago.
Now everything works again.
I cannot explain why, but these files got corrupted after listening on the same port as my Pi-hole. For everyone reading my solution, I hope you've made a backup, if not, try deleting these files, maybe (only after having made a backup)?
Good luck!
@Buronn commented on GitHub (May 14, 2025):
I found this file, I put it in the migrations folder and it works.
https://github.com/NginxProxyManager/nginx-proxy-manager/tree/develop/backend/migrations
Im not sure if it's ok or secure to do this.
@egzumer commented on GitHub (Aug 18, 2025):
What is the migration folder path?