[GH-ISSUE #4657] login page shows "bad gateway" (No Current solution) ! #2965

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

Originally created by @OfficialMikeJ on GitHub (Jul 13, 2025).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4657

I have run into this before and can't seem to figure out how to fix the "bad gateway" message below the login page once I input the default login details. Since I can't login I'm going to shut down the vm and wait for a solution to this if anyone knows how to fix this ?.

I have tried:

  • Restarting both the db and the proxy container.
  • Restarting my vm.
  • Tried using FireFox after failed logins from Brave browser.
  • Refreshing or reloading the page via F5 doesn't do anything or fix the issue.
  • Recently just wiped my browser cache for Brave (This is not the issue).

Hope someone can help me out here been a while since I ran npm.

Originally created by @OfficialMikeJ on GitHub (Jul 13, 2025). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4657 I have run into this before and can't seem to figure out how to fix the "bad gateway" message below the login page once I input the default login details. Since I can't login I'm going to shut down the vm and wait for a solution to this if anyone knows how to fix this ?. I have tried: - Restarting both the db and the proxy container. - Restarting my vm. - Tried using FireFox after failed logins from Brave browser. - Refreshing or reloading the page via F5 doesn't do anything or fix the issue. - Recently just wiped my browser cache for Brave (This is not the issue). Hope someone can help me out here been a while since I ran npm.
Author
Owner

@abine45 commented on GitHub (Jul 13, 2025):

I am having this same issue after update. I have reinstalled it multiple times, rebooted... etc. Below is the example of what I'm seeing.

Image
<!-- gh-comment-id:3067246212 --> @abine45 commented on GitHub (Jul 13, 2025): I am having this same issue after update. I have reinstalled it multiple times, rebooted... etc. Below is the example of what I'm seeing. <img width="1072" height="490" alt="Image" src="https://github.com/user-attachments/assets/461b95a5-ce79-48be-8c48-39111bb6fca1" />
Author
Owner

@rladelman771 commented on GitHub (Jul 14, 2025):

I am running NPM on a Rasp pi 4b running Debian 11. I too had the bad gateway issue, but it turned out to be a dns issue. When I ran docker exec -it [npm container name] cat /etc/resolv.conf it gave an invalid DNS from the Pi. for some reason when I listed the DNS in dhcpcd.conf with a coma between the two DNS I wanted use, it gave the bad gateway. When I reverted to 1 DNS it worked, after restarting docker. I later added to /etc/docker folder daemon.json with my desired two DNS servers and it continued to work.

{
"dns": ["x.x.x.x","x.x.x.x"]
}

<!-- gh-comment-id:3067740482 --> @rladelman771 commented on GitHub (Jul 14, 2025): I am running NPM on a Rasp pi 4b running Debian 11. I too had the bad gateway issue, but it turned out to be a dns issue. When I ran docker exec -it [npm container name] cat /etc/resolv.conf it gave an invalid DNS from the Pi. for some reason when I listed the DNS in dhcpcd.conf with a coma between the two DNS I wanted use, it gave the bad gateway. When I reverted to 1 DNS it worked, after restarting docker. I later added to /etc/docker folder daemon.json with my desired two DNS servers and it continued to work. { "dns": ["x.x.x.x","x.x.x.x"] }
Author
Owner

@OfficialMikeJ commented on GitHub (Jul 14, 2025):

@rladelman771 I have no clue what you're editing the files for ?. This is a fresh install of NPM and I have had this issue in the past. I have never had to edit any .conf files or anything of that nature. I see these errors in the log files:

Image

Seen above is what I see in my CLI when I run: docker logs and I see all those errors that say "Access denied for user 'npm@172.18.0.3' (using password: YES)

I am using the default pass and default email since this is a fresh install of NPM.

<!-- gh-comment-id:3069575447 --> @OfficialMikeJ commented on GitHub (Jul 14, 2025): @rladelman771 I have no clue what you're editing the files for ?. This is a fresh install of NPM and I have had this issue in the past. I have never had to edit any .conf files or anything of that nature. I see these errors in the log files: <img width="957" height="800" alt="Image" src="https://github.com/user-attachments/assets/a25e0c13-76ec-46c2-ae63-a70c59070abd" /> Seen above is what I see in my CLI when I run: docker logs <container-name> and I see all those errors that say "Access denied for user 'npm@172.18.0.3' (using password: YES) I am using the default pass and default email since this is a fresh install of NPM.
Author
Owner

@dinoz0rg commented on GitHub (Jul 15, 2025):

My solution is just to use version [2.12.3] until this gets fixed.

<!-- gh-comment-id:3074276659 --> @dinoz0rg commented on GitHub (Jul 15, 2025): My solution is just to use version [2.12.3] until this gets fixed.
Author
Owner

@alexdatsko commented on GitHub (Jul 18, 2025):

My solution is just to use version [2.12.3] until this gets fixed.

I tried going back a few versions as well, but this instead worked for me after reading logs (initially I somehow missed the dns comment above this lol, but logs led me in the right direction), it may have been related to the cloudflare module specifically though:

anyway tl;dr quick fix for me was just adding dns servers into my docker-compose.yml:

    dns:
      - 8.8.8.8
      - 8.8.4.4

because it looked like there were things timing out in the logs, citing a good old 'Temporary failure in name resolution' :

[7/18/2025] [5:01:49 AM] [Global ] › ⬤ debug CMD: . /opt/certbot/bin/activate && pip install --no-cache-dir cloudflare==2.19.* acme==$(certbot --version | grep -Eo '0-9+') certbot-dns-cloudflare==$(certbot --version | grep -Eo '0-9+') && deactivate
[7/18/2025] [5:01:58 AM] [Certbot ] › ✖ error WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd361180290>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd361181150>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd361181c90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd3611827d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd3611833d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/
ERROR: Could not find a version that satisfies the requirement cloudflare==2.19.* (from versions: none)

Looks like a python module wasn't installing due to dns name resolution failure..

I did not need the dns in the config previously and nothing else changed on the machine that I'm aware of, probably just an update?

<!-- gh-comment-id:3086862042 --> @alexdatsko commented on GitHub (Jul 18, 2025): > My solution is just to use version [2.12.3] until this gets fixed. I tried going back a few versions as well, but this instead worked for me after reading logs (initially I somehow missed the dns comment above this lol, but logs led me in the right direction), it may have been related to the cloudflare module specifically though: anyway tl;dr quick fix for me was just adding dns servers into my docker-compose.yml: ``` dns: - 8.8.8.8 - 8.8.4.4 ``` because it looked like there were things timing out in the logs, citing a good old 'Temporary failure in name resolution' : [7/18/2025] [5:01:49 AM] [Global ] › ⬤ debug CMD: . /opt/certbot/bin/activate && pip install --no-cache-dir cloudflare==2.19.* acme==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+') certbot-dns-cloudflare==$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+') && deactivate [7/18/2025] [5:01:58 AM] [Certbot ] › ✖ error WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd361180290>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd361181150>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd361181c90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd3611827d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fd3611833d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/ ERROR: Could not find a version that satisfies the requirement cloudflare==2.19.* (from versions: none) Looks like a python module wasn't installing due to dns name resolution failure.. I did not need the dns in the config previously and nothing else changed on the machine that I'm aware of, probably just an update?
Author
Owner

