[GH-ISSUE #3661] nginx looses all settings, login credentials, signed certificates, all stored data upon restart. #2423

Closed
opened 2026-02-26 07:35:31 +03:00 by kerem · 2 comments
Owner

Originally created by @WhiskeySheppard on GitHub (Mar 28, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3661

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 getting a mixture of issues setting NPM up and getting it configured. During the initial install I've recieved a "BAD Gateway" when trying to log in, I'd remove then reinstall it, get it configured, Upload my certificates and get all my sites setup through NPM. Everything worked until I reboot the host machine or restart NPM. Then it's behaves like it's a fresh install again loosing all settings I just configured. Only thing apparant in the logs were: "Configuring npm user ... useradd warning: npm's uid 0 outside of the UID_MIN 1000 and UID_MAX 60000 range" I'd uninstall NPM and start over again with another fresh install just to go through the same ordeal again. It has no persistance. I have other dockers running and they're not giving me any issues maintaining my settings/configurations. I've checked on simular issues closed/open and verified everythings's up to date based on other suggestions I've found. One suggested using jc21/nginx-proxy-manager:2.10.4 instead of jc21/nginx-proxy-manager: latest but that made no difference.

I started with this as my docker-compose.yml:

version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
# These ports are in format :
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP

# Uncomment the next line if you uncomment anything in the section
# environment:
  # Uncomment this if you want to change the location of
  # the SQLite DB file within the container
  # DB_SQLITE_FILE: "/data/database.sqlite"

  # Uncomment this if IPv6 is not enabled on your host
  # DISABLE_IPV6: 'true'

volumes:
  - ./data:/data
  - ./letsencrypt:/etc/letsencrypt

Then hoped maybe using the combination with the database would help with the persistance so I used this for docker-compose.yml

version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
# These ports are in format :
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP
environment:
# Mysql/Maria connection parameters:
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "removed"
DB_MYSQL_PASSWORD: "removed"
DB_MYSQL_NAME: "npm"
# Uncomment this if IPv6 is not enabled on your host
DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db

db:
image: 'jc21/mariadb-aria:latest'
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: 'removed'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'removed'
MYSQL_PASSWORD: 'removed'
MARIADB_AUTO_UPGRADE: '1'
volumes:
- ./mysql:/var/lib/mysql

as I used it minus the database credentials I removed.

Nginx Proxy Manager Version
< started with v2.11.1, out of desperations I tried v2.10.4 >

To Reproduce
Steps to reproduce the behavior:

  1. Installed as specified on https://nginxproxymanager.com/setup/
  2. Change credentials from default admin@example.com and changeme password.
  3. Make any changes within NGINX,
  4. Restart host machine, or restart NPM
  5. NPM starts as if it's a fresh install requires default admin@example.com and changeme password to log in and any changes made prior to restart are gone.
  6. waste 3 days trying to get this to work as advertised, repeat the same steps to the point I reached the limit of lets encrypt so now I cant get my network up and going for at least two days before I cant attempt to download new ssl certificates.

Expected behavior

Screenshots

Screenshot 2024-03-28 031407

Operating System

Additional context

Originally created by @WhiskeySheppard on GitHub (Mar 28, 2024). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3661 <!-- 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** < I'm getting a mixture of issues setting NPM up and getting it configured. During the initial install I've recieved a "BAD Gateway" when trying to log in, I'd remove then reinstall it, get it configured, Upload my certificates and get all my sites setup through NPM. Everything worked until I reboot the host machine or restart NPM. Then it's behaves like it's a fresh install again loosing all settings I just configured. Only thing apparant in the logs were: "Configuring npm user ... useradd warning: npm's uid 0 outside of the UID_MIN 1000 and UID_MAX 60000 range" I'd uninstall NPM and start over again with another fresh install just to go through the same ordeal again. It has no persistance. I have other dockers running and they're not giving me any issues maintaining my settings/configurations. I've checked on simular issues closed/open and verified everythings's up to date based on other suggestions I've found. One suggested using jc21/nginx-proxy-manager:2.10.4 instead of jc21/nginx-proxy-manager: latest but that made no difference. I started with this as my docker-compose.yml: version: '3.8' services: app: image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped ports: # These ports are in format <host-port>:<container-port> - '80:80' # Public HTTP Port - '443:443' # Public HTTPS Port - '81:81' # Admin Web Port # Add any other Stream port you want to expose # - '21:21' # FTP # Uncomment the next line if you uncomment anything in the section # environment: # Uncomment this if you want to change the location of # the SQLite DB file within the container # DB_SQLITE_FILE: "/data/database.sqlite" # Uncomment this if IPv6 is not enabled on your host # DISABLE_IPV6: 'true' volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt Then hoped maybe using the combination with the database would help with the persistance so I used this for docker-compose.yml version: '3.8' services: app: image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped ports: # These ports are in format <host-port>:<container-port> - '80:80' # Public HTTP Port - '443:443' # Public HTTPS Port - '81:81' # Admin Web Port # Add any other Stream port you want to expose # - '21:21' # FTP environment: # Mysql/Maria connection parameters: DB_MYSQL_HOST: "db" DB_MYSQL_PORT: 3306 DB_MYSQL_USER: "removed" DB_MYSQL_PASSWORD: "removed" DB_MYSQL_NAME: "npm" # Uncomment this if IPv6 is not enabled on your host DISABLE_IPV6: 'true' volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt depends_on: - db db: image: 'jc21/mariadb-aria:latest' restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: 'removed' MYSQL_DATABASE: 'npm' MYSQL_USER: 'removed' MYSQL_PASSWORD: 'removed' MARIADB_AUTO_UPGRADE: '1' volumes: - ./mysql:/var/lib/mysql as I used it minus the database credentials I removed. **Nginx Proxy Manager Version** < started with v2.11.1, out of desperations I tried v2.10.4 > **To Reproduce** Steps to reproduce the behavior: 1. Installed as specified on https://nginxproxymanager.com/setup/ 2. Change credentials from default admin@example.com and changeme password. 3. Make any changes within NGINX, 4. Restart host machine, or restart NPM 5. NPM starts as if it's a fresh install requires default admin@example.com and changeme password to log in and any changes made prior to restart are gone. 6. waste 3 days trying to get this to work as advertised, repeat the same steps to the point I reached the limit of lets encrypt so now I cant get my network up and going for at least two days before I cant attempt to download new ssl certificates. **Expected behavior** <!-- I expected to be able to set NPM up and get it configured one time, and be able to restart the host without concern of wasted time so I can move on to doing other things. --> **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> ![Screenshot 2024-03-28 031407](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/43644167/c293addf-4a60-45d6-8e9e-787abcc0d3d6) **Operating System** <!-- Ubuntu 22.04.4, with latest updates. docker version 24.0.5 Portainer Business Edition 2.19.4 Host machine is a Dell optiplex 3080, Intel I5, 16GB RAM 250GB SSD. --> **Additional context** <!-- Chrome is up to date Version 123.0.6312.86 (Official Build) (64-bit) -->
kerem 2026-02-26 07:35:31 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@CuriousJames commented on GitHub (Mar 29, 2024):

I'm no expert, but can you check that the letsencrypt and data folders are being created when you run the command to start the docker, which should be 'sudo docker-compose up -d'.

If they are being created and there's files in them then that should be working, but if they aren't being created maybe it's because you're not running the docker-compose up -d command with sudo?

<!-- gh-comment-id:2026945071 --> @CuriousJames commented on GitHub (Mar 29, 2024): I'm no expert, but can you check that the letsencrypt and data folders are being created when you run the command to start the docker, which should be 'sudo docker-compose up -d'. If they are being created and there's files in them then that should be working, but if they aren't being created maybe it's because you're not running the docker-compose up -d command with sudo?
Author
Owner

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

@CuriousJames,

<!-- gh-comment-id:2049544430 --> @WhiskeySheppard commented on GitHub (Apr 11, 2024): @CuriousJames,
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#2423
No description provided.