This article is about resetting the password in your NPM.
Note: This only works if you are using a SQLite database (default since end of 2021)
First of all you have to establish a shell connection to your NPM docker container and install sqlite. Just replace nginxproxymanager_app_1 with the container name of your container and run following commands:
docker exec -it <your-container> sh
apt update && apt install sqlite3 -y
sqlite3 /data/database.sqlite
Now, set the status of all users to deleted.
UPDATE user SET is_deleted=1;
.exit
If your NPM container is running, restart it for the changes to take effect. If not, start it.
docker restart <your-container>
You can now log in to your NPM using the standard credentials:
Username: [email protected]
Password: changeme
You can now use this account or restore the one you lost access to.
If you want to restore your old account proceed with Step 4. This will allow you to access all the connections/hosts you already set up.
First of all, you have to establish a shell connection to your container again and open sqlite.
docker exec -it <your-container> sh
sqlite3 /data/database.sqlite
Then, set all users to not deleted.
UPDATE user SET is_deleted=0;
.exit
Restart NPM again and log in with the new user you created in the previous step to change the password of your old user.
Just go to the User tab, click on the three dots symbol next to the user you want to edit, click on Change Password and type in your new password.
Now you can access your old account again.