Reset Credentials for Nginx Proxy Manager

Dears,
I 'am just fell with this problem … I made a quick installation and loose the password I have put in Nginx Proxy Manager… :frowning:

It seem that old installation works with Maria DB but now it works with SQLITE since january 2023.
So the procedure to change the password have change. And I can’t find a procedure which work now

I find this solution > How to reset the login password · NginxProxyManager/nginx-proxy-manager · Discussion #1634 · GitHub

But impossible to make the command in TERMINAL in Home assistant

"docker exec -it sh apt update && apt install sqlite3 -y sqlite3 /data/database.sqlite "

I have obtain “command not found” .

Is anyone find a solution which works ?

(I already tried to delete/ re install the plugin but it doesn’t work)

Thanks in advance

1 Like

OK, just see the last post of the link I put, I will try and inform you but the new solution seems to be:

For those who, like me have this password issue in Nginx Proxy Manager ADD-ON in Home Assistant, here some information.
1/ First, have a SSH access to your HA server (Advanced SSH & Web Terminal is great with Protection Mode DISABLED !)

2/ Ssh your HA and type : docker ps to find the NPM container name

Welcome to Home Assistant OS.
Use ha to access the Home Assistant CLI.

**docker ps**

CONTAINER ID   IMAGE                                                              COMMAND                  CREATED          STATUS                PORTS                                                                                                                          NAMES
110c2ac207ed   ghcr.io/hassio-addons/nginxproxymanager/aarch64:1.0.1              "/init"                  5 minutes ago    Up 5 minutes          0.0.0.0:80-81->80-81/tcp, :::80-81->80-81/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp                                           addon_a0d7b954_nginxproxymanager
fa23a1250422   homeassistant/aarch64-addon-mariadb:2.6.1                          "/init"                  22 minutes ago   Up 22 minutes                                                                                                                                        addon_core_mariadb
567c019a872f   zigbee2mqtt/zigbee2mqtt-aarch64:1.35.2-1                           "/sbin/tini -- /dock…"   3 hours ago      Up 3 hours            0.0.0.0:8485->8485/tcp, :::8485->8485/tcp                      

mine is addon_a0d7b954_nginxproxymanager

3/ Enter the container using docker exec -it addon_a0d7b954_nginxproxymanager sh
Now your are in the container, and NOW you can think of editing the DB… but mysql or sqlite are not installed…

4/ just type apk add sqlite
And now follow ALL the steps (copied from above and adapted)

5/ sqlite3 /config/database.sqlite to open the DB

6/ find your user id (usually it’s 1 because you only have 1 user
SELECT id, email, is_deleted FROM user WHERE email='your-user-email-here'

7/ Change the is_deleted from 0 to 1 (this will force the admin@example - changeme user to be activated
UPDATE user SET is_deleted = 1 WHERE id = 1 (caution, put the id of your user, but usually it’s 1)

8/ NOW, in home assistant, restart the add-on Nginx Proxy Manager and login with [email protected] and changeme

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 UPDATE user SET is_deleted = **0** WHERE id = 1 (if your user id is 1 of course)

13/ Restart the add-on in Home Assitant

14/ Log in with the new admin user you just created
NOW AND ONLY NOW you can change the password of your previous user (look in the Users tab).

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

5 Likes

Just followd your instructions and they worked perfectly. Thank you so much.