[GH-ISSUE #4478] When complete the app and login, it said Bad Gateway. I don't know why it happened, please help me ASAP! #2867

Open
opened 2026-02-26 07:37:02 +03:00 by kerem · 4 comments
Owner

Originally created by @ashtonli on GitHub (Apr 9, 2025).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4478

Image

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes / No
  • Are you sure you're not using someone else's docker image?
    • Yes / No
  • Have you searched for similar issues (both open and closed)?
    • Yes / No

Describe the bug

Nginx Proxy Manager Version

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

Operating System

Additional context

Originally created by @ashtonli on GitHub (Apr 9, 2025). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4478 ![Image](https://github.com/user-attachments/assets/e1928c4c-fb61-43de-988c-e5d33f329a95) <!-- 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 / No - Are you sure you're not using someone else's docker image? - Yes / No - Have you searched for similar issues (both open and closed)? - Yes / No **Describe the bug** <!-- A clear and concise description of what the bug is. --> **Nginx Proxy Manager Version** <!-- What version of Nginx Proxy Manager is reported on the login page? --> **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> **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. --> **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. -->
Author
Owner

@jc21 commented on GitHub (Apr 10, 2025):

what's in the docker logs for the container after you attempt to login?

<!-- gh-comment-id:2791546502 --> @jc21 commented on GitHub (Apr 10, 2025): what's in the docker logs for the container after you attempt to login?
Author
Owner

@PhilipColman commented on GitHub (May 22, 2025):

I am having the same issue, I have not touched ngnix proxy manager in a while today i went to add new proxy host for service I setup, I first tried logging at https://proxy.mydomain.com/login witch is how I have NPM setup to to expose it self, I put in my email and password and nothing no feedback. the page didnt reload nothing, so after trying my password again make sure it was correct and the same nothing. So open my sqlite file and did thing to reset my password as that was first though but i restarted NPM it was the same no feedback no nothing when logging in with default user and password. I went to look in the dev tools to see if could see any thing useful i found this line in console a few time login.bundle.js?v=2.12.3:25 POST https://proxy.mydomain.com/api/tokens 502 (Bad Gateway) so then I tried going to http://myserverip:9191/login as i though it might be issues with the way being peroxided, and I tried to log in again only difference is when I clicked log in it now says bad gateway under the password like the picture above. Looking at my logs the last thing in there as about updating my ssl certs, nothing to do with the failed log in attempt.

FYI my environment is podman using quadlets with podman-auto-update.service turned on so as of now I am version 2.13.3 dont know what the last working I used was.

Also all my proxy host seem to working fine only issue is logging into NPM

Edit:

I have stopped NPM rename the data folder started back up and I can log in with default details.

Ok so left everything else as is a copy my sql lite database from original set up to newly setup data folder, and I am getting bad gateway again has the layout of the database been changed?

After more testing it does seem to be issues with the database file as restore the old data folder and rename the database file so a new one would created, and I was able to login with default log in, all old proxy work and I can no longer manage then as they are not in the database so NPM does not know about them

<!-- gh-comment-id:2902254148 --> @PhilipColman commented on GitHub (May 22, 2025): I am having the same issue, I have not touched ngnix proxy manager in a while today i went to add new proxy host for service I setup, I first tried logging at https://proxy.mydomain.com/login witch is how I have NPM setup to to expose it self, I put in my email and password and nothing no feedback. the page didnt reload nothing, so after trying my password again make sure it was correct and the same nothing. So open my sqlite file and did thing to reset my password as that was first though but i restarted NPM it was the same no feedback no nothing when logging in with default user and password. I went to look in the dev tools to see if could see any thing useful i found this line in console a few time ```login.bundle.js?v=2.12.3:25 POST https://proxy.mydomain.com/api/tokens 502 (Bad Gateway)``` so then I tried going to http://myserverip:9191/login as i though it might be issues with the way being peroxided, and I tried to log in again only difference is when I clicked log in it now says bad gateway under the password like the picture above. Looking at my logs the last thing in there as about updating my ssl certs, nothing to do with the failed log in attempt. FYI my environment is podman using quadlets with podman-auto-update.service turned on so as of now I am version 2.13.3 dont know what the last working I used was. Also all my proxy host seem to working fine only issue is logging into NPM Edit: I have stopped NPM rename the data folder started back up and I can log in with default details. Ok so left everything else as is a copy my sql lite database from original set up to newly setup data folder, and I am getting bad gateway again has the layout of the database been changed? After more testing it does seem to be issues with the database file as restore the old data folder and rename the database file so a new one would created, and I was able to login with default log in, all old proxy work and I can no longer manage then as they are not in the database so NPM does not know about them
Author
Owner

@PhilipColman commented on GitHub (May 28, 2025):

Update installed a new instance of npm on docker, using PostgreSQL as database, was working added a few proxy host and the issues is back, again nothing showing in logs.

Before doing a brand new install I try to get the my proxy host form the old sqlite db in to a new sqlite db and in the PostgreSQL db and as soon as there proxy host in the in the db I would not be able to log and get the bad gateway error, so I am thinking this may have something to the database?

EDIT: ok so figure the isusse with my setup and all seems to be working now so it was DNS, that was probably also the issue on the podman setup, I the reasons I migrated from podman to docker was cause I was facing DNS issues, but would not have though not having DNS would stop me from logging in, any when when I moved my DNS from podman to docker, next time i logged into NPM i had the issues back, but the odd thing is no DNS and no proxy host login is works but it combination, of having proxy hosts setup and not have DNS that was causing the bad gateway in my situation, maybe some sort of check if the proxy host have valid certs?, but I dont know why why that would need to run on login

<!-- gh-comment-id:2917766539 --> @PhilipColman commented on GitHub (May 28, 2025): Update installed a new instance of npm on docker, using PostgreSQL as database, was working added a few proxy host and the issues is back, again nothing showing in logs. Before doing a brand new install I try to get the my proxy host form the old sqlite db in to a new sqlite db and in the PostgreSQL db and as soon as there proxy host in the in the db I would not be able to log and get the bad gateway error, so I am thinking this may have something to the database? EDIT: ok so figure the isusse with my setup and all seems to be working now so it was DNS, that was probably also the issue on the podman setup, I the reasons I migrated from podman to docker was cause I was facing DNS issues, but would not have though not having DNS would stop me from logging in, any when when I moved my DNS from podman to docker, next time i logged into NPM i had the issues back, but the odd thing is no DNS and no proxy host login is works but it combination, of having proxy hosts setup and not have DNS that was causing the bad gateway in my situation, maybe some sort of check if the proxy host have valid certs?, but I dont know why why that would need to run on login
Author
Owner

@github-actions[bot] commented on GitHub (Dec 13, 2025):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:3648753567 --> @github-actions[bot] commented on GitHub (Dec 13, 2025): Issue is now considered stale. If you want to keep it open, please comment :+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#2867
No description provided.