[GH-ISSUE #3237] [Solved?] After update from 2.9.19 to 2.10.4, "Bad gateway" on local port 81 login screen, but sites keep functioning #2185

Open
opened 2026-02-26 07:34:23 +03:00 by kerem · 55 comments
Owner

Originally created by @Moonbase59 on GitHub (Oct 4, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3237

Checklist

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

Describe the bug

I’m not much into docker yet but I succeeded to install NPM 2.9.19 a few months ago and now realized I must make manual updates. So I logged into my Proxmox LXC container and did a docker-compose pull, which apparently brought me to v2.10.4 (shown on port 81 local login screen).

But now on every login attempt, I get a little red "Bad gateway" shown on the login screen and cannot administer my hosts anymore! For the time being, I reverted to my full LXC backup and went back to 2.9.19, which works fine.

docker ps shows I’m running jc21/mariadb-aria:latest and jc21/nginx-proxy-manager:latest.

I don’t know how to diagnose this, or where the logs are kept, help urgently needed.

Nginx Proxy Manager Version

2.10.4

To Reproduce
Steps to reproduce the behavior:

  1. Log into LXC using ssh.
  2. docker-compose pull, docker-compose down, docker-compose up -d
  3. Sites keep functioning.
  4. Port 81 login screen shows 2.10.4 and "Bad Gateway" upon login attempt.

Expected behavior

Local admin login working.

Screenshots

Auswahl_274

Operating System

Proxmox 7.4, unprivileged Ubuntu 22.04.3 LTS LXC

Additional context

Commands used to update:

root@proxy:/home/admin/npm# docker-compose pull
Pulling app ... done
Pulling db  ... done
root@proxy:/home/admin/npm# docker-compose down
Stopping npm-db-1  ... done
Stopping npm-app-1 ... done
Removing npm-db-1  ... done
Removing npm-app-1 ... done
Removing network npm_default
root@proxy:/home/admin/npm# docker-compose up -d
Creating network "npm_default" with the default driver
Creating npm_db_1  ... done
Creating npm_app_1 ... done
root@proxy:/home/admin/npm# 

Docker version:

Client: Docker Engine - Community
 Version:           24.0.6
 API version:       1.43
 Go version:        go1.20.7
 Git commit:        ed223bc
 Built:             Mon Sep  4 12:31:44 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.6
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.7
  Git commit:       1a79695
  Built:            Mon Sep  4 12:31:44 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.24
  GitCommit:        61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
 runc:
  Version:          1.1.9
  GitCommit:        v1.1.9-0-gccaecfc
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker ps output:

root@proxy:/home/admin/npm# docker ps
CONTAINER ID   IMAGE                             COMMAND             CREATED         STATUS         PORTS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          NAMES
6557ba6f70d7   jc21/nginx-proxy-manager:latest   "/init"             4 minutes ago   Up 3 minutes   0.0.0.0:70->70/tcp, :::70->70/tcp, 0.0.0.0:80-81->80-81/tcp, :::80-81->80-81/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:2022->2022/tcp, :::2022->2022/tcp, 0.0.0.0:3478->3478/tcp, :::3478->3478/tcp, 0.0.0.0:5000->5000/tcp, :::5000->5000/tcp, 0.0.0.0:5222->5222/tcp, :::5222->5222/tcp, 0.0.0.0:5269->5269/tcp, :::5269->5269/tcp, 0.0.0.0:5280-5281->5280-5281/tcp, :::5280-5281->5280-5281/tcp, 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 0.0.0.0:8005-8006->8005-8006/tcp, :::8005-8006->8005-8006/tcp, 0.0.0.0:8010->8010/tcp, :::8010->8010/tcp, 0.0.0.0:8015-8016->8015-8016/tcp, :::8015-8016->8015-8016/tcp, 0.0.0.0:8883->8883/tcp, :::8883->8883/tcp   npm_app_1
3f9778d06a3f   jc21/mariadb-aria:latest          "/scripts/run.sh"   4 minutes ago   Up 3 minutes   3306/tcp                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       npm_db_1

docker-compose.yml

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    environment:
      DB_MYSQL_HOST: "db"
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: "npm"
      DB_MYSQL_PASSWORD: "(PASSWORD)"
      DB_MYSQL_NAME: "npm"
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
  db:
    image: 'jc21/mariadb-aria:latest'
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: '(PASSWORD)'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: '(PASSWORD)'
    volumes:
      - ./data/mysql:/var/lib/mysql

docker-compose.override.yml

root@proxy:/home/admin/npm# cat docker-compose.override.yml 
# Add some radio ports to be handled by NGINX Proxy Manager.
# These will be forwarded as "streams" in NPM.
# Needs MyFritz-Freigabe to this proxy server!
services:
  app:
    ports:
      # BLOG
      - '70:70' # gopher
      # RADIO
      - '2022:2022' # SFTP
      # 8000 is in use by portainer, can't be bound here!
      - '8000:8000' # station 1 - listen
      - '8005:8005' # station 1 - DJ Stream Icecast
      - '8006:8006' # station 1 - DJ Stream Shoutcast
      - '8010:8010' # station 2 - listen
      - '8015:8015' # station 2 - DJ Stream Icecast
      - '8016:8016' # station 2 - DJ Stream Shoutcast
      # HOME ASSISTANT
      - '8883:8883' # HA MQTT
      # NEXTCLOUD
      - '3478:3478' # NextCloud Talk (TCP & UDP)
      # CHAT1 (Prosody)
      - '5000:5000' # Prosody file transfer proxy
      - '5222:5222' # Prosody client connections
      - '5269:5269' # Prosody server-to-server connections
      - '5280:5280' # Prosody HTTP
      - '5281:5281' # Prosody HTTPS
Originally created by @Moonbase59 on GitHub (Oct 4, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3237 <!-- 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 - Are you sure you're not using someone else's docker image? - Yes - Have you searched for similar issues (both open and closed)? - Yes **Describe the bug** <!-- A clear and concise description of what the bug is. --> I’m not much into docker yet but I succeeded to install NPM 2.9.19 a few months ago and now realized I must make manual updates. So I logged into my Proxmox LXC container and did a `docker-compose pull`, which apparently brought me to v2.10.4 (shown on port 81 local login screen). **But now on every login attempt, I get a little red "Bad gateway" shown on the login screen and cannot administer my hosts anymore!** For the time being, I reverted to my full LXC backup and went back to 2.9.19, which works fine. `docker ps` shows I’m running `jc21/mariadb-aria:latest` and `jc21/nginx-proxy-manager:latest`. **I don’t know how to diagnose this, or where the logs are kept, help urgently needed.** **Nginx Proxy Manager Version** <!-- What version of Nginx Proxy Manager is reported on the login page? --> 2.10.4 **To Reproduce** Steps to reproduce the behavior: 1. Log into LXC using `ssh`. 2. `docker-compose pull`, `docker-compose down`, `docker-compose up -d` 3. Sites keep functioning. 4. Port 81 login screen shows 2.10.4 and "Bad Gateway" upon login attempt. **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> Local admin login working. **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> ![Auswahl_274](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/3706922/9283a96e-8106-4f13-9a1c-c4a0a54368e3) **Operating System** <!-- Please specify if using a Rpi, Mac, orchestration tool or any other setups that might affect the reproduction of this error. --> Proxmox 7.4, unprivileged Ubuntu 22.04.3 LTS LXC **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. --> **Commands used to update:** ``` root@proxy:/home/admin/npm# docker-compose pull Pulling app ... done Pulling db ... done root@proxy:/home/admin/npm# docker-compose down Stopping npm-db-1 ... done Stopping npm-app-1 ... done Removing npm-db-1 ... done Removing npm-app-1 ... done Removing network npm_default root@proxy:/home/admin/npm# docker-compose up -d Creating network "npm_default" with the default driver Creating npm_db_1 ... done Creating npm_app_1 ... done root@proxy:/home/admin/npm# ``` **Docker version:** ``` Client: Docker Engine - Community Version: 24.0.6 API version: 1.43 Go version: go1.20.7 Git commit: ed223bc Built: Mon Sep 4 12:31:44 2023 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 24.0.6 API version: 1.43 (minimum version 1.12) Go version: go1.20.7 Git commit: 1a79695 Built: Mon Sep 4 12:31:44 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.24 GitCommit: 61f9fd88f79f081d64d6fa3bb1a0dc71ec870523 runc: Version: 1.1.9 GitCommit: v1.1.9-0-gccaecfc docker-init: Version: 0.19.0 GitCommit: de40ad0 ``` **`docker ps` output:** ``` root@proxy:/home/admin/npm# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6557ba6f70d7 jc21/nginx-proxy-manager:latest "/init" 4 minutes ago Up 3 minutes 0.0.0.0:70->70/tcp, :::70->70/tcp, 0.0.0.0:80-81->80-81/tcp, :::80-81->80-81/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:2022->2022/tcp, :::2022->2022/tcp, 0.0.0.0:3478->3478/tcp, :::3478->3478/tcp, 0.0.0.0:5000->5000/tcp, :::5000->5000/tcp, 0.0.0.0:5222->5222/tcp, :::5222->5222/tcp, 0.0.0.0:5269->5269/tcp, :::5269->5269/tcp, 0.0.0.0:5280-5281->5280-5281/tcp, :::5280-5281->5280-5281/tcp, 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 0.0.0.0:8005-8006->8005-8006/tcp, :::8005-8006->8005-8006/tcp, 0.0.0.0:8010->8010/tcp, :::8010->8010/tcp, 0.0.0.0:8015-8016->8015-8016/tcp, :::8015-8016->8015-8016/tcp, 0.0.0.0:8883->8883/tcp, :::8883->8883/tcp npm_app_1 3f9778d06a3f jc21/mariadb-aria:latest "/scripts/run.sh" 4 minutes ago Up 3 minutes 3306/tcp npm_db_1 ``` **`docker-compose.yml`** ```yaml version: '3' services: app: image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped ports: - '80:80' - '81:81' - '443:443' environment: DB_MYSQL_HOST: "db" DB_MYSQL_PORT: 3306 DB_MYSQL_USER: "npm" DB_MYSQL_PASSWORD: "(PASSWORD)" DB_MYSQL_NAME: "npm" volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt db: image: 'jc21/mariadb-aria:latest' restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: '(PASSWORD)' MYSQL_DATABASE: 'npm' MYSQL_USER: 'npm' MYSQL_PASSWORD: '(PASSWORD)' volumes: - ./data/mysql:/var/lib/mysql ``` **`docker-compose.override.yml`** ```yaml root@proxy:/home/admin/npm# cat docker-compose.override.yml # Add some radio ports to be handled by NGINX Proxy Manager. # These will be forwarded as "streams" in NPM. # Needs MyFritz-Freigabe to this proxy server! services: app: ports: # BLOG - '70:70' # gopher # RADIO - '2022:2022' # SFTP # 8000 is in use by portainer, can't be bound here! - '8000:8000' # station 1 - listen - '8005:8005' # station 1 - DJ Stream Icecast - '8006:8006' # station 1 - DJ Stream Shoutcast - '8010:8010' # station 2 - listen - '8015:8015' # station 2 - DJ Stream Icecast - '8016:8016' # station 2 - DJ Stream Shoutcast # HOME ASSISTANT - '8883:8883' # HA MQTT # NEXTCLOUD - '3478:3478' # NextCloud Talk (TCP & UDP) # CHAT1 (Prosody) - '5000:5000' # Prosody file transfer proxy - '5222:5222' # Prosody client connections - '5269:5269' # Prosody server-to-server connections - '5280:5280' # Prosody HTTP - '5281:5281' # Prosody HTTPS ```
Author
Owner

@Moonbase59 commented on GitHub (Oct 4, 2023):

I found I can do a docker-compose logs app, which shows a lot of migration errors. Hope this helps:

2023-10-04 npm-log.log

<!-- gh-comment-id:1746823487 --> @Moonbase59 commented on GitHub (Oct 4, 2023): I found I can do a `docker-compose logs app`, which shows a lot of migration errors. Hope this helps: [2023-10-04 npm-log.log](https://github.com/NginxProxyManager/nginx-proxy-manager/files/12803525/2023-10-04.npm-log.log)
Author
Owner

@Moonbase59 commented on GitHub (Oct 4, 2023):

Ah, I think I managed! I read in some other issue that due to ownership problems the MariaDB and NPM persistent volumes must be separate, so I moved my mysql folder out of the data folder into a separate folder.

Before

npm
|-- data
    |-- mysql
|-- letsencrypt

After

npm
|-- data
|-- letsencrypt
|-- mysql

These were the steps I did in the console:

cd ~/npm
docker-compose down
mv data/mysql mysql

Edit docker-compose.yml (change db persistent volume)

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    environment:
      DB_MYSQL_HOST: "db"
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: "npm"
      DB_MYSQL_PASSWORD: "(PASSWORD)"
      DB_MYSQL_NAME: "npm"
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
  db:
    image: 'jc21/mariadb-aria:latest'
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: '(PASSWORD)'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: '(PASSWORD)'
    volumes:
      #- ./data/mysql:/var/lib/mysql
      - ./mysql:/var/lib/mysql

Continue in console

docker-compose pull
docker-compose up -d

Result

I can now log in again using the local address and port 81. No "Bad Gateway" anymore.

The docker-compose logs shows no errors anymore:

Attaching to npm_app_1, npm_db_1
app_1  | ❯ Configuring npm user ...
app_1  | ❯ Configuring npm group ...
app_1  | ❯ Checking paths ...
app_1  | ❯ Setting ownership ...
app_1  | ❯ Dynamic resolvers ...
app_1  | ❯ IPv6 ...
app_1  | Enabling IPV6 in hosts in: /etc/nginx/conf.d
app_1  | - /etc/nginx/conf.d/include/proxy.conf
app_1  | - /etc/nginx/conf.d/include/block-exploits.conf
app_1  | - /etc/nginx/conf.d/include/ssl-ciphers.conf
app_1  | - /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
app_1  | - /etc/nginx/conf.d/include/force-ssl.conf
app_1  | - /etc/nginx/conf.d/include/assets.conf
app_1  | - /etc/nginx/conf.d/include/ip_ranges.conf
app_1  | - /etc/nginx/conf.d/include/resolvers.conf
app_1  | - /etc/nginx/conf.d/default.conf
app_1  | - /etc/nginx/conf.d/production.conf
app_1  | Enabling IPV6 in hosts in: /data/nginx
app_1  | - /data/nginx/proxy_host/4.conf
app_1  | - /data/nginx/proxy_host/6.conf
app_1  | - /data/nginx/proxy_host/3.conf
app_1  | - /data/nginx/proxy_host/5.conf
app_1  | - /data/nginx/proxy_host/7.conf
app_1  | - /data/nginx/proxy_host/2.conf
app_1  | - /data/nginx/stream/4.conf
app_1  | - /data/nginx/stream/9.conf
app_1  | - /data/nginx/stream/6.conf
app_1  | - /data/nginx/stream/15.conf
app_1  | - /data/nginx/stream/10.conf
app_1  | - /data/nginx/stream/14.conf
app_1  | - /data/nginx/stream/12.conf
app_1  | - /data/nginx/stream/13.conf
app_1  | - /data/nginx/stream/5.conf
app_1  | - /data/nginx/stream/7.conf
app_1  | - /data/nginx/stream/11.conf
app_1  | - /data/nginx/stream/8.conf
app_1  | - /data/nginx/default_host/site.conf
app_1  | ❯ Docker secrets ...
app_1  | 
app_1  | -------------------------------------
app_1  |  _   _ ____  __  __
app_1  | | \ | |  _ \|  \/  |
app_1  | |  \| | |_) | |\/| |
app_1  | | |\  |  __/| |  | |
app_1  | |_| \_|_|   |_|  |_|
app_1  | -------------------------------------
app_1  | User:  npm PUID:0 ID:0 GROUP:0
app_1  | Group: npm PGID:0 ID:0
app_1  | -------------------------------------
app_1  | 
app_1  | ❯ Starting nginx ...
app_1  | ❯ Starting backend ...
app_1  | [10/4/2023] [1:14:08 PM] [Global   ] › ℹ  info      Using MySQL configuration
app_1  | [10/4/2023] [1:14:09 PM] [Migrate  ] › ℹ  info      Current database version: 20211108145214
app_1  | [10/4/2023] [1:14:09 PM] [Setup    ] › ℹ  info      Logrotate Timer initialized
app_1  | [10/4/2023] [1:14:09 PM] [Setup    ] › ℹ  info      Logrotate completed.
app_1  | [10/4/2023] [1:14:09 PM] [IP Ranges] › ℹ  info      Fetching IP Ranges from online services...
app_1  | [10/4/2023] [1:14:09 PM] [IP Ranges] › ℹ  info      Fetching https://ip-ranges.amazonaws.com/ip-ranges.json
app_1  | [10/4/2023] [1:14:09 PM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v4
db_1   | 2023-10-04 13:13:40 0 [Note] /usr/bin/mysqld (mysqld 10.4.15-MariaDB) starting as process 1 ...
db_1   | [i] pre-init.d - processing /scripts/pre-init.d/01_secret-init.sh
db_1   | [i] mysqld not found, creating....
db_1   | [i] MySQL directory already present, skipping creation
db_1   | 2023-10-04 13:13:40 0 [Note] Plugin 'InnoDB' is disabled.
db_1   | 2023-10-04 13:13:40 0 [Note] Plugin 'FEEDBACK' is disabled.
db_1   | 2023-10-04 13:13:40 0 [Note] Server socket created on IP: '::'.
db_1   | 2023-10-04 13:13:40 0 [Warning] 'user' entry '@4cbbcd2cdde2' ignored in --skip-name-resolve mode.
db_1   | 2023-10-04 13:13:40 0 [Warning] 'proxies_priv' entry '@% root@4cbbcd2cdde2' ignored in --skip-name-resolve mode.
db_1   | 2023-10-04 13:13:40 0 [Note] Reading of all Master_info entries succeeded
db_1   | 2023-10-04 13:13:40 0 [Note] Added new Master_info '' to hash table
db_1   | 2023-10-04 13:13:40 0 [Note] /usr/bin/mysqld: ready for connections.
db_1   | Version: '10.4.15-MariaDB'  socket: '/run/mysqld/mysqld.sock'  port: 3306  MariaDB Server

I leave this open for others to find (for now) and kindly ask the developers or someone more knowledgeable to confirm that what I did is correct.

After all, NPM is a critical part of the infrastructure and needs to be secure and updatable.

Thanks for giving us this great piece of software!

<!-- gh-comment-id:1746906763 --> @Moonbase59 commented on GitHub (Oct 4, 2023): Ah, I _think_ I managed! I read in some other issue that due to ownership problems the MariaDB and NPM persistent volumes must be separate, so I moved my `mysql` folder out of the `data` folder into a separate folder. **Before** ``` npm |-- data |-- mysql |-- letsencrypt ``` **After** ``` npm |-- data |-- letsencrypt |-- mysql ``` **These were the steps I did in the console:** ```bash cd ~/npm docker-compose down mv data/mysql mysql ``` **Edit `docker-compose.yml` (change db persistent volume)** ```yaml version: '3' services: app: image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped ports: - '80:80' - '81:81' - '443:443' environment: DB_MYSQL_HOST: "db" DB_MYSQL_PORT: 3306 DB_MYSQL_USER: "npm" DB_MYSQL_PASSWORD: "(PASSWORD)" DB_MYSQL_NAME: "npm" volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt db: image: 'jc21/mariadb-aria:latest' restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: '(PASSWORD)' MYSQL_DATABASE: 'npm' MYSQL_USER: 'npm' MYSQL_PASSWORD: '(PASSWORD)' volumes: #- ./data/mysql:/var/lib/mysql - ./mysql:/var/lib/mysql ``` **Continue in console** ```bash docker-compose pull docker-compose up -d ``` **Result** I can now log in again using the local address and port 81. No "Bad Gateway" anymore. The `docker-compose logs` shows no errors anymore: ``` Attaching to npm_app_1, npm_db_1 app_1 | ❯ Configuring npm user ... app_1 | ❯ Configuring npm group ... app_1 | ❯ Checking paths ... app_1 | ❯ Setting ownership ... app_1 | ❯ Dynamic resolvers ... app_1 | ❯ IPv6 ... app_1 | Enabling IPV6 in hosts in: /etc/nginx/conf.d app_1 | - /etc/nginx/conf.d/include/proxy.conf app_1 | - /etc/nginx/conf.d/include/block-exploits.conf app_1 | - /etc/nginx/conf.d/include/ssl-ciphers.conf app_1 | - /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf app_1 | - /etc/nginx/conf.d/include/force-ssl.conf app_1 | - /etc/nginx/conf.d/include/assets.conf app_1 | - /etc/nginx/conf.d/include/ip_ranges.conf app_1 | - /etc/nginx/conf.d/include/resolvers.conf app_1 | - /etc/nginx/conf.d/default.conf app_1 | - /etc/nginx/conf.d/production.conf app_1 | Enabling IPV6 in hosts in: /data/nginx app_1 | - /data/nginx/proxy_host/4.conf app_1 | - /data/nginx/proxy_host/6.conf app_1 | - /data/nginx/proxy_host/3.conf app_1 | - /data/nginx/proxy_host/5.conf app_1 | - /data/nginx/proxy_host/7.conf app_1 | - /data/nginx/proxy_host/2.conf app_1 | - /data/nginx/stream/4.conf app_1 | - /data/nginx/stream/9.conf app_1 | - /data/nginx/stream/6.conf app_1 | - /data/nginx/stream/15.conf app_1 | - /data/nginx/stream/10.conf app_1 | - /data/nginx/stream/14.conf app_1 | - /data/nginx/stream/12.conf app_1 | - /data/nginx/stream/13.conf app_1 | - /data/nginx/stream/5.conf app_1 | - /data/nginx/stream/7.conf app_1 | - /data/nginx/stream/11.conf app_1 | - /data/nginx/stream/8.conf app_1 | - /data/nginx/default_host/site.conf app_1 | ❯ Docker secrets ... app_1 | app_1 | ------------------------------------- app_1 | _ _ ____ __ __ app_1 | | \ | | _ \| \/ | app_1 | | \| | |_) | |\/| | app_1 | | |\ | __/| | | | app_1 | |_| \_|_| |_| |_| app_1 | ------------------------------------- app_1 | User: npm PUID:0 ID:0 GROUP:0 app_1 | Group: npm PGID:0 ID:0 app_1 | ------------------------------------- app_1 | app_1 | ❯ Starting nginx ... app_1 | ❯ Starting backend ... app_1 | [10/4/2023] [1:14:08 PM] [Global ] › ℹ info Using MySQL configuration app_1 | [10/4/2023] [1:14:09 PM] [Migrate ] › ℹ info Current database version: 20211108145214 app_1 | [10/4/2023] [1:14:09 PM] [Setup ] › ℹ info Logrotate Timer initialized app_1 | [10/4/2023] [1:14:09 PM] [Setup ] › ℹ info Logrotate completed. app_1 | [10/4/2023] [1:14:09 PM] [IP Ranges] › ℹ info Fetching IP Ranges from online services... app_1 | [10/4/2023] [1:14:09 PM] [IP Ranges] › ℹ info Fetching https://ip-ranges.amazonaws.com/ip-ranges.json app_1 | [10/4/2023] [1:14:09 PM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v4 db_1 | 2023-10-04 13:13:40 0 [Note] /usr/bin/mysqld (mysqld 10.4.15-MariaDB) starting as process 1 ... db_1 | [i] pre-init.d - processing /scripts/pre-init.d/01_secret-init.sh db_1 | [i] mysqld not found, creating.... db_1 | [i] MySQL directory already present, skipping creation db_1 | 2023-10-04 13:13:40 0 [Note] Plugin 'InnoDB' is disabled. db_1 | 2023-10-04 13:13:40 0 [Note] Plugin 'FEEDBACK' is disabled. db_1 | 2023-10-04 13:13:40 0 [Note] Server socket created on IP: '::'. db_1 | 2023-10-04 13:13:40 0 [Warning] 'user' entry '@4cbbcd2cdde2' ignored in --skip-name-resolve mode. db_1 | 2023-10-04 13:13:40 0 [Warning] 'proxies_priv' entry '@% root@4cbbcd2cdde2' ignored in --skip-name-resolve mode. db_1 | 2023-10-04 13:13:40 0 [Note] Reading of all Master_info entries succeeded db_1 | 2023-10-04 13:13:40 0 [Note] Added new Master_info '' to hash table db_1 | 2023-10-04 13:13:40 0 [Note] /usr/bin/mysqld: ready for connections. db_1 | Version: '10.4.15-MariaDB' socket: '/run/mysqld/mysqld.sock' port: 3306 MariaDB Server ``` --- I leave this open for others to find (for now) and **kindly ask the developers or someone more knowledgeable to confirm that what I did is correct.** After all, NPM is a critical part of the infrastructure and needs to be secure and updatable. **Thanks for giving us this great piece of software!**
Author
Owner

@conichonhaa commented on GitHub (Oct 4, 2023):

Thanks a lot for sharing. It worked for me

🙏

<!-- gh-comment-id:1747268716 --> @conichonhaa commented on GitHub (Oct 4, 2023): Thanks a lot for sharing. It worked for me 🙏
Author
Owner

@not1q84-1 commented on GitHub (Nov 3, 2023):

I was looking for a fix for month - this worked like a charm. Thank you so much...

<!-- gh-comment-id:1793237757 --> @not1q84-1 commented on GitHub (Nov 3, 2023): I was looking for a fix for month - this worked like a charm. Thank you so much...
Author
Owner

@sleepystrigiformes commented on GitHub (Nov 5, 2023):

thanks,it is really help me.

<!-- gh-comment-id:1793677857 --> @sleepystrigiformes commented on GitHub (Nov 5, 2023): thanks,it is really help me.
Author
Owner

@adamphetamine commented on GitHub (Dec 6, 2023):

confirm the fix worked for me- moving the db folder up one level

<!-- gh-comment-id:1841924652 --> @adamphetamine commented on GitHub (Dec 6, 2023): confirm the fix worked for me- moving the db folder up one level
Author
Owner

@not1q84-1 commented on GitHub (Dec 7, 2023):

I would assume that if the sqlite db file is located in the /data folder move it one up so mv xxx.slq ../

<!-- gh-comment-id:1845333367 --> @not1q84-1 commented on GitHub (Dec 7, 2023): I would assume that if the sqlite db file is located in the /data folder move it one up so _mv xxx.slq ../_
Author
Owner

@boostedgti916 commented on GitHub (Dec 12, 2023):

Thank you! This fixed it for me been running 2.9.19 forever.

<!-- gh-comment-id:1852754187 --> @boostedgti916 commented on GitHub (Dec 12, 2023): Thank you! This fixed it for me been running 2.9.19 forever.
Author
Owner

@caioolivv commented on GitHub (Dec 21, 2023):

I would assume that if the sqlite db file is located in the /data folder move it one up so mv xxx.slq ../

Doesn't work

<!-- gh-comment-id:1866334180 --> @caioolivv commented on GitHub (Dec 21, 2023): > I would assume that if the sqlite db file is located in the /data folder move it one up so _mv xxx.slq ../_ Doesn't work
Author
Owner

@psychogun commented on GitHub (Dec 25, 2023):

How to address this if one is using database.sqlite?

<!-- gh-comment-id:1868995266 --> @psychogun commented on GitHub (Dec 25, 2023): How to address this if one is using database.sqlite?
Author
Owner

@adrianvg commented on GitHub (Jan 19, 2024):

I would assume that if the sqlite db file is located in the /data folder move it one up so mv xxx.slq ../

Doesn't work

Same here. Just upgraded npm to 2.11.0 from 2.10.4 and got hit by the Bad gateway-message - again.
Luckily I had a snapshot of the vm running portainer and npm.

Also, moving database.sqlite up a level from data/ gives me a "no user related content" or some such at the login screen.

Checking the logs after starting up npm 2.11.0, the log output stops after [Migrate ].

...
app_1  | -------------------------------------
app_1  |  _   _ ____  __  __
app_1  | | \ | |  _ \|  \/  |
app_1  | |  \| | |_) | |\/| |
app_1  | | |\  |  __/| |  | |
app_1  | |_| \_|_|   |_|  |_|
app_1  | -------------------------------------
app_1  | User:  npm PUID:0 ID:0 GROUP:0
app_1  | Group: npm PGID:0 ID:0
app_1  | -------------------------------------
app_1  |
app_1  | ❯ Starting nginx ...
app_1  | ❯ Starting backend ...
app_1  | [1/19/2024] [9:44:55 AM] [Global   ] › ℹ  info      Using Sqlite: /data/database.sqlite
app_1  | [1/19/2024] [9:45:01 AM] [Migrate  ] › ℹ  info      Current database version: none

With npm 2.10.4 it continues with logrotate, ssl renewals etc.

<!-- gh-comment-id:1900077011 --> @adrianvg commented on GitHub (Jan 19, 2024): > > I would assume that if the sqlite db file is located in the /data folder move it one up so _mv xxx.slq ../_ > > Doesn't work Same here. Just upgraded npm to 2.11.0 from 2.10.4 and got hit by the Bad gateway-message - again. Luckily I had a snapshot of the vm running portainer and npm. Also, moving database.sqlite up a level from data/ gives me a "no user related content" or some such at the login screen. Checking the logs after starting up npm 2.11.0, the log output stops after [Migrate ]. ``` ... app_1 | ------------------------------------- app_1 | _ _ ____ __ __ app_1 | | \ | | _ \| \/ | app_1 | | \| | |_) | |\/| | app_1 | | |\ | __/| | | | app_1 | |_| \_|_| |_| |_| app_1 | ------------------------------------- app_1 | User: npm PUID:0 ID:0 GROUP:0 app_1 | Group: npm PGID:0 ID:0 app_1 | ------------------------------------- app_1 | app_1 | ❯ Starting nginx ... app_1 | ❯ Starting backend ... app_1 | [1/19/2024] [9:44:55 AM] [Global ] › ℹ info Using Sqlite: /data/database.sqlite app_1 | [1/19/2024] [9:45:01 AM] [Migrate ] › ℹ info Current database version: none ``` With npm 2.10.4 it continues with logrotate, ssl renewals etc.
Author
Owner

@Spillebulle commented on GitHub (Jan 19, 2024):

Same here with sqlite

<!-- gh-comment-id:1900225903 --> @Spillebulle commented on GitHub (Jan 19, 2024): Same here with sqlite
Author
Owner

@SX2-NAME commented on GitHub (Jan 19, 2024):

Если удалить полностью файлик database.sqlite тогда создается новая учетная запись и все работает. Если потом перезатереть опять не работает. Проблема в том, что после обновления не читает database.sqlite Как выйти с этой ситуации?

<!-- gh-comment-id:1900249174 --> @SX2-NAME commented on GitHub (Jan 19, 2024): Если удалить полностью файлик **database.sqlite** тогда создается новая учетная запись и все работает. Если потом перезатереть опять не работает. Проблема в том, что после обновления не читает **database.sqlite** Как выйти с этой ситуации?
Author
Owner

@KvizadSaderah commented on GitHub (Jan 19, 2024):

Ah, I think I managed! I read in some other issue that due to ownership problems the MariaDB and NPM persistent volumes must be separate, so I moved my mysql folder out of the data folder into a separate folder.

Before

npm
|-- data
    |-- mysql
|-- letsencrypt

After

npm
|-- data
|-- letsencrypt
|-- mysql

These were the steps I did in the console:

cd ~/npm
docker-compose down
mv data/mysql mysql

Edit docker-compose.yml (change db persistent volume)

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    environment:
      DB_MYSQL_HOST: "db"
      DB_MYSQL_PORT: 3306
      DB_MYSQL_USER: "npm"
      DB_MYSQL_PASSWORD: "(PASSWORD)"
      DB_MYSQL_NAME: "npm"
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
  db:
    image: 'jc21/mariadb-aria:latest'
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: '(PASSWORD)'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: '(PASSWORD)'
    volumes:
      #- ./data/mysql:/var/lib/mysql
      - ./mysql:/var/lib/mysql

Continue in console

docker-compose pull
docker-compose up -d

Result

I can now log in again using the local address and port 81. No "Bad Gateway" anymore.

The docker-compose logs shows no errors anymore:

Attaching to npm_app_1, npm_db_1
app_1  | ❯ Configuring npm user ...
app_1  | ❯ Configuring npm group ...
app_1  | ❯ Checking paths ...
app_1  | ❯ Setting ownership ...
app_1  | ❯ Dynamic resolvers ...
app_1  | ❯ IPv6 ...
app_1  | Enabling IPV6 in hosts in: /etc/nginx/conf.d
app_1  | - /etc/nginx/conf.d/include/proxy.conf
app_1  | - /etc/nginx/conf.d/include/block-exploits.conf
app_1  | - /etc/nginx/conf.d/include/ssl-ciphers.conf
app_1  | - /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
app_1  | - /etc/nginx/conf.d/include/force-ssl.conf
app_1  | - /etc/nginx/conf.d/include/assets.conf
app_1  | - /etc/nginx/conf.d/include/ip_ranges.conf
app_1  | - /etc/nginx/conf.d/include/resolvers.conf
app_1  | - /etc/nginx/conf.d/default.conf
app_1  | - /etc/nginx/conf.d/production.conf
app_1  | Enabling IPV6 in hosts in: /data/nginx
app_1  | - /data/nginx/proxy_host/4.conf
app_1  | - /data/nginx/proxy_host/6.conf
app_1  | - /data/nginx/proxy_host/3.conf
app_1  | - /data/nginx/proxy_host/5.conf
app_1  | - /data/nginx/proxy_host/7.conf
app_1  | - /data/nginx/proxy_host/2.conf
app_1  | - /data/nginx/stream/4.conf
app_1  | - /data/nginx/stream/9.conf
app_1  | - /data/nginx/stream/6.conf
app_1  | - /data/nginx/stream/15.conf
app_1  | - /data/nginx/stream/10.conf
app_1  | - /data/nginx/stream/14.conf
app_1  | - /data/nginx/stream/12.conf
app_1  | - /data/nginx/stream/13.conf
app_1  | - /data/nginx/stream/5.conf
app_1  | - /data/nginx/stream/7.conf
app_1  | - /data/nginx/stream/11.conf
app_1  | - /data/nginx/stream/8.conf
app_1  | - /data/nginx/default_host/site.conf
app_1  | ❯ Docker secrets ...
app_1  | 
app_1  | -------------------------------------
app_1  |  _   _ ____  __  __
app_1  | | \ | |  _ \|  \/  |
app_1  | |  \| | |_) | |\/| |
app_1  | | |\  |  __/| |  | |
app_1  | |_| \_|_|   |_|  |_|
app_1  | -------------------------------------
app_1  | User:  npm PUID:0 ID:0 GROUP:0
app_1  | Group: npm PGID:0 ID:0
app_1  | -------------------------------------
app_1  | 
app_1  | ❯ Starting nginx ...
app_1  | ❯ Starting backend ...
app_1  | [10/4/2023] [1:14:08 PM] [Global   ] › ℹ  info      Using MySQL configuration
app_1  | [10/4/2023] [1:14:09 PM] [Migrate  ] › ℹ  info      Current database version: 20211108145214
app_1  | [10/4/2023] [1:14:09 PM] [Setup    ] › ℹ  info      Logrotate Timer initialized
app_1  | [10/4/2023] [1:14:09 PM] [Setup    ] › ℹ  info      Logrotate completed.
app_1  | [10/4/2023] [1:14:09 PM] [IP Ranges] › ℹ  info      Fetching IP Ranges from online services...
app_1  | [10/4/2023] [1:14:09 PM] [IP Ranges] › ℹ  info      Fetching https://ip-ranges.amazonaws.com/ip-ranges.json
app_1  | [10/4/2023] [1:14:09 PM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v4
db_1   | 2023-10-04 13:13:40 0 [Note] /usr/bin/mysqld (mysqld 10.4.15-MariaDB) starting as process 1 ...
db_1   | [i] pre-init.d - processing /scripts/pre-init.d/01_secret-init.sh
db_1   | [i] mysqld not found, creating....
db_1   | [i] MySQL directory already present, skipping creation
db_1   | 2023-10-04 13:13:40 0 [Note] Plugin 'InnoDB' is disabled.
db_1   | 2023-10-04 13:13:40 0 [Note] Plugin 'FEEDBACK' is disabled.
db_1   | 2023-10-04 13:13:40 0 [Note] Server socket created on IP: '::'.
db_1   | 2023-10-04 13:13:40 0 [Warning] 'user' entry '@4cbbcd2cdde2' ignored in --skip-name-resolve mode.
db_1   | 2023-10-04 13:13:40 0 [Warning] 'proxies_priv' entry '@% root@4cbbcd2cdde2' ignored in --skip-name-resolve mode.
db_1   | 2023-10-04 13:13:40 0 [Note] Reading of all Master_info entries succeeded
db_1   | 2023-10-04 13:13:40 0 [Note] Added new Master_info '' to hash table
db_1   | 2023-10-04 13:13:40 0 [Note] /usr/bin/mysqld: ready for connections.
db_1   | Version: '10.4.15-MariaDB'  socket: '/run/mysqld/mysqld.sock'  port: 3306  MariaDB Server

I leave this open for others to find (for now) and kindly ask the developers or someone more knowledgeable to confirm that what I did is correct.

After all, NPM is a critical part of the infrastructure and needs to be secure and updatable.

Thanks for giving us this great piece of software!

well, i can see in newer versions that mysql folder is outside data by default, but still facing that same issue

<!-- gh-comment-id:1900303640 --> @KvizadSaderah commented on GitHub (Jan 19, 2024): > Ah, I _think_ I managed! I read in some other issue that due to ownership problems the MariaDB and NPM persistent volumes must be separate, so I moved my `mysql` folder out of the `data` folder into a separate folder. > > **Before** > > ``` > npm > |-- data > |-- mysql > |-- letsencrypt > ``` > > **After** > > ``` > npm > |-- data > |-- letsencrypt > |-- mysql > ``` > > **These were the steps I did in the console:** > > ```shell > cd ~/npm > docker-compose down > mv data/mysql mysql > ``` > > **Edit `docker-compose.yml` (change db persistent volume)** > > ```yaml > version: '3' > services: > app: > image: 'jc21/nginx-proxy-manager:latest' > restart: unless-stopped > ports: > - '80:80' > - '81:81' > - '443:443' > environment: > DB_MYSQL_HOST: "db" > DB_MYSQL_PORT: 3306 > DB_MYSQL_USER: "npm" > DB_MYSQL_PASSWORD: "(PASSWORD)" > DB_MYSQL_NAME: "npm" > volumes: > - ./data:/data > - ./letsencrypt:/etc/letsencrypt > db: > image: 'jc21/mariadb-aria:latest' > restart: unless-stopped > environment: > MYSQL_ROOT_PASSWORD: '(PASSWORD)' > MYSQL_DATABASE: 'npm' > MYSQL_USER: 'npm' > MYSQL_PASSWORD: '(PASSWORD)' > volumes: > #- ./data/mysql:/var/lib/mysql > - ./mysql:/var/lib/mysql > ``` > > **Continue in console** > > ```shell > docker-compose pull > docker-compose up -d > ``` > > **Result** > > I can now log in again using the local address and port 81. No "Bad Gateway" anymore. > > The `docker-compose logs` shows no errors anymore: > > ``` > Attaching to npm_app_1, npm_db_1 > app_1 | ❯ Configuring npm user ... > app_1 | ❯ Configuring npm group ... > app_1 | ❯ Checking paths ... > app_1 | ❯ Setting ownership ... > app_1 | ❯ Dynamic resolvers ... > app_1 | ❯ IPv6 ... > app_1 | Enabling IPV6 in hosts in: /etc/nginx/conf.d > app_1 | - /etc/nginx/conf.d/include/proxy.conf > app_1 | - /etc/nginx/conf.d/include/block-exploits.conf > app_1 | - /etc/nginx/conf.d/include/ssl-ciphers.conf > app_1 | - /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf > app_1 | - /etc/nginx/conf.d/include/force-ssl.conf > app_1 | - /etc/nginx/conf.d/include/assets.conf > app_1 | - /etc/nginx/conf.d/include/ip_ranges.conf > app_1 | - /etc/nginx/conf.d/include/resolvers.conf > app_1 | - /etc/nginx/conf.d/default.conf > app_1 | - /etc/nginx/conf.d/production.conf > app_1 | Enabling IPV6 in hosts in: /data/nginx > app_1 | - /data/nginx/proxy_host/4.conf > app_1 | - /data/nginx/proxy_host/6.conf > app_1 | - /data/nginx/proxy_host/3.conf > app_1 | - /data/nginx/proxy_host/5.conf > app_1 | - /data/nginx/proxy_host/7.conf > app_1 | - /data/nginx/proxy_host/2.conf > app_1 | - /data/nginx/stream/4.conf > app_1 | - /data/nginx/stream/9.conf > app_1 | - /data/nginx/stream/6.conf > app_1 | - /data/nginx/stream/15.conf > app_1 | - /data/nginx/stream/10.conf > app_1 | - /data/nginx/stream/14.conf > app_1 | - /data/nginx/stream/12.conf > app_1 | - /data/nginx/stream/13.conf > app_1 | - /data/nginx/stream/5.conf > app_1 | - /data/nginx/stream/7.conf > app_1 | - /data/nginx/stream/11.conf > app_1 | - /data/nginx/stream/8.conf > app_1 | - /data/nginx/default_host/site.conf > app_1 | ❯ Docker secrets ... > app_1 | > app_1 | ------------------------------------- > app_1 | _ _ ____ __ __ > app_1 | | \ | | _ \| \/ | > app_1 | | \| | |_) | |\/| | > app_1 | | |\ | __/| | | | > app_1 | |_| \_|_| |_| |_| > app_1 | ------------------------------------- > app_1 | User: npm PUID:0 ID:0 GROUP:0 > app_1 | Group: npm PGID:0 ID:0 > app_1 | ------------------------------------- > app_1 | > app_1 | ❯ Starting nginx ... > app_1 | ❯ Starting backend ... > app_1 | [10/4/2023] [1:14:08 PM] [Global ] › ℹ info Using MySQL configuration > app_1 | [10/4/2023] [1:14:09 PM] [Migrate ] › ℹ info Current database version: 20211108145214 > app_1 | [10/4/2023] [1:14:09 PM] [Setup ] › ℹ info Logrotate Timer initialized > app_1 | [10/4/2023] [1:14:09 PM] [Setup ] › ℹ info Logrotate completed. > app_1 | [10/4/2023] [1:14:09 PM] [IP Ranges] › ℹ info Fetching IP Ranges from online services... > app_1 | [10/4/2023] [1:14:09 PM] [IP Ranges] › ℹ info Fetching https://ip-ranges.amazonaws.com/ip-ranges.json > app_1 | [10/4/2023] [1:14:09 PM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v4 > db_1 | 2023-10-04 13:13:40 0 [Note] /usr/bin/mysqld (mysqld 10.4.15-MariaDB) starting as process 1 ... > db_1 | [i] pre-init.d - processing /scripts/pre-init.d/01_secret-init.sh > db_1 | [i] mysqld not found, creating.... > db_1 | [i] MySQL directory already present, skipping creation > db_1 | 2023-10-04 13:13:40 0 [Note] Plugin 'InnoDB' is disabled. > db_1 | 2023-10-04 13:13:40 0 [Note] Plugin 'FEEDBACK' is disabled. > db_1 | 2023-10-04 13:13:40 0 [Note] Server socket created on IP: '::'. > db_1 | 2023-10-04 13:13:40 0 [Warning] 'user' entry '@4cbbcd2cdde2' ignored in --skip-name-resolve mode. > db_1 | 2023-10-04 13:13:40 0 [Warning] 'proxies_priv' entry '@% root@4cbbcd2cdde2' ignored in --skip-name-resolve mode. > db_1 | 2023-10-04 13:13:40 0 [Note] Reading of all Master_info entries succeeded > db_1 | 2023-10-04 13:13:40 0 [Note] Added new Master_info '' to hash table > db_1 | 2023-10-04 13:13:40 0 [Note] /usr/bin/mysqld: ready for connections. > db_1 | Version: '10.4.15-MariaDB' socket: '/run/mysqld/mysqld.sock' port: 3306 MariaDB Server > ``` > > I leave this open for others to find (for now) and **kindly ask the developers or someone more knowledgeable to confirm that what I did is correct.** > > After all, NPM is a critical part of the infrastructure and needs to be secure and updatable. > > **Thanks for giving us this great piece of software!** well, i can see in newer versions that mysql folder is outside data by default, but still facing that same issue
Author
Owner

@SX2-NAME commented on GitHub (Jan 19, 2024):

У меня SQLite а не MySQL!!!
Путь менять не нужно. Проблем в том что если создать новый database.sqlite все работает. А вот старый нет.

<!-- gh-comment-id:1900320770 --> @SX2-NAME commented on GitHub (Jan 19, 2024): У меня **SQLite** а не **MySQL**!!! Путь менять не нужно. Проблем в том что если создать новый **database.sqlite** все работает. А вот старый нет.
Author
Owner

@adrianvg commented on GitHub (Jan 19, 2024):

У меня SQLite а не MySQL!!!
Путь менять не нужно. Проблем в том что если создать новый database.sqlite все работает. А вот старый нет.

Translation to english:
"I have SQLite and not MySQL!!!
There is no need to change the path. The problem is that if you create a new database.sqlite everything works. But the old one doesn't."

If I delete and recreate the sqlite-db, won't I lose all my sites and ssl-certificates?

<!-- gh-comment-id:1900324391 --> @adrianvg commented on GitHub (Jan 19, 2024): > У меня **SQLite** а не **MySQL**!!! > Путь менять не нужно. Проблем в том что если создать новый **database.sqlite** все работает. А вот старый нет. Translation to english: _"I have SQLite and not MySQL!!! There is no need to change the path. The problem is that if you create a new database.sqlite everything works. But the old one doesn't."_ If I delete and recreate the sqlite-db, won't I lose all my sites and ssl-certificates?
Author
Owner

@adrianvg commented on GitHub (Jan 19, 2024):

При создании новой базы, действующие сайты остаются, но управлять ими невозможно! Нужно понять почему после обновления proxy-manager не видит базу. Я надеюсь разработчики исправят это. Пока пришлось откатиться на с 2.11.0 на 2.10.4

Could you please write in English?

<!-- gh-comment-id:1900347657 --> @adrianvg commented on GitHub (Jan 19, 2024): > При создании новой базы, действующие сайты остаются, но управлять ими невозможно! Нужно понять почему после обновления **proxy-manager** не видит базу. Я надеюсь разработчики исправят это. Пока пришлось откатиться на с **2.11.0** на **2.10.4** Could you please write in English?
Author
Owner

@SX2-NAME commented on GitHub (Jan 19, 2024):

When creating a new database, existing sites remain! But it is impossible to control them! You need to understand why after the update proxy-manager does not see the database. I hope the developers will fix this. So far I had to roll back from 2.11.0 to 2.10.4

<!-- gh-comment-id:1900351270 --> @SX2-NAME commented on GitHub (Jan 19, 2024): When creating a new database, existing sites remain! But it is impossible to control them! You need to understand why after the update proxy-manager does not see the database. I hope the developers will fix this. So far I had to roll back from **2.11.0** to **2.10.4**
Author
Owner

@lowfoon commented on GitHub (Jan 19, 2024):

I think I was able to replicate this on 2.11.0 by letting the login timeout, clicking around the UI, then browser refresh. At the point, when you go to login again, it will give you a bad gateway error.

Note: My setup consists of the database.sqlite file

<!-- gh-comment-id:1900575650 --> @lowfoon commented on GitHub (Jan 19, 2024): I think I was able to replicate this on 2.11.0 by letting the login timeout, clicking around the UI, then browser refresh. At the point, when you go to login again, it will give you a `bad gateway` error. Note: My setup consists of the `database.sqlite` file
Author
Owner

@taffit commented on GitHub (Jan 19, 2024):

When creating a new database, existing sites remain! But it is impossible to control them! You need to understand why after the update proxy-manager does not see the database. I hope the developers will fix this. So far I had to roll back from 2.11.0 to 2.10.4

This! This really is the only way to make it running again if you are using SQLite like me. Use the image jc21/nginx-proxy-manager:2.10.4, until the developers get it to work again with a newer version.

<!-- gh-comment-id:1900717453 --> @taffit commented on GitHub (Jan 19, 2024): > When creating a new database, existing sites remain! But it is impossible to control them! You need to understand why after the update proxy-manager does not see the database. I hope the developers will fix this. So far I had to roll back from **2.11.0** to **2.10.4** This! This really is the only way to make it running again if you are using SQLite like me. Use the image `jc21/nginx-proxy-manager:2.10.4`, until the developers get it to work again with a newer version.
Author
Owner

@Spillebulle commented on GitHub (Jan 19, 2024):

When creating a new database, existing sites remain! But it is impossible to control them! You need to understand why after the update proxy-manager does not see the database. I hope the developers will fix this. So far I had to roll back from 2.11.0 to 2.10.4

This! This really is the only way to make it running again if you are using SQLite like me. Use the image jc21/nginx-proxy-manager:2.10.4, until the developers get it to work again with a newer version.

I had to remove the "NODE" env but else than that, rolling back to 2.10.4 worked for me too

<!-- gh-comment-id:1900969883 --> @Spillebulle commented on GitHub (Jan 19, 2024): > > When creating a new database, existing sites remain! But it is impossible to control them! You need to understand why after the update proxy-manager does not see the database. I hope the developers will fix this. So far I had to roll back from **2.11.0** to **2.10.4** > > This! This really is the only way to make it running again if you are using SQLite like me. Use the image `jc21/nginx-proxy-manager:2.10.4`, until the developers get it to work again with a newer version. I had to remove the "NODE" env but else than that, rolling back to 2.10.4 worked for me too
Author
Owner

@baroumas commented on GitHub (Jan 19, 2024):

This! This really is the only way to make it running again if you are using SQLite like me. Use the image jc21/nginx-proxy-manager:2.10.4, until the developers get it to work again with a newer version.

Thank you! I had the same problem until I rolled back to 2.10.4

I've created a new fresh container on the latest version, and then restored table by table from my existing SQLite DB, restarting the container for each. It worked until the table "certificate" was restored, then it stopped working and the container log stopped after:

[1/19/2024] [8:02:44 PM] [Global   ] info      Using Sqlite: /data/database.sqlite
[1/19/2024] [8:02:45 PM] [Migrate  ] info      Current database version: none

Then I started another new container and added a hosts by hand, restarted container, and it was working. Requested a certificate (which worked), restarted, and it stopped working with the same logs as above.

<!-- gh-comment-id:1900980258 --> @baroumas commented on GitHub (Jan 19, 2024): > This! This really is the only way to make it running again if you are using SQLite like me. Use the image `jc21/nginx-proxy-manager:2.10.4`, until the developers get it to work again with a newer version. Thank you! I had the same problem until I rolled back to 2.10.4 I've created a new fresh container on the latest version, and then restored table by table from my existing SQLite DB, restarting the container for each. It worked until the table "**certificate**" was restored, then it stopped working and the container log stopped after: ``` [1/19/2024] [8:02:44 PM] [Global ] info Using Sqlite: /data/database.sqlite [1/19/2024] [8:02:45 PM] [Migrate ] info Current database version: none ``` Then I started another new container and added a hosts by hand, restarted container, and it was working. Requested a certificate (which worked), restarted, and it stopped working with the same logs as above.
Author
Owner

@iron-cc commented on GitHub (Jan 20, 2024):

Same here, broke after this update. Rolling back to 2.10.4 fixed the issue for now.

<!-- gh-comment-id:1901492556 --> @iron-cc commented on GitHub (Jan 20, 2024): Same here, broke after this update. Rolling back to 2.10.4 fixed the issue for now.
Author
Owner

@jhabers commented on GitHub (Jan 20, 2024):

if you copy the old DB over the the new NGINX it will work. Just dont change any settings until its fixed

<!-- gh-comment-id:1902167117 --> @jhabers commented on GitHub (Jan 20, 2024): if you copy the old DB over the the new NGINX it will work. Just dont change any settings until its fixed
Author
Owner

@SX2-NAME commented on GitHub (Jan 20, 2024):

if you copy the old DB over the the new NGINX it will work. Just dont change any settings until its fixed

I tried to do this. It didn't work for me! Rolled back.

<!-- gh-comment-id:1902197368 --> @SX2-NAME commented on GitHub (Jan 20, 2024): > if you copy the old DB over the the new NGINX it will work. Just dont change any settings until its fixed I tried to do this. It didn't work for me! Rolled back.
Author
Owner

@saiful7 commented on GitHub (Jan 21, 2024):

I had the same issue with SQLite and made it work again by rolling back to 2.10.4. Thank you.

<!-- gh-comment-id:1902541858 --> @saiful7 commented on GitHub (Jan 21, 2024): I had the same issue with SQLite and made it work again by rolling back to 2.10.4. Thank you.
Author
Owner

@angeloschat commented on GitHub (Jan 21, 2024):

Same issue here. Had to roll back to 2.10.4. Also removed NODE_OPTIONS --openssl-legacy-provider
from ENV otherwise backend did not start

<!-- gh-comment-id:1902591027 --> @angeloschat commented on GitHub (Jan 21, 2024): Same issue here. Had to roll back to 2.10.4. Also removed NODE_OPTIONS --openssl-legacy-provider from ENV otherwise backend did not start
Author
Owner

@RodBelaFarin commented on GitHub (Jan 21, 2024):

I would assume that if the sqlite db file is located in the /data folder move it one up so mv xxx.slq ../

This way I lost all my data. I can login with default admin@example.com only.

Interesting enough my sites are still working?! Would it be possible to transfer the data to new user account?

<!-- gh-comment-id:1902659385 --> @RodBelaFarin commented on GitHub (Jan 21, 2024): > I would assume that if the sqlite db file is located in the /data folder move it one up so _mv xxx.slq ../_ This way I lost all my data. I can login with default admin@example.com only. Interesting enough my sites are still working?! Would it be possible to transfer the data to new user account?
Author
Owner

@TollhouseC commented on GitHub (Jan 21, 2024):

Experiencing the same issue, attempted a bunch of fixes but nothing worked. Also in the reverted back to 2.10.4 camp till a patch is released, it works fine with that so just gonna chill there. Appreciate all you do jc21+contributors

<!-- gh-comment-id:1902716295 --> @TollhouseC commented on GitHub (Jan 21, 2024): Experiencing the same issue, attempted a bunch of fixes but nothing worked. Also in the reverted back to 2.10.4 camp till a patch is released, it works fine with that so just gonna chill there. Appreciate all you do jc21+contributors
Author
Owner

@technikamateur commented on GitHub (Jan 21, 2024):

I'm getting the same 502 with sqlite. Can be reproduced very easily. Just set up a fresh container, as explained in Quick Start. Afterwards stop and re run the container... and you're getting 502.

<!-- gh-comment-id:1902721006 --> @technikamateur commented on GitHub (Jan 21, 2024): I'm getting the same 502 with sqlite. Can be reproduced very easily. Just set up a fresh container, as explained in Quick Start. Afterwards stop and re run the container... and you're getting 502.
Author
Owner

@LoScienzo commented on GitHub (Feb 10, 2024):

I have the same issue (on SQLite) trying to go from 2.10.4 to 2.11.0 or 2.11.1. My instance was originally spun up on 2.9.19 and I was able to incrementally update up to 2.10.4 with no issue.

Also we should maybe remove the "[Solved?]" from the title.

<!-- gh-comment-id:1936784183 --> @LoScienzo commented on GitHub (Feb 10, 2024): I have the same issue (on SQLite) trying to go from 2.10.4 to 2.11.0 or 2.11.1. My instance was originally spun up on 2.9.19 and I was able to incrementally update up to 2.10.4 with no issue. Also we should maybe remove the "[Solved?]" from the title.
Author
Owner

@adrianvg commented on GitHub (Feb 12, 2024):

Same here. Just upgraded npm to 2.11.0 from 2.10.4 and got hit by the Bad gateway-message - again.

Luckily I had a snapshot of the vm running portainer and npm.

Also, moving database.sqlite up a level from data/ gives me a "no user related content" or > some such at the login screen.

Checking the logs after starting up npm 2.11.0, the log output stops after [Migrate ].

...
app_1 | -------------------------------------
app_1 | _ _ ____ __ __
app_1 | | \ | | _ | / |
app_1 | | | | |) | |/| |
app_1 | | |\ | __/| | | |
app_1 | |
| _|| || |_|
app_1 | -------------------------------------
app_1 | User: npm PUID:0 ID:0 GROUP:0
app_1 | Group: npm PGID:0 ID:0
app_1 | -------------------------------------
app_1 |
app_1 | ❯ Starting nginx ...
app_1 | ❯ Starting backend ...
app_1 | [1/19/2024] [9:44:55 AM] [Global ] › ℹ info Using Sqlite: /data/database.sqlite
app_1 | [1/19/2024] [9:45:01 AM] [Migrate ] › ℹ info Current database version: none

With npm 2.10.4 it continues with logrotate, ssl renewals etc.

Thanks @jc21!
NPM release 2.11.1 solved the bad gateway issue for me.

For posterity, I use this docker-compose.yml, with sqlite as the database:

root@docker:~/npm# cat docker-compose.yml
version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:

  • '80:80'
  • '81:81'
  • '443:443'
    volumes:
  • ./data:/data
  • ./letsencrypt:/etc/letsencrypt

root@docker:~/npm#

And this is my upgrade-script:

root@docker:~/npm# cat ./upgrade_npm.sh
#!/bin/bash

cd /root/npm
docker-compose stop
docker-compose pull
docker-compose up -d

exit

root@docker:~/npm#

<!-- gh-comment-id:1938584179 --> @adrianvg commented on GitHub (Feb 12, 2024): > Same here. Just upgraded npm to 2.11.0 from 2.10.4 and got hit by the Bad gateway-message - again. > > Luckily I had a snapshot of the vm running portainer and npm. > > Also, moving database.sqlite up a level from data/ gives me a "no user related content" or > some such at the login screen. > > Checking the logs after starting up npm 2.11.0, the log output stops after [Migrate ]. > > ... > app_1 | ------------------------------------- > app_1 | _ _ ____ __ __ > app_1 | | \ | | _ \| \/ | > app_1 | | \| | |_) | |\/| | > app_1 | | |\ | __/| | | | > app_1 | |_| \_|_| |_| |_| > app_1 | ------------------------------------- > app_1 | User: npm PUID:0 ID:0 GROUP:0 > app_1 | Group: npm PGID:0 ID:0 > app_1 | ------------------------------------- > app_1 | > app_1 | ❯ Starting nginx ... > app_1 | ❯ Starting backend ... > app_1 | [1/19/2024] [9:44:55 AM] [Global ] › ℹ info Using Sqlite: /data/database.sqlite > app_1 | [1/19/2024] [9:45:01 AM] [Migrate ] › ℹ info Current database version: none > > With npm 2.10.4 it continues with logrotate, ssl renewals etc. Thanks @jc21! NPM release 2.11.1 solved the bad gateway issue for me. For posterity, I use this docker-compose.yml, with sqlite as the database: > > root@docker:~/npm# cat docker-compose.yml > version: '3.8' > services: > app: > image: 'jc21/nginx-proxy-manager:latest' > restart: unless-stopped > ports: > - '80:80' > - '81:81' > - '443:443' > volumes: > - ./data:/data > - ./letsencrypt:/etc/letsencrypt > > > > root@docker:~/npm# And this is my upgrade-script: > > root@docker:~/npm# cat ./upgrade_npm.sh > #!/bin/bash > > cd /root/npm > docker-compose stop > docker-compose pull > docker-compose up -d > > exit > > > root@docker:~/npm#
Author
Owner

@T0ddz commented on GitHub (Mar 8, 2024):

I got the same problem and I solved this by executing chmod 777 database.sqlite

<!-- gh-comment-id:1985833516 --> @T0ddz commented on GitHub (Mar 8, 2024): I got the same problem and I solved this by executing `chmod 777 database.sqlite`
Author
Owner

@deenius commented on GitHub (Mar 11, 2024):

I'm getting the same error.

If I look in the log file (database), I see this:

2024-03-11_23-40-44

<!-- gh-comment-id:1989571864 --> @deenius commented on GitHub (Mar 11, 2024): I'm getting the same error. If I look in the log file (database), I see this: ![2024-03-11_23-40-44](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/163057753/d13dbe73-e297-4d07-b0e6-81a0cc1ab0b1)
Author
Owner

@JIeJaitt commented on GitHub (Apr 7, 2024):

For the same problem, the best way is to directly deploy version 2.9.19 instead of trying to solve the problem yourself, because it is more time-consuming, unless you plan to spend the extra time solving this problem. The following is my docker orchestration Documents, for reference only:

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:2.9.19'
    restart: unless-stopped
    ports:
      - '8881:80'
      - '81:81'
      - '4483:443'
    volumes:
      - ./data:/data 
      - ./letsencrypt:/etc/letsencrypt  

Remember that the server panel releases the port required by the service on the left, One more thing, version 2.9.19 has the problem of Internal Error when applying for a certificate. If you encounter this problem, it is recommended to go back to 2.9.18.

<!-- gh-comment-id:2041547706 --> @JIeJaitt commented on GitHub (Apr 7, 2024): For the same problem, the best way is to directly deploy version 2.9.19 instead of trying to solve the problem yourself, because it is more time-consuming, unless you plan to spend the extra time solving this problem. The following is my docker orchestration Documents, for reference only: ```yaml version: '3' services: app: image: 'jc21/nginx-proxy-manager:2.9.19' restart: unless-stopped ports: - '8881:80' - '81:81' - '4483:443' volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt ``` Remember that the server panel releases the port required by the service on the left, One more thing, version 2.9.19 has the problem of Internal Error when applying for a certificate. If you encounter this problem, it is recommended to go back to 2.9.18.
Author
Owner

@iamhasantan commented on GitHub (Apr 11, 2024):

I have this issue with 2.9.18 pulled today, its fine on the first start up, but any subsequent restarts of the container have the bad gateway error (using sql lite db)

<!-- gh-comment-id:2049108388 --> @iamhasantan commented on GitHub (Apr 11, 2024): I have this issue with 2.9.18 pulled today, its fine on the first start up, but any subsequent restarts of the container have the bad gateway error (using sql lite db)
Author
Owner

@JVKeller commented on GitHub (Jun 24, 2024):

I tried all the fixes here after updating to 2.11.2. Ended up reverting everything and just needed a reboot, instead of just restarting services, after updating.

Also, be sure your other config files are compliant with the updated nginx.
BEFORE you update, Change: (/data/nginx/proxy_host/*)

listen 443 ssl http2;
listen [::]:443 ssl http2;

to:

listen 443 ssl;
http2 on;
listen [::]:443 ssl;
<!-- gh-comment-id:2187118263 --> @JVKeller commented on GitHub (Jun 24, 2024): I tried all the fixes here after updating to 2.11.2. Ended up reverting everything and just needed a reboot, instead of just restarting services, after updating. Also, be sure your other config files are compliant with the updated nginx. BEFORE you update, Change: (/data/nginx/proxy_host/*) ``` listen 443 ssl http2; listen [::]:443 ssl http2; ``` to: ``` listen 443 ssl; http2 on; listen [::]:443 ssl; ```
Author
Owner

@claytonjr commented on GitHub (Jul 13, 2024):

For the same problem, the best way is to directly deploy version 2.9.19 instead of trying to solve the problem yourself, because it is more time-consuming, unless you plan to spend the extra time solving this problem. The following is my docker orchestration Documents, for reference only:

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:2.9.19'
    restart: unless-stopped
    ports:
      - '8881:80'
      - '81:81'
      - '4483:443'
    volumes:
      - ./data:/data 
      - ./letsencrypt:/etc/letsencrypt  

Remember that the server panel releases the port required by the service on the left, One more thing, version 2.9.19 has the problem of Internal Error when applying for a certificate. If you encounter this problem, it is recommended to go back to 2.9.18.

This solution worked for me, just downgrade.

<!-- gh-comment-id:2226778100 --> @claytonjr commented on GitHub (Jul 13, 2024): > For the same problem, the best way is to directly deploy version 2.9.19 instead of trying to solve the problem yourself, because it is more time-consuming, unless you plan to spend the extra time solving this problem. The following is my docker orchestration Documents, for reference only: > > ```yaml > version: '3' > services: > app: > image: 'jc21/nginx-proxy-manager:2.9.19' > restart: unless-stopped > ports: > - '8881:80' > - '81:81' > - '4483:443' > volumes: > - ./data:/data > - ./letsencrypt:/etc/letsencrypt > ``` > > Remember that the server panel releases the port required by the service on the left, One more thing, version 2.9.19 has the problem of Internal Error when applying for a certificate. If you encounter this problem, it is recommended to go back to 2.9.18. This solution worked for me, just downgrade.
Author
Owner

@zxy95 commented on GitHub (Jul 15, 2024):

I solved this problem with this way:
Change the permissions of the generated ssl certificate to 777, and restart the container. The specific file path is: /etc/letsencrypt/archive/npm-12/*
How I found it:
When I runned both version 2.10 and 2.11 on a newly created clean host, they worked fine at first, but the issue occurred a few days later. During this time, I just only generated ssl certificates, so I checked the ssl files, found that the permissions of /etc/letsencrypt/archive/npm-12/* was different from the /etc/letsencrypt/live/npm-12/ (which are all linked to ../archive/..), so I changed them, and the problem fixed.

<!-- gh-comment-id:2227844521 --> @zxy95 commented on GitHub (Jul 15, 2024): I solved this problem with this way: Change the permissions of the generated ssl certificate to 777, and restart the container. The specific file path is: **/etc/letsencrypt/archive/npm-12/*** How I found it: When I runned both version 2.10 and 2.11 on a newly created clean host, they worked fine at first, but the issue occurred a few days later. During this time, I just only generated ssl certificates, so I checked the ssl files, found that the permissions of **/etc/letsencrypt/archive/npm-12/*** was different from the **/etc/letsencrypt/live/npm-12/** (which are all linked to ../archive/..), so I changed them, and the problem fixed.
Author
Owner

@PeterKse commented on GitHub (Jul 18, 2024):

Encountered this today:

In the docker compose, I exposed a port in the db container:

    ports:
      - '3306:3306'

Connected to the db, using pw in the compose:

mysql -h 127.0.0.1 -P 3306 -u root -p

modified the db:

GRANT ALL PRIVILEGES ON *.* TO 'npm'@'%' IDENTIFIED BY '<insert your pw here>';
FLUSH PRIVILEGES;

exited mysql:
EXIT;

Removed the exposed port in db, restarted the containers.

admin@example.com:changeme worked without Bad Gateway

<!-- gh-comment-id:2235960518 --> @PeterKse commented on GitHub (Jul 18, 2024): Encountered this today: In the docker compose, I exposed a port in the db container: ``` ports: - '3306:3306' ``` Connected to the db, using pw in the compose: ``` mysql -h 127.0.0.1 -P 3306 -u root -p ``` modified the db: ``` GRANT ALL PRIVILEGES ON *.* TO 'npm'@'%' IDENTIFIED BY '<insert your pw here>'; FLUSH PRIVILEGES; ``` exited mysql: ```EXIT;``` Removed the exposed port in db, restarted the containers. admin@example.com:changeme worked without Bad Gateway
Author
Owner

@technikamateur commented on GitHub (Jul 22, 2024):

I solved this problem with this way: Change the permissions of the generated ssl certificate to 777, and restart the container. The specific file path is: /etc/letsencrypt/archive/npm-12/* How I found it: When I runned both version 2.10 and 2.11 on a newly created clean host, they worked fine at first, but the issue occurred a few days later. During this time, I just only generated ssl certificates, so I checked the ssl files, found that the permissions of /etc/letsencrypt/archive/npm-12/* was different from the /etc/letsencrypt/live/npm-12/ (which are all linked to ../archive/..), so I changed them, and the problem fixed.

That's exactly the problem since 2.10. I am still hoping that someone fixes the problem with sqlite.

<!-- gh-comment-id:2242927727 --> @technikamateur commented on GitHub (Jul 22, 2024): > I solved this problem with this way: Change the permissions of the generated ssl certificate to 777, and restart the container. The specific file path is: **/etc/letsencrypt/archive/npm-12/*** How I found it: When I runned both version 2.10 and 2.11 on a newly created clean host, they worked fine at first, but the issue occurred a few days later. During this time, I just only generated ssl certificates, so I checked the ssl files, found that the permissions of **/etc/letsencrypt/archive/npm-12/*** was different from the **/etc/letsencrypt/live/npm-12/** (which are all linked to ../archive/..), so I changed them, and the problem fixed. That's exactly the problem since 2.10. I am still hoping that someone fixes the problem with sqlite.
Author
Owner

@MarkRotNF commented on GitHub (Sep 8, 2024):

I also had the gateway error.

docker ps showed that " nginxproxymanager-db-1" (jc21/mariadb-aria:latest) ist "restarting" (in loop).

docker-compose up (without -d) returned:

app-1  | ❯ Starting backend ...
app-1  | ❯ Starting nginx ...
db-1   | 2024-09-08 10:59:54 0 [Note] Starting MariaDB 10.11.5-MariaDB source revision 7875294b6b74b53dd3aaa723e6cc103d2bb47b2c as process 1
db-1   | Cannot find checkpoint record at LSN (1,0x361f80)
db-1   | 2024-09-08 10:59:54 0 [ERROR] mysqld: Aria recovery failed. Please run aria_chk -r on all Aria tables (*.MAI) and delete all aria_log.######## files
db-1   | 2024-09-08 10:59:54 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
db-1   | 2024-09-08 10:59:54 0 [Note] Plugin 'InnoDB' is disabled.
db-1   | 2024-09-08 10:59:54 0 [Note] Plugin 'FEEDBACK' is disabled.
db-1   | 2024-09-08 10:59:54 0 [ERROR] Could not open mysql.plugin table: "Unknown storage engine 'Aria'". Some plugins may be not loaded
db-1   | 2024-09-08 10:59:54 0 [ERROR] Failed to initialize plugins.

I was able to fix it with the following:
cd to the mysql folder (should be the path thats in the docker-compose.yaml "db:" -> "volumes:". E.g. "./mysql" as in my case.
image

docker-compose down
sudo mv aria_log. XXXXXXXXX bak.aria_log.XXXXXXXXX
docker-compose up -d
(similar to described here: https://serverfault.com/questions/893626/mysql-wont-start-mysqld-got-signal-11)

(I'm not sure if this was due to insufficient free storage space. Mine was almost full.)

<!-- gh-comment-id:2336676326 --> @MarkRotNF commented on GitHub (Sep 8, 2024): I also had the gateway error. ``` docker ps``` showed that " nginxproxymanager-db-1" (jc21/mariadb-aria:latest) ist "restarting" (in loop). ``` docker-compose up``` (without -d) returned: ``` app-1 | ❯ Starting backend ... app-1 | ❯ Starting nginx ... db-1 | 2024-09-08 10:59:54 0 [Note] Starting MariaDB 10.11.5-MariaDB source revision 7875294b6b74b53dd3aaa723e6cc103d2bb47b2c as process 1 db-1 | Cannot find checkpoint record at LSN (1,0x361f80) db-1 | 2024-09-08 10:59:54 0 [ERROR] mysqld: Aria recovery failed. Please run aria_chk -r on all Aria tables (*.MAI) and delete all aria_log.######## files db-1 | 2024-09-08 10:59:54 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed. db-1 | 2024-09-08 10:59:54 0 [Note] Plugin 'InnoDB' is disabled. db-1 | 2024-09-08 10:59:54 0 [Note] Plugin 'FEEDBACK' is disabled. db-1 | 2024-09-08 10:59:54 0 [ERROR] Could not open mysql.plugin table: "Unknown storage engine 'Aria'". Some plugins may be not loaded db-1 | 2024-09-08 10:59:54 0 [ERROR] Failed to initialize plugins. ``` I was able to fix it with the following: cd to the mysql folder (should be the path thats in the docker-compose.yaml "db:" -> "volumes:". E.g. "./mysql" as in my case. ![image](https://github.com/user-attachments/assets/38c24d7f-91fd-4baa-87db-65bd6002340d) ``` docker-compose down``` ``` sudo mv aria_log. XXXXXXXXX bak.aria_log.XXXXXXXXX``` ``` docker-compose up -d``` (similar to described here: [https://serverfault.com/questions/893626/mysql-wont-start-mysqld-got-signal-11](https://serverfault.com/questions/893626/mysql-wont-start-mysqld-got-signal-1)) (I'm not sure if this was due to insufficient free storage space. Mine was almost full.)
Author
Owner

@frame45 commented on GitHub (Sep 12, 2024):

Before

npm
|-- data
    |-- mysql
|-- letsencrypt

After

npm
|-- data
|-- letsencrypt
|-- mysql

For me on v2.11.3 this fix worked. Thank you @Moonbase59 for the excellent research.

<!-- gh-comment-id:2346416160 --> @frame45 commented on GitHub (Sep 12, 2024): > **Before** > > ``` > npm > |-- data > |-- mysql > |-- letsencrypt > ``` > > **After** > > ``` > npm > |-- data > |-- letsencrypt > |-- mysql > ``` > For me on v2.11.3 this fix worked. Thank you @Moonbase59 for the excellent research.
Author
Owner

@qiulang commented on GitHub (Nov 19, 2024):

v2.12.1

After reading all the comments, I still do not know how to fix that.

  1. chmod 777 database.sqlite does not work for me.
  2. Downgrade to 2.10.4 does not work for me too.

v2.10.4

<!-- gh-comment-id:2484816977 --> @qiulang commented on GitHub (Nov 19, 2024): ![v2.12.1](https://github.com/user-attachments/assets/f2a076a0-8b43-482a-91ff-21397a90f1b4) After reading all the comments, I still do not know how to fix that. 1. `chmod 777 database.sqlite` does not work for me. 2. Downgrade to 2.10.4 does not work for me too. ![v2.10.4](https://github.com/user-attachments/assets/dbd674fc-ad4c-45bb-b6a9-d3cad0e58948)
Author
Owner

@canob commented on GitHub (Nov 19, 2024):

For me, downgrade to 2.10.4 worked, using SQLite.

<!-- gh-comment-id:2485771908 --> @canob commented on GitHub (Nov 19, 2024): For me, downgrade to 2.10.4 worked, using SQLite.
Author
Owner

@qiulang commented on GitHub (Nov 20, 2024):

Running on my local machine is fine. This happens when I deploy it on the cloud.

<!-- gh-comment-id:2487643780 --> @qiulang commented on GitHub (Nov 20, 2024): Running on my local machine is fine. This happens when I deploy it on the cloud.
Author
Owner

@HassenH1 commented on GitHub (Dec 23, 2024):

It took me about 30 min to kind of figure out what happened. EarIier, I had removed version: '3.8' from my docker compose file then i started getting the same error. Once i put it back in then ran docker compose down and docker compose -d.

<!-- gh-comment-id:2558862190 --> @HassenH1 commented on GitHub (Dec 23, 2024): It took me about 30 min to kind of figure out what happened. EarIier, I had removed ```version: '3.8'``` from my docker compose file then i started getting the same error. Once i put it back in then ran docker compose down and docker compose -d.
Author
Owner

@AntonBronnfjell commented on GitHub (Jan 18, 2025):

Just to confirm at version 2.11.2 the solution of @Moonbase59 works.

<!-- gh-comment-id:2599481257 --> @AntonBronnfjell commented on GitHub (Jan 18, 2025): Just to confirm at version 2.11.2 the solution of @Moonbase59 works.
Author
Owner

@billyp1970 commented on GitHub (Feb 9, 2025):

I may be a little late to the party here, but I had the same issue and here is what worked for me. In the database, migrations_lock was locked. I found in another post (sorry I didn't get the link) it said to remove said locks...mine started working as soon as I deleted those enteries.

Edit: I found the site, link provided:
https://github.com/knex/knex/issues/1217

<!-- gh-comment-id:2646396341 --> @billyp1970 commented on GitHub (Feb 9, 2025): I may be a little late to the party here, but I had the same issue and here is what worked for me. In the database, migrations_lock was locked. I found in another post (sorry I didn't get the link) it said to remove said locks...mine started working as soon as I deleted those enteries. Edit: I found the site, link provided: https://github.com/knex/knex/issues/1217
Author
Owner

@XxJooO commented on GitHub (Mar 3, 2025):

Folks,

I've recently updated from 2.9.19 to 2.12.2 and after several weeks of correct working I tried to login to do some changes and get the BAD GATEWAY...
Now I am on 2.12.3, and it still does not work. I tried some of the mentioned things above - nothing worked for me. And bad enough the thing @Moonbase59 mentioned does not work for me because my structure is totally different.

Is it still not fixed? Can I do something other to solve it?

<!-- gh-comment-id:2694401557 --> @XxJooO commented on GitHub (Mar 3, 2025): Folks, I've recently updated from 2.9.19 to 2.12.2 and after several weeks of correct working I tried to login to do some changes and get the BAD GATEWAY... Now I am on 2.12.3, and it still does not work. I tried some of the mentioned things above - nothing worked for me. And bad enough the thing @Moonbase59 mentioned does not work for me because my structure is totally different. Is it still not fixed? Can I do something other to solve it?
Author
Owner

@GEFNENEN commented on GitHub (Mar 11, 2025):

Running on my local machine is fine. This happens when I deploy it on the cloud.在我的本地机器上运行正常。当我将其部署到云端时,就会发生这种情况。

+1

<!-- gh-comment-id:2713466507 --> @GEFNENEN commented on GitHub (Mar 11, 2025): > Running on my local machine is fine. This happens when I deploy it on the cloud.在我的本地机器上运行正常。当我将其部署到云端时,就会发生这种情况。 +1
Author
Owner

@Tomblarom commented on GitHub (Mar 30, 2025):

I'm on v2.12.3 and this Bad Gateway login issue suddenly happend to me. It was very random! This worked for me:

docker exec -it nginx-proxy-manager bash
chmod 777 /data/database.sqlite

Lets see for how long...

<!-- gh-comment-id:2764696382 --> @Tomblarom commented on GitHub (Mar 30, 2025): I'm on `v2.12.3` and this `Bad Gateway` login issue suddenly happend to me. It was very random! This worked for me: ``` docker exec -it nginx-proxy-manager bash chmod 777 /data/database.sqlite ``` Lets see for how long...
Author
Owner

@Ranger21 commented on GitHub (Apr 29, 2025):

I'm on v2.12.3 and this Bad Gateway login issue suddenly happend to me. It was very random! This worked for me:

docker exec -it nginx-proxy-manager bash
chmod 777 /data/database.sqlite

Lets see for how long...

Doesn't work for me on v2.12.3

<!-- gh-comment-id:2838699705 --> @Ranger21 commented on GitHub (Apr 29, 2025): > I'm on `v2.12.3` and this `Bad Gateway` login issue suddenly happend to me. It was very random! This worked for me: > > ``` > docker exec -it nginx-proxy-manager bash > chmod 777 /data/database.sqlite > ``` > > Lets see for how long... Doesn't work for me on v2.12.3
Author
Owner

@orca9420 commented on GitHub (May 18, 2025):

Hi, everyone, I have tried various versions of the image, reinstalled and redeployed multiple times, changed the MySQL directory, but nothing worked. In the end, there was no other solution. I recommend everyone use this image; it won't have this problem.
https://hub.docker.com/r/zoeyvid/npmplus

<!-- gh-comment-id:2888906613 --> @orca9420 commented on GitHub (May 18, 2025): Hi, everyone, I have tried various versions of the image, reinstalled and redeployed multiple times, changed the MySQL directory, but nothing worked. In the end, there was no other solution. I recommend everyone use this image; it won't have this problem. https://hub.docker.com/r/zoeyvid/npmplus
Author
Owner

@nicko88 commented on GitHub (Oct 10, 2025):

Hi, everyone, I have tried various versions of the image, reinstalled and redeployed multiple times, changed the MySQL directory, but nothing worked. In the end, there was no other solution. I recommend everyone use this image; it won't have this problem. https://hub.docker.com/r/zoeyvid/npmplus

I just got this issue with npmplus today and I have no idea what to do...

<!-- gh-comment-id:3390503866 --> @nicko88 commented on GitHub (Oct 10, 2025): > Hi, everyone, I have tried various versions of the image, reinstalled and redeployed multiple times, changed the MySQL directory, but nothing worked. In the end, there was no other solution. I recommend everyone use this image; it won't have this problem. https://hub.docker.com/r/zoeyvid/npmplus I just got this issue with npmplus today and I have no idea what to do...
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#2185
No description provided.