How to reset the login password #1634
Replies: 9 comments 13 replies
-
A lifesaver! |
Beta Was this translation helpful? Give feedback.
-
I was able to use this to get access to Nginx Proxy Manager, but when I logged in, none of my existing proxies showed up. After a little investigation, I discovered that this is because we are creating a second user and all of the proxies were owned by the first user. Luckily, there is an easy fix which is updating the UPDATE dead_host SET owner_user_id=2;
UPDATE proxy_host SET owner_user_id=2;
UPDATE redirection_host SET owner_user_id=2;
UPDATE stream SET owner_user_id=2; This will update the tables to be owned by the new user. |
Beta Was this translation helpful? Give feedback.
-
When I reach step 3 it says that there is no "relevant user found" when I try to login (either with my useraccount, or the default one). Ideas ? |
Beta Was this translation helpful? Give feedback.
-
For whatever reason i tried again and it worked... I have no idea what changed since i first tried. I guess a few restarts helped somehow |
Beta Was this translation helpful? Give feedback.
-
An alternative that does not require creating a new user and losing any data is to just update the password hash for the user. The passwords are hashed with bcrypt. You can use Python to create a new hash:
Then you can install
|
Beta Was this translation helpful? Give feedback.
-
For those who, like me have this password issue in Nginx Proxy Manager ADD-ON in Home Assistant, here some information. 2/ Ssh your HA and type :
mine is 3/ Enter the container using 4/ just type 5/ 6/ find your user id (usually it's 1 because you only have 1 user 7/ Change the is_deleted from 0 to 1 (this will force the admin@example - changeme user to be activated 8/ NOW, in home assistant, restart the add-on Nginx Proxy Manager and login with 9/ create a new admin user (DON'T FORGET THIS PASSWORD TOO !!!) 10/ logout 11/ Come back to your container via SSH and open the DB again (steps 2 to 5) 12/ Change is_deleted from 1 to 0 13/ Restart the add-on in Home Assitant 14/ Log in with the new admin user you just created 15/ logout, and login with your old user and newly created password, and delete the admin user created in this procedure. Hope this helps NB: The update NGINX Proxy Manager Add-on (v1) does not rely on MariaDB anymore, that's why you have to edit the SQLite database inside the NginxProxyManager Container |
Beta Was this translation helpful? Give feedback.
-
The sqlite solution deleted all my proxy redirections and in the SSL section. Also saw an error "Owner:null" which wouldn't go away. So at the end I had no other choice than deleting the entire deployment and creating it again from scratch. |
Beta Was this translation helpful? Give feedback.
-
This should be in the documentation! Thanks :) |
Beta Was this translation helpful? Give feedback.
-
If you have forgotten your password and need to reset it here is how you do it. This depends on what database you are using. If you have two docker containers one of which is a database, you are using MySQL, if you just have the single npm docker container, you probably use the SQLite database. Since November of 2021, the example docker-compose file is using SQLite, prior to that is was MySQL.
SQLite (default since November 2021)
Step 1
Run these commands on the machine running the docker container containing the database but replacing
<container-name>
with the name of the docker container containing your npm instance (It will most likely be something likenginxproxymanager_core
):You have now entered the SQL mode, where you set the status of all users to deleted:
Step 2
If your NPM container has been running, restart it. If it has not been running, start it now.
Step 3
You have now created an admin user you can login with by accessing your NPM in the browser and logging in with the default login information:
login: admin@example.com
pass:
changeme
Step 4
You can now either just use this user, or you can re-enable the old account and use the new account to change the password of the old one. To re-enable it, once again execute the following commands:
Replace
<container-name>
again, as in step 1. Then set all users to not deleted by running:MySQL (default prior to November 2021)
Step 1
Run these commands on the machine running the docker container containing the database but replacing
<container-name>
with the name of the docker container containing your database (It will most likely be something likenginxproxymanager_db_1
):You will have to enter the root password of your database. You have set it in your docker-compose file through the
MYSQL_ROOT_PASSWORD
variable. Then continue entering the following commands:Step 2
If your NPM container has been running, restart it. If it has not been running, start it now.
Step 3
You have now created an admin user you can login with by accessing your NPM in the browser and logging in with the default login information:
login: admin@example.com
pass:
changeme
Step 4
You can now either just use this user, or you can re-enable the old account and use the new account to change the password of the old one. To re-enable all previously disabled users, once again execute the following commands:
Replace
<container-name>
and enter the root password again, as in step 1.Based on comment by talesam
Beta Was this translation helpful? Give feedback.
All reactions