====== Docker - Nginx Proxy Manager - Forgotten Password ====== ===== With Standard SQLite ===== ==== Access the Docker Container ==== docker exec -ti nginx-proxy-manager bash ---- ==== Install SQLite ==== apt update apt install sqlite3 -y ---- ==== Open the Database ==== sqlite3 /data/database.sqlite ---- ==== Modify User Credentials ==== Update the **user** table to reset the password. * Either set a new password or revert to the default. Find your user: SELECT id, name, email FROM user; returns: 1|Admin|some@email.com 2|User|some@email.com ---- === Update Password to "changeme" for user Admin[1] === UPDATE auth SET secret = '$2b$13$C9mJYK7Gf7sVgCCYw84HhOvOIpnyhkdGqwIp0PPj/s9.q0bxkoMZe' WHERE user_id = 1; **NOTE:** To update for User[2], then use ID number 2 (**WHERE user_id = 2;**) To update Password with "new_password" use: * SET secret = '$2b$12$ExC8EX3htFBpXtbO4DXp.eAZ1CtJbGlDhRhpVV1hHcWjV7cprebZi' ==== To check if Hash was changed ==== SELECT id, user_id, secret FROM auth WHERE user_id = 1; **NOTE:** Change ID number at end for the required user. ---- ==== Restart the Container ==== docker restart ---- ===== With MySQL ===== sudo docker exec -it [database container id or name] sh mysql connect npm UPDATE user SET is_deleted=1; sudo docker restart [nmp container id or name] (start second ssh connection to do that) UPDATE user SET is_deleted=0; Login with: Login: admin@example.com Password: changeme