@sevenbsb commented on GitHub (Aug 12, 2025):

Mine was presenting this problem and really was the connection to the database that was not being accepted, so I repailed the Containers Docker directly with Mariadb. In my case solved

services:
app:
image: 'jc21/nginx-proxy-manager:latest'
ports:
- '80:80'
- '81:81'
- '443:443'
environment:
DB_MARIADB_HOST: "db"
DB_MARIADB_PORT: 3306
DB_MARIADB_USER: "npm"
DB_MARIADB_PASSWORD: "ZOO"
DB_MARIADB_NAME: "npm"
volumes:
- './data:/data'
- './letsencrypt:/etc/letsencrypt'
db:
image: 'mariadb'
environment:
MARIADB_ROOT_PASSWORD: 'ZOO'
MARIADB_DATABASE: 'npm'
MARIADB_USER: 'npm'
MARIADB_PASSWORD: 'ZOO'
volumes:
- './mysql:/var/lib/mysql'

<!-- gh-comment-id:3177269940 --> @sevenbsb commented on GitHub (Aug 12, 2025): Mine was presenting this problem and really was the connection to the database that was not being accepted, so I repailed the Containers Docker directly with Mariadb. In my case solved services: app: image: 'jc21/nginx-proxy-manager:latest' ports: - '80:80' - '81:81' - '443:443' environment: DB_MARIADB_HOST: "db" DB_MARIADB_PORT: 3306 DB_MARIADB_USER: "npm" DB_MARIADB_PASSWORD: "ZOO" DB_MARIADB_NAME: "npm" volumes: - './data:/data' - './letsencrypt:/etc/letsencrypt' db: image: 'mariadb' environment: MARIADB_ROOT_PASSWORD: 'ZOO' MARIADB_DATABASE: 'npm' MARIADB_USER: 'npm' MARIADB_PASSWORD: 'ZOO' volumes: - './mysql:/var/lib/mysql'
Author
Owner

@badwinton commented on GitHub (Oct 29, 2025):

solution IP_RANGES_FETCH_ENABLED=false env

<!-- gh-comment-id:3465306561 --> @badwinton commented on GitHub (Oct 29, 2025): solution IP_RANGES_FETCH_ENABLED=false env
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#2965
No description provided.