login page shows "bad gateway" (No Current solution) !
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.
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.
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"] }
@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:
Seen above is what I see in my CLI when I run: docker logs
I am using the default pass and default email since this is a fresh install of NPM.
My solution is just to use version [2.12.3] until this gets fixed.
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?
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'
solution IP_RANGES_FETCH_ENABLED=false env