NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.44k stars 2.72k forks source link

Unable to login - No relevant user found #3782

Open flippet opened 6 months ago

flippet commented 6 months ago

Checklist

Describe the bug

So out of nowhere, I am unable to log in. It was working fine a couple days ago. Nothing has changed at all in last two days. The error is: No relevant user found

Nginx Proxy Manager Version

2.11.2. The latest docker image. jc21/nginx-proxy-manager

To Reproduce Steps to reproduce the behavior:

  1. Go to '...' Homeage
  2. Click on '....' Login
  3. Scroll down to '....'
  4. See error: No relevant user found

Expected behavior

Screenshots

image

Operating System

Ubuntu 24 and Casa OS installed on top of it.

Additional context

flippet commented 6 months ago

I looked up the database and realised I had used an incorrect email address. Anyway, it took me down a rabithole and I found a solution to reset the password (this solution is not available anywhere else).

The database in 2.11.2 is located at /data/datbase.sqlite

  1. Log into your container. docker exec -it nginxproxymanager /bin/sh

  2. Then connect to the sqlite db: sqlite3 /data/database.sqlite (If it reads sqlite3 command is not found, do this: apt update && apt install sqlite3 -y)

  3. Then run this to show all details of your user such as userid, email, password hash etc. : select * from user; (grab your email from here) select * from auth; (notice the password hash in here)

  4. Now run this to set your password to: changeme

    UPDATE auth
    SET secret = '$2b$13$X.7n1og.RCdKg/p/ZRUIj.gGlFPmoeSK29DTcF58tBzS6d1fZNJNu'
    WHERE id = 1;

Note: You can generate another password hash here. Make sure you use type 2b and 13 log rounds. - Online Bcrypt Hash Generator and Checker Tool | Developer Tool-kit

  1. Exit out of the DB .quit