[GH-ISSUE #230] How to reset password for web GUI #203

Open
opened 2026-02-26 06:31:27 +03:00 by kerem · 47 comments
Owner

Originally created by @ertemmstein on GitHub (Nov 6, 2019).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/230

Hi,

I forgot my password of Web GUI but i can connect container. How can i reset password/username?

Originally created by @ertemmstein on GitHub (Nov 6, 2019). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/230 Hi, I forgot my password of Web GUI but i can connect container. How can i reset password/username?
Author
Owner

@jc21 commented on GitHub (Nov 7, 2019):

Here's an obscure way to do this:

  1. Connect to the database
  2. Run: UPDATE user SET is_deleted=1;
  3. Restart nginx proxy manager, this will create a new Admin user with the following credentials:
  1. Run: UPDATE user SET is_deleted=0;
  2. Log in as the new user and reset your other user's password
  3. Log in as your main user, delete the new example user

If you are inexperienced with docker and MySQL, this comment provides more detailed instructions on how to perform these steps.

<!-- gh-comment-id:550565639 --> @jc21 commented on GitHub (Nov 7, 2019): Here's an obscure way to do this: 1. Connect to the database 2. Run: `UPDATE user SET is_deleted=1;` 3. Restart nginx proxy manager, this will create a new Admin user with the following credentials: - admin@example.com - Password: `changeme` 4. Run: `UPDATE user SET is_deleted=0;` 5. Log in as the new user and reset your other user's password 6. Log in as your main user, delete the new example user If you are inexperienced with docker and MySQL, [this comment](https://github.com/jc21/nginx-proxy-manager/issues/230#issuecomment-815078355) provides more detailed instructions on how to perform these steps.
Author
Owner

@ertemmstein commented on GitHub (Nov 7, 2019):

Thank you! It is done

<!-- gh-comment-id:551023786 --> @ertemmstein commented on GitHub (Nov 7, 2019): Thank you! It is done
Author
Owner

@theDwiz01 commented on GitHub (Nov 14, 2019):

Paid a friend to set this up via Hyper-V Manager VM. Been working for months. Had to restore my OS to previous image. After re-image no reverse proxies setup on this server work from the 3 day old image(502 bad gateway error given).

All reverse proxies setup on other server on the network work fine. On top of that I somehow have wrong web login password saved to Dashlane and can't access GUI. How do I reset my password?? Once I can login I can try to troubleshoot the "502 Bad Gateway" more for the half of them that don't load...

<!-- gh-comment-id:553671203 --> @theDwiz01 commented on GitHub (Nov 14, 2019): Paid a friend to set this up via Hyper-V Manager VM. Been working for months. Had to restore my OS to previous image. After re-image no reverse proxies setup on this server work from the 3 day old image(502 bad gateway error given). All reverse proxies setup on other server on the network work fine. On top of that I somehow have wrong web login password saved to Dashlane and can't access GUI. How do I reset my password?? Once I can login I can try to troubleshoot the "502 Bad Gateway" more for the half of them that don't load...
Author
Owner

@jc21 commented on GitHub (Nov 14, 2019):

I think the docker logs for nginx proxy manager might be helpful, if you've lost access to your previous account then the restored image might not be using a pre-existing database and created a new one. It's a hard one to debug through just these comments.

You can follow the steps above to reset your password, assuming the default admin@example.com:changeme doesn't work.

<!-- gh-comment-id:553672645 --> @jc21 commented on GitHub (Nov 14, 2019): I think the docker logs for nginx proxy manager might be helpful, if you've lost access to your previous account then the restored image might not be using a pre-existing database and created a new one. It's a hard one to debug through just these comments. You can follow the steps above to reset your password, assuming the default `admin@example.com`:`changeme` doesn't work.
Author
Owner

@jc21 commented on GitHub (Nov 14, 2019):

I assume you'd need to access your VM and connect to the database from there. As we don't know what your friend did to set up the vm we can't help, and supporting docker hosts is not in our scope.

<!-- gh-comment-id:553675443 --> @jc21 commented on GitHub (Nov 14, 2019): I assume you'd need to access your VM and connect to the database from there. As we don't know what your friend did to set up the vm we can't help, and supporting docker hosts is not in our scope.
Author
Owner

@mcfrojd commented on GitHub (Apr 19, 2020):

Here's an obscure way to do this:

  1. Connect to the database
  2. Run: UPDATE user SET is_deleted=1;
  3. Restart nginx proxy manager, this will create a new Admin user with the following credentials:
  1. Run: UPDATE user SET is_deleted=0;
  2. Log in as the new user and reset your other user's password
  3. Log in as your main user, delete the new example user

Im running your docker-compose.yaml way, but how do i access the mariadb from cli to reset the default user again?

I try to run:
sudo docker exec -it 5dd2bb6cb8cc bash

But the get:
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown

<!-- gh-comment-id:616173375 --> @mcfrojd commented on GitHub (Apr 19, 2020): > Here's an obscure way to do this: > > 1. Connect to the database > 2. Run: `UPDATE user SET is_deleted=1;` > 3. Restart nginx proxy manager, this will create a new Admin user with the following credentials: > > * [admin@example.com](mailto:admin@example.com) > * Password: `changeme` > > 1. Run: `UPDATE user SET is_deleted=0;` > 2. Log in as the new user and reset your other user's password > 3. Log in as your main user, delete the new example user Im running your docker-compose.yaml way, but how do i access the mariadb from cli to reset the default user again? I try to run: `sudo docker exec -it 5dd2bb6cb8cc bash` But the get: ` OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown `
Author
Owner

@lieven121 commented on GitHub (May 20, 2020):

Im running your docker-compose.yaml way, but how do i access the mariadb from cli to reset the default user again?

I try to run:
sudo docker exec -it 5dd2bb6cb8cc bash

But the get:
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown

1: the error says it doesn't find bash (some containers only have 'sh' or 'ash') Note: I looked trough his DockerFile for his mariaDB and it uses alpine so 'sh' or 'ash'.
sudo docker exec -it [id or name] sh

2: you also can login to mysql directly using :
sudo docker exec -it [id or name] mysql -u [username] -p'

<!-- gh-comment-id:631536838 --> @lieven121 commented on GitHub (May 20, 2020): > Im running your docker-compose.yaml way, but how do i access the mariadb from cli to reset the default user again? > > I try to run: > `sudo docker exec -it 5dd2bb6cb8cc bash` > > But the get: > `OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown` 1: the error says it doesn't find bash (some containers only have 'sh' or 'ash') Note: I looked trough his DockerFile for his mariaDB and it uses alpine so 'sh' or 'ash'. `sudo docker exec -it [id or name] sh` 2: you also can login to mysql directly using : `sudo docker exec -it [id or name] mysql -u [username] -p'`
Author
Owner

@PCbIX commented on GitHub (Oct 23, 2020):

For me works that:
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

<!-- gh-comment-id:715381300 --> @PCbIX commented on GitHub (Oct 23, 2020): For me works that: 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
Author
Owner

@TsekNet commented on GitHub (Feb 15, 2021):

Should this be added to the docs as an alternative method for resetting an account password? This just prevented me from being locked out, where the instructions currently linked on the npm website did not work.

<!-- gh-comment-id:779385680 --> @TsekNet commented on GitHub (Feb 15, 2021): Should this be added to the docs as an alternative method for resetting an account password? This just prevented me from being locked out, where the instructions currently linked on the npm website did not work.
Author
Owner

@morg-mov commented on GitHub (Mar 3, 2021):

I'm unable to connect to the MySQL Database. Whenever I run the set of commands described above by @PCbIX, it just says "Command not Found" when I attempt to run "mysql".

Edit: I figured it out, but now I have a new problem, when I attempt to execute UPDATE user SET is_deleted=1;, It outputs ERROR 1046 (3D000): No database selected.

<!-- gh-comment-id:790119342 --> @morg-mov commented on GitHub (Mar 3, 2021): I'm unable to connect to the MySQL Database. Whenever I run the set of commands described above by @PCbIX, it just says "Command not Found" when I attempt to run "mysql". Edit: I figured it out, but now I have a new problem, when I attempt to execute `UPDATE user SET is_deleted=1;`, It outputs `ERROR 1046 (3D000): No database selected`.
Author
Owner

@talesam commented on GitHub (Mar 25, 2021):

2. UPDATE user SET is_deleted=1;

Hello, could you be more specific?

docker exec -it nginxproxymanager_db_1 sh
mysql -u npm
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
+--------------------+
1 row in set (0.002 sec)
MariaDB [(none)]> UPDATE user SET is_deleted=1;
ERROR 1046 (3D000): No database selected
USE information_schema

My DB: DB_MYSQL_NAME: "npm"

something is wrong, the npm bank was supposed to appear, right?

I have the password saved on google, and I went to connect said it is invalid, I did not change the password.

<!-- gh-comment-id:806325823 --> @talesam commented on GitHub (Mar 25, 2021): > 2\. UPDATE user SET is_deleted=1; Hello, could you be more specific? ``` docker exec -it nginxproxymanager_db_1 sh mysql -u npm MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | +--------------------+ 1 row in set (0.002 sec) MariaDB [(none)]> UPDATE user SET is_deleted=1; ERROR 1046 (3D000): No database selected USE information_schema ``` My DB: `DB_MYSQL_NAME: "npm"` something is wrong, the npm bank was supposed to appear, right? I have the password saved on google, and I went to connect said it is invalid, I did not change the password.
Author
Owner

@imloic commented on GitHub (Apr 7, 2021):

Hey i have same problem. do you find a solution plz ?

<!-- gh-comment-id:815067457 --> @imloic commented on GitHub (Apr 7, 2021): Hey i have same problem. do you find a solution plz ?
Author
Owner

@talesam commented on GitHub (Apr 7, 2021):

It seems that some people do not have the patience to explain or assume that everyone already knows how to do it, but in the end I found out and documented it.

Step 1

Run these commands on the machine running the docker container containing the database:

docker exec -it nginxproxymanager_db_1 sh
mysql -u root -p

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:

USE npm;
UPDATE user SET is_deleted=1;
quit
exit

Step 2

If your NPM container has been running, restart it. If it has not been running, start it now.

Step 3

Access your NPM in the browser and log in with this data:
login: admin@example.com
pass: changeme

Step 4

You have now created an admin user you can login with. 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:

docker exec -it nginxproxymanager_db_1 sh
mysql -u root -p

Enter the root password again, as in step 1.

USE npm;
UPDATE user SET is_deleted=0;
quit
exit
<!-- gh-comment-id:815078355 --> @talesam commented on GitHub (Apr 7, 2021): It seems that some people do not have the patience to explain or assume that everyone already knows how to do it, but in the end I found out and documented it. ### Step 1 Run these commands on the machine running the docker container containing the database: ``` docker exec -it nginxproxymanager_db_1 sh mysql -u root -p ``` 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](https://github.com/jc21/nginx-proxy-manager/blame/9e188e441a1fca9dcf1ce0b1b994693d1bb3672f/docs/setup/README.md#L59). Then continue entering the following commands: ```sql USE npm; UPDATE user SET is_deleted=1; quit exit ``` ### Step 2 If your NPM container has been running, restart it. If it has not been running, start it now. ### Step 3 Access your NPM in the browser and log in with this data: **login:** admin@example.com **pass:** `changeme` ### Step 4 You have now created an admin user you can login with. 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: ```commandline docker exec -it nginxproxymanager_db_1 sh mysql -u root -p ``` Enter the root password again, as in step 1. ```sql USE npm; UPDATE user SET is_deleted=0; quit exit ```
Author
Owner

@imloic commented on GitHub (Apr 7, 2021):

thnaks bro you save my day

<!-- gh-comment-id:815086334 --> @imloic commented on GitHub (Apr 7, 2021): thnaks bro you save my day
Author
Owner

@talesam commented on GitHub (Apr 7, 2021):

I improved it to make it easier to understand ;-)

<!-- gh-comment-id:815089558 --> @talesam commented on GitHub (Apr 7, 2021): I improved it to make it easier to understand ;-)
Author
Owner

@morg-mov commented on GitHub (Apr 12, 2021):

Hi. Sorry, I forgot to respond to this. I just decided to uninstall and reinstall it because I thought my install was broken. (turns out I was just doing something wrong.) Thanks for the help though. I'll be sure to keep this in mind for when I will inevitably forget my password again lol.

<!-- gh-comment-id:817858414 --> @morg-mov commented on GitHub (Apr 12, 2021): Hi. Sorry, I forgot to respond to this. I just decided to uninstall and reinstall it because I thought my install was broken. (turns out I was just doing something wrong.) Thanks for the help though. I'll be sure to keep this in mind for when I will inevitably forget my password again lol.
Author
Owner

@leon1995 commented on GitHub (Jun 1, 2021):

Hi,

I followed the instructions, however after setting is_deleted back to is_deleted=0 and restarting the containers, I wasn't able to login because of an incorrect password.
How can I fix this?

EDIT: after the 4th try its working now

<!-- gh-comment-id:851929965 --> @leon1995 commented on GitHub (Jun 1, 2021): Hi, I followed the instructions, however after setting is_deleted back to is_deleted=0 and restarting the containers, I wasn't able to login because of an incorrect password. How can I fix this? EDIT: after the 4th try its working now
Author
Owner

@leon1995 commented on GitHub (Jun 7, 2021):

Today I had to do it again....

<!-- gh-comment-id:855868501 --> @leon1995 commented on GitHub (Jun 7, 2021): Today I had to do it again....
Author
Owner

@chaptergy commented on GitHub (Jun 11, 2021):

For those not wanting a new admin account, but instead to just set the password of a specific account you can do the following:

Connect to the database as before and go into the table named auth and update the secret column where the user_id is the user id you want. (You can see the users in the users table, and see the id associated with an email address.

Change the secret to

$2b$13$C9mJYK7Gf7sVgCCYw84HhOvOIpnyhkdGqwIp0PPj/s9.q0bxkoMZe

This will result in the password being changeme.

For those who are not able to log in with your new password after logging out, maybe you are experiencing issue https://github.com/jc21/nginx-proxy-manager/issues/1120. Change your password to a password which does not contain a #-symbol until this is fixed.

<!-- gh-comment-id:859944477 --> @chaptergy commented on GitHub (Jun 11, 2021): For those not wanting a new admin account, but instead to just set the password of a specific account you can do the following: > Connect to the database as before and go into the table named `auth` and update the `secret` column where the `user_id` is the user id you want. (You can see the users in the `users` table, and see the id associated with an email address. > > Change the secret to > ``` > $2b$13$C9mJYK7Gf7sVgCCYw84HhOvOIpnyhkdGqwIp0PPj/s9.q0bxkoMZe > ``` > This will result in the password being `changeme`. For those who are not able to log in with your new password after logging out, maybe you are experiencing issue https://github.com/jc21/nginx-proxy-manager/issues/1120. Change your password to a password which does not contain a `#`-symbol until this is fixed.
Author
Owner

@janmaroto commented on GitHub (Jul 13, 2021):

If you are using the jlesage image (jlesage/nginx-proxy-manager) and not the official docker image, you can also do it like this:
Get into the container:
docker exec -it nginx-proxy-manager sh
And now use the dedicarted program to reset it:
/opt/nginx-proxy-manager/bin/reset-password name@example.com newpassword

Maybe this is a new feature at the time of writing this, idk.
Hope it helps to the other people searching for this issue.
I found this program of pure luck while browsing the container in search of MySQL since it wasn't in the path.

<!-- gh-comment-id:879014392 --> @janmaroto commented on GitHub (Jul 13, 2021): If you are using the jlesage image (`jlesage/nginx-proxy-manager`) and not the official docker image, you can also do it like this: Get into the container: `docker exec -it nginx-proxy-manager sh` And now use the dedicarted program to reset it: ` /opt/nginx-proxy-manager/bin/reset-password name@example.com newpassword` Maybe this is a new feature at the time of writing this, idk. Hope it helps to the other people searching for this issue. I found this program of pure luck while browsing the container in search of MySQL since it wasn't in the path.
Author
Owner

@rourke750 commented on GitHub (Aug 4, 2021):

Following up on this. My account was deleted out of no where and the default came back. Weird thing is all data is now missing no proxies, redirects, anything but the logs are still reporting proxy requests working and are still trying to update my expired ssl certificates. Any idea?

<!-- gh-comment-id:892377284 --> @rourke750 commented on GitHub (Aug 4, 2021): Following up on this. My account was deleted out of no where and the default came back. Weird thing is all data is now missing no proxies, redirects, anything but the logs are still reporting proxy requests working and are still trying to update my expired ssl certificates. Any idea?
Author
Owner

@chaptergy commented on GitHub (Aug 4, 2021):

@rourke750 This has nothing to do with resetting the password. It sounds like somehow your database was wiped, so the only data left is the generated nginx config files. That is why the hosts keep working and the ssl certificates as well, but npms knowlege about these hosts and certificates has been deleted.

<!-- gh-comment-id:892423179 --> @chaptergy commented on GitHub (Aug 4, 2021): @rourke750 This has nothing to do with resetting the password. It sounds like somehow your database was wiped, so the only data left is the generated nginx config files. That is why the hosts keep working and the ssl certificates as well, but npms knowlege about these hosts and certificates has been deleted.
Author
Owner

@itsKV commented on GitHub (Dec 5, 2021):

/opt/nginx-proxy-manager/bin/reset-password name@example.com newpassword

I am getting following error white entering above command..

sh: 1: /opt/nginx-proxy-manager/bin/reset-password: not found

<!-- gh-comment-id:986211835 --> @itsKV commented on GitHub (Dec 5, 2021): > /opt/nginx-proxy-manager/bin/reset-password name@example.com newpassword I am getting following error white entering above command.. `sh: 1: /opt/nginx-proxy-manager/bin/reset-password: not found`
Author
Owner

@chaptergy commented on GitHub (Dec 5, 2021):

@itsKV then you don't have the jlesage image, but the official one. Reset it like described in this comment instead.

<!-- gh-comment-id:986213147 --> @chaptergy commented on GitHub (Dec 5, 2021): @itsKV then you don't have the jlesage image, but the official one. Reset it like described in [this comment](https://github.com/jc21/nginx-proxy-manager/issues/230#issuecomment-815078355) instead.
Author
Owner

@itsKV commented on GitHub (Dec 5, 2021):

For me works that: 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

In the step 1, for second command mysql is giving error sh: 1: mysql: not found as I am not using mysql. My setup's docker-compose is as follows...

version: "3"
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
# These ports are in format :
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP
# Uncomment the next line if you uncomment anything in the section
# environment:
# Uncomment this if you want to change the location of
# the SQLite DB file within the container
# DB_SQLITE_FILE: "/data/database.sqlite"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'

volumes:
  - ./data:/data
  - ./letsencrypt:/etc/letsencrypt

How can I reset the web ui password?

<!-- gh-comment-id:986228823 --> @itsKV commented on GitHub (Dec 5, 2021): > For me works that: 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](mailto:admin@example.com) Password: changeme In the step 1, for second command `mysql` is giving error `sh: 1: mysql: not found` as I am not using mysql. My setup's docker-compose is as follows... > version: "3" > services: > app: > image: 'jc21/nginx-proxy-manager:latest' > restart: unless-stopped > ports: > # These ports are in format <host-port>:<container-port> > - '80:80' # Public HTTP Port > - '443:443' # Public HTTPS Port > - '81:81' # Admin Web Port > # Add any other Stream port you want to expose > # - '21:21' # FTP > # Uncomment the next line if you uncomment anything in the section > # environment: > # Uncomment this if you want to change the location of > # the SQLite DB file within the container > # DB_SQLITE_FILE: "/data/database.sqlite" > # Uncomment this if IPv6 is not enabled on your host > # DISABLE_IPV6: 'true' > > volumes: > - ./data:/data > - ./letsencrypt:/etc/letsencrypt How can I reset the web ui password?
Author
Owner

@chaptergy commented on GitHub (Dec 5, 2021):

See https://github.com/jc21/nginx-proxy-manager/discussions/1634

<!-- gh-comment-id:986237157 --> @chaptergy commented on GitHub (Dec 5, 2021): See https://github.com/jc21/nginx-proxy-manager/discussions/1634
Author
Owner

@itsKV commented on GitHub (Dec 5, 2021):

See #1634

This worked like a charm.. 👍

<!-- gh-comment-id:986239435 --> @itsKV commented on GitHub (Dec 5, 2021): > See #1634 This worked like a charm.. 👍
Author
Owner

@uniquegch commented on GitHub (Mar 21, 2022):

I had to do this also and in case you do not find the password for the db and run portainer, just click the container for the nginx database (in my case it is nginx_d) and you will find the login information including the db password.
when you connected to the db you can also run SELECT * FROM user; and it will reveal the username.
here are my steps:
sudo docker exec -it nginx_db_1 sh
mysql -u root -p
enter the db password
USE npm;
show tables;
SELECT * FROM user;
you will see the username and the e-mail address. this might be enough to trigger your memory for what password you have set.
If not you can continue with the steps,

UPDATE user SET is_disabled=1;
quit
exit

restart the nginx db AND the nginx app

login with the admin@example.com and changeme password.
change the username information and the password

and run

sudo docker exec -it nginx_db_1 sh
mysql -u root -p
enter the db password
USE npm;
UPDATE user SET is_disabled=0;
quit
exit

<!-- gh-comment-id:1074410575 --> @uniquegch commented on GitHub (Mar 21, 2022): I had to do this also and in case you do not find the password for the db and run portainer, just click the container for the nginx database (in my case it is nginx_d) and you will find the login information including the db password. when you connected to the db you can also run SELECT * FROM user; and it will reveal the username. here are my steps: sudo docker exec -it nginx_db_1 sh mysql -u root -p enter the db password USE npm; show tables; SELECT * FROM user; you will see the username and the e-mail address. this might be enough to trigger your memory for what password you have set. If not you can continue with the steps, UPDATE user SET is_disabled=1; quit exit restart the nginx db AND the nginx app login with the admin@example.com and changeme password. change the username information and the password and run sudo docker exec -it nginx_db_1 sh mysql -u root -p enter the db password USE npm; UPDATE user SET is_disabled=0; quit exit
Author
Owner

@nvhurulenewvisionge commented on GitHub (Apr 18, 2022):

If you are using the jlesage image (jlesage/nginx-proxy-manager) and not the official docker image, you can also do it like this: Get into the container: docker exec -it nginx-proxy-manager sh And now use the dedicarted program to reset it: /opt/nginx-proxy-manager/bin/reset-password name@example.com newpassword

Maybe this is a new feature at the time of writing this, idk. Hope it helps to the other people searching for this issue. I found this program of pure luck while browsing the container in search of MySQL since it wasn't in the path.

this works with Docker'
Thanks

<!-- gh-comment-id:1101724922 --> @nvhurulenewvisionge commented on GitHub (Apr 18, 2022): > If you are using the jlesage image (`jlesage/nginx-proxy-manager`) and not the official docker image, you can also do it like this: Get into the container: `docker exec -it nginx-proxy-manager sh` And now use the dedicarted program to reset it: ` /opt/nginx-proxy-manager/bin/reset-password name@example.com newpassword` > > Maybe this is a new feature at the time of writing this, idk. Hope it helps to the other people searching for this issue. I found this program of pure luck while browsing the container in search of MySQL since it wasn't in the path. this works with Docker' Thanks
Author
Owner

@artemptushkin commented on GitHub (May 9, 2022):

Referring to this https://github.com/NginxProxyManager/nginx-proxy-manager/issues/230#issuecomment-550565639 my password reset flow looked like this today:

  1. sudo docker ps -> search mariadb and take container id
  2. sudo docker exec -it <container-id> sh
  3. mysql -u root -p
  4. use nginxproxymanager; (this step is missing everywhere, you should use a table)
  5. UPDATE user SET is_deleted=1;
  6. restart Nginx click on the button through addons UI or restart the container
  7. login with default creds: admin@example.com / changeme
  8. In MySQL terminal: UPDATE user SET is_deleted=0;
<!-- gh-comment-id:1121357871 --> @artemptushkin commented on GitHub (May 9, 2022): Referring to this https://github.com/NginxProxyManager/nginx-proxy-manager/issues/230#issuecomment-550565639 my password reset flow looked like this today: 1. `sudo docker ps` -> search `mariadb` and take container id 2. `sudo docker exec -it <container-id> sh` 3. `mysql -u root -p` 4. `use nginxproxymanager;` (this step is missing everywhere, you should use a table) 5. `UPDATE user SET is_deleted=1;` 6. restart Nginx click on the button through addons UI or restart the container 7. login with default creds: `admin@example.com / changeme` 8. In MySQL terminal: `UPDATE user SET is_deleted=0;`
Author
Owner

@scyto commented on GitHub (May 12, 2022):

@artemptushkin thanks this helped me a lot. some additional notes for others as there seem to be multiple installation types, this is for docker using the canonical compose for both db and npm and many variants.

  • the password in step 3 will be same as your MYSQL_ROOT_PASSWORD in your database compose yaml / command line.
  • in step 4 the database name will be the same as your DB_MYSQL_NAME: in your NPM compose yaml / command line.
<!-- gh-comment-id:1125335812 --> @scyto commented on GitHub (May 12, 2022): @artemptushkin thanks this helped me a lot. some additional notes for others as there seem to be multiple installation types, this is for docker using the canonical compose for both db and npm and many variants. - the password in step 3 will be same as your `MYSQL_ROOT_PASSWORD` in your database compose yaml / command line. - in step 4 the database name will be the same as your ` DB_MYSQL_NAME:` in your NPM compose yaml / command line.
Author
Owner

@ekkyzainularifin commented on GitHub (Feb 21, 2023):

Here's an simple way to do this:

  1. docker exec -it <container name> mysql -u root -p
  2. use npm;
  3. update auth set secret = '$2a$12$HQahaE/VRe7CDffHOmIPR.9StcFZpciw3P9KmbMR7rRTLIsVgvAiG' (password)
<!-- gh-comment-id:1437830739 --> @ekkyzainularifin commented on GitHub (Feb 21, 2023): Here's an simple way to do this: 1. `docker exec -it <container name> mysql -u root -p` 2. `use npm;` 3. ` update auth set secret = '$2a$12$HQahaE/VRe7CDffHOmIPR.9StcFZpciw3P9KmbMR7rRTLIsVgvAiG'` (password)
Author
Owner

@mikromcz commented on GitHub (Apr 24, 2023):

For those not wanting a new admin account, but instead to just set the password of a specific account you can do the following:

Connect to the database as before and go into the table named auth and update the secret column where the user_id is the user id you want. (You can see the users in the users table, and see the id associated with an email address.
Change the secret to

$2b$13$C9mJYK7Gf7sVgCCYw84HhOvOIpnyhkdGqwIp0PPj/s9.q0bxkoMZe

This will result in the password being changeme.

For those who are not able to log in with your new password after logging out, maybe you are experiencing issue #1120. Change your password to a password which does not contain a #-symbol until this is fixed.

best answer. I just copy sqlite db to my windows machine, and use SQLite editor to do it and then copy it back (and change owner/group back to root)

<!-- gh-comment-id:1520561293 --> @mikromcz commented on GitHub (Apr 24, 2023): > For those not wanting a new admin account, but instead to just set the password of a specific account you can do the following: > > > Connect to the database as before and go into the table named `auth` and update the `secret` column where the `user_id` is the user id you want. (You can see the users in the `users` table, and see the id associated with an email address. > > Change the secret to > > ``` > > $2b$13$C9mJYK7Gf7sVgCCYw84HhOvOIpnyhkdGqwIp0PPj/s9.q0bxkoMZe > > ``` > > > > > > > > > > > > > > > > > > > > > > > > This will result in the password being `changeme`. > > For those who are not able to log in with your new password after logging out, maybe you are experiencing issue #1120. Change your password to a password which does not contain a `#`-symbol until this is fixed. best answer. I just copy sqlite db to my windows machine, and use SQLite editor to do it and then copy it back (and change owner/group back to root)
Author
Owner

@robetus commented on GitHub (May 8, 2023):

Getting:ERROR 1146 (42S02): Table 'npm.user' doesn't exist when I run UPDATE user SET is_deleted=1; Any ideas?
Also get:

MariaDB [npm]> UPDATE user SET is_deleted=1;
ERROR 1036 (HY000): Table 'user' is read only
<!-- gh-comment-id:1538203410 --> @robetus commented on GitHub (May 8, 2023): Getting:`ERROR 1146 (42S02): Table 'npm.user' doesn't exist` when I run `UPDATE user SET is_deleted=1;` Any ideas? Also get: ``` MariaDB [npm]> UPDATE user SET is_deleted=1; ERROR 1036 (HY000): Table 'user' is read only ```
Author
Owner

@typoworx-de commented on GitHub (May 9, 2023):

This somehow sucks after trying to reset password as given above using sqlite it's giving me this error after being logged in:
Cannot read properties of null (reading 'avatar')

Somehow there's something totally screwed.

Even after doing this:

delete from sqlite_sequence;
delete from user;
delete from auth;
delete from user_permission;

And re-initialising with default login (with user-id 1) to reset admin with new credentials, it's still stuck :-/

update
finally got it working by doing this:
update proxy_host set owner_user_id=1 where 1;

<!-- gh-comment-id:1540033004 --> @typoworx-de commented on GitHub (May 9, 2023): This somehow sucks after trying to reset password as given above using sqlite it's giving me this error after being logged in: `Cannot read properties of null (reading 'avatar')` Somehow there's something totally screwed. Even after doing this: ``` delete from sqlite_sequence; delete from user; delete from auth; delete from user_permission; ``` And re-initialising with default login (with user-id 1) to reset admin with new credentials, it's still stuck :-/ **update** finally got it working by doing this: `update proxy_host set owner_user_id=1 where 1;`
Author
Owner

@JSouthGB commented on GitHub (May 12, 2023):

Here's an simple way to do this:

3. `update auth set secret = '$2a$12$HQahaE/VRe7CDffHOmIPR.9StcFZpciw3P9KmbMR7rRTLIsVgvAiG'` (password)

This is the winner for me. This will change ALL users' passwords to password. One minor correction:

update auth set secret = '$2a$12$HQahaE/VRe7CDffHOmIPR.9StcFZpciw3P9KmbMR7rRTLIsVgvAiG';

I'm using the jc21/mariadb-aria container and needed the trailing semi-colon.

And I'll add a note.

I had an Invalid Password error a couple months ago and used the UPDATE user SET is_deleted=1; method, it worked. Tonight I had the Invalid Password error again, and it didn't work. Using the quoted command above got me back in without having to restart either the app or db containers. However, clicking on Proxy Hosts returned an Owner is null error. It turns out, using the is_deleted=1 method previously, created my same user id twice, one with id=1 and another with id=2. Digging around, I found in the proxy_host table entries created by both id=1 and id=2. So I looked up some SQL commands and deleted both the id=2 and the default id=3 admin account leaving me with only my id=1 login. I then ran the below command and all is well again.

UPDATE proxy_host SET owner_user_id=1;

I use bind volumes for all of my docker containers to easily back them up, restore, and move them around as I want or need (I'm constantly changing/rebuilding). I end up with password issues due to the way NPM handles the db file permissions. (Not blaming the NPM author(s), just additional information)

<!-- gh-comment-id:1545035684 --> @JSouthGB commented on GitHub (May 12, 2023): > Here's an simple way to do this: > > 3. `update auth set secret = '$2a$12$HQahaE/VRe7CDffHOmIPR.9StcFZpciw3P9KmbMR7rRTLIsVgvAiG'` (password) This is the winner for me. This will change ALL users' passwords to `password`. One minor correction: `update auth set secret = '$2a$12$HQahaE/VRe7CDffHOmIPR.9StcFZpciw3P9KmbMR7rRTLIsVgvAiG';` I'm using the jc21/mariadb-aria container and needed the trailing semi-colon. And I'll add a note. I had an `Invalid Password` error a couple months ago and used the `UPDATE user SET is_deleted=1;` method, it worked. Tonight I had the `Invalid Password` error again, and it didn't work. Using the quoted command above got me back in without having to restart either the app or db containers. However, clicking on Proxy Hosts returned an `Owner is null` error. It turns out, using the `is_deleted=1` method previously, created my same user id twice, one with id=1 and another with id=2. Digging around, I found in the `proxy_host` table entries created by both id=1 and id=2. So I looked up some SQL commands and deleted both the id=2 and the default id=3 admin account leaving me with only my id=1 login. I then ran the below command and all is well again. `UPDATE proxy_host SET owner_user_id=1;` I use bind volumes for all of my docker containers to easily back them up, restore, and move them around as I want or need (I'm constantly changing/rebuilding). I end up with password issues due to the way NPM handles the db file permissions. (Not blaming the NPM author(s), just additional information)
Author
Owner

@github-actions[bot] commented on GitHub (Apr 1, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2029021513 --> @github-actions[bot] commented on GitHub (Apr 1, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@nenchi commented on GitHub (Oct 16, 2024):

For those who have official repo with SQLite:

  • docker exec -ti nginx_proxy_manager sh
  • cd /data
  • sqlite3 database.sqlite

Find your user:
SELECT id, name, email FROM user;

OUTPUT:
1|Admin|some@email.com
2|User|some@email.com

Updating Password with "new_password" for user Admin[1], if you need to update for User[2], then use ID number 2 (WHERE user_id = 2;):
UPDATE auth
SET secret = '$2b$12$ExC8EX3htFBpXtbO4DXp.eAZ1CtJbGlDhRhpVV1hHcWjV7cprebZi'
WHERE user_id = 1;

To check if Hash was changed, use this command (Change ID number at end for your user):
SELECT id, user_id, secret FROM auth WHERE user_id = 1;

<!-- gh-comment-id:2416195874 --> @nenchi commented on GitHub (Oct 16, 2024): For those who have official repo with SQLite: - docker exec -ti nginx_proxy_manager sh - cd /data - sqlite3 database.sqlite Find your user: SELECT id, name, email FROM user; OUTPUT: 1|Admin|some@email.com 2|User|some@email.com Updating Password with "new_password" for user Admin[1], if you need to update for User[2], then use ID number 2 (WHERE user_id = 2;): UPDATE auth SET secret = '$2b$12$ExC8EX3htFBpXtbO4DXp.eAZ1CtJbGlDhRhpVV1hHcWjV7cprebZi' WHERE user_id = 1; To check if Hash was changed, use this command (Change ID number at end for your user): SELECT id, user_id, secret FROM auth WHERE user_id = 1;
Author
Owner

@Nightwalker83 commented on GitHub (Dec 3, 2024):

For those not wanting a new admin account, but instead to just set the password of a specific account you can do the following:

Connect to the database as before and go into the table named auth and update the secret column where the user_id is the user id you want. (You can see the users in the users table, and see the id associated with an email address.
Change the secret to

$2b$13$C9mJYK7Gf7sVgCCYw84HhOvOIpnyhkdGqwIp0PPj/s9.q0bxkoMZe

This will result in the password being changeme.

For those who are not able to log in with your new password after logging out, maybe you are experiencing issue #1120. Change your password to a password which does not contain a #-symbol until this is fixed.

best answer. I just copy sqlite db to my windows machine, and use SQLite editor to do it and then copy it back (and change owner/group back to root)

Thanks! You are a life saver. Thought I was going to have to struggle with the browser and getting it to except certificates.

<!-- gh-comment-id:2513810155 --> @Nightwalker83 commented on GitHub (Dec 3, 2024): > > For those not wanting a new admin account, but instead to just set the password of a specific account you can do the following: > > > Connect to the database as before and go into the table named `auth` and update the `secret` column where the `user_id` is the user id you want. (You can see the users in the `users` table, and see the id associated with an email address. > > > Change the secret to > > > ``` > > > $2b$13$C9mJYK7Gf7sVgCCYw84HhOvOIpnyhkdGqwIp0PPj/s9.q0bxkoMZe > > > ``` > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This will result in the password being `changeme`. > > > > > > For those who are not able to log in with your new password after logging out, maybe you are experiencing issue #1120. Change your password to a password which does not contain a `#`-symbol until this is fixed. > > best answer. I just copy sqlite db to my windows machine, and use SQLite editor to do it and then copy it back (and change owner/group back to root) Thanks! You are a life saver. Thought I was going to have to struggle with the browser and getting it to except certificates.
Author
Owner

@bayview252 commented on GitHub (Jan 27, 2025):

@nenchi - great answer - this worked for me with the following twist.

For those who have official repo with SQLite:

  • docker exec -ti nginx_proxy_manager sh
  • cd /data
  • sqlite3 database.sqlite

Find your user: SELECT id, name, email FROM user;

OUTPUT: 1|Admin|some@email.com 2|User|some@email.com

Updating Password with "new_password" for user Admin[1], if you need to update for User[2], then use ID number 2 (WHERE user_id = 2;): UPDATE auth SET secret = '$2b$12$ExC8EX3htFBpXtbO4DXp.eAZ1CtJbGlDhRhpVV1hHcWjV7cprebZi' WHERE user_id = 1;

To check if Hash was changed, use this command (Change ID number at end for your user): SELECT id, user_id, secret FROM auth WHERE user_id = 1;

If you get "sh: 7: sqlite3: not found" when you type "sqlite3 database.sqlite", then:

apt update && apt install sqlite3 -y

<!-- gh-comment-id:2616922210 --> @bayview252 commented on GitHub (Jan 27, 2025): @nenchi - great answer - this worked for me with the following twist. > For those who have official repo with SQLite: > > * docker exec -ti nginx_proxy_manager sh > * cd /data > * sqlite3 database.sqlite > > Find your user: SELECT id, name, email FROM user; > > OUTPUT: 1|Admin|[some@email.com](mailto:some@email.com) 2|User|[some@email.com](mailto:some@email.com) > > Updating Password with "new_password" for user Admin[1], if you need to update for User[2], then use ID number 2 (WHERE user_id = 2;): UPDATE auth SET secret = '$2b$12$ExC8EX3htFBpXtbO4DXp.eAZ1CtJbGlDhRhpVV1hHcWjV7cprebZi' WHERE user_id = 1; > > To check if Hash was changed, use this command (Change ID number at end for your user): SELECT id, user_id, secret FROM auth WHERE user_id = 1; If you get "sh: 7: sqlite3: not found" when you type "sqlite3 database.sqlite", then: `apt update && apt install sqlite3 -y`
Author
Owner

@Masterbob79 commented on GitHub (Apr 6, 2025):

You are a lifesaver. Chatgpt had me doing all sorts of stuff

<!-- gh-comment-id:2781158279 --> @Masterbob79 commented on GitHub (Apr 6, 2025): You are a lifesaver. Chatgpt had me doing all sorts of stuff
Author
Owner

@carpincho commented on GitHub (May 26, 2025):

Well, it turns out that it worked.
Thanks

<!-- gh-comment-id:2909821253 --> @carpincho commented on GitHub (May 26, 2025): Well, it turns out that it worked. Thanks
Author
Owner

@keypaa commented on GitHub (Jul 14, 2025):

Here's an obscure way to do this:

  1. Connect to the database
  2. Run: UPDATE user SET is_deleted=1;
  3. Restart nginx proxy manager, this will create a new Admin user with the following credentials:
  1. Run: UPDATE user SET is_deleted=0;
  2. Log in as the new user and reset your other user's password
  3. Log in as your main user, delete the new example user

If you are inexperienced with docker and MySQL, this comment provides more detailed instructions on how to perform these steps.

5 years later and you still rock man ! Thank you a lot !

<!-- gh-comment-id:3070945136 --> @keypaa commented on GitHub (Jul 14, 2025): > Here's an obscure way to do this: > > 1. Connect to the database > 2. Run: `UPDATE user SET is_deleted=1;` > 3. Restart nginx proxy manager, this will create a new Admin user with the following credentials: > > * [admin@example.com](mailto:admin@example.com) > * Password: `changeme` > > 4. Run: `UPDATE user SET is_deleted=0;` > 5. Log in as the new user and reset your other user's password > 6. Log in as your main user, delete the new example user > > If you are inexperienced with docker and MySQL, [this comment](https://github.com/jc21/nginx-proxy-manager/issues/230#issuecomment-815078355) provides more detailed instructions on how to perform these steps. 5 years later and you still rock man ! Thank you a lot !
Author
Owner

@crashedthecymbal commented on GitHub (Aug 12, 2025):

After resetting (deleting ) the user, the certs are now owend by a deleted user. is there a way to re-claim the certs?

Screenshot:

Image
<!-- gh-comment-id:3180186510 --> @crashedthecymbal commented on GitHub (Aug 12, 2025): After resetting (deleting ) the user, the certs are now owend by a deleted user. is there a way to re-claim the certs? Screenshot: <img width="826" height="341" alt="Image" src="https://github.com/user-attachments/assets/89fa1308-423e-4713-ab65-d05adaaebe83" />
Author
Owner

@JSouthGB commented on GitHub (Aug 12, 2025):

After resetting (deleting ) the user, the certs are now owend by a deleted user. is there a way to re-claim the certs?

I'm not using NPM these days, but there is probably an SQL table for which you can edit the owner id to match your new user. Or you can modify the new user's id to be whatever the previous user's id was.

<!-- gh-comment-id:3180627563 --> @JSouthGB commented on GitHub (Aug 12, 2025): > After resetting (deleting ) the user, the certs are now owend by a deleted user. is there a way to re-claim the certs? I'm not using NPM these days, but there is probably an SQL table for which you can edit the owner id to match your new user. Or you can modify the new user's id to be whatever the previous user's id was.
Author
Owner

@include commented on GitHub (Oct 2, 2025):

Hello.

Had the same problem and ended up my migrating ALL things from past admins to the new active admin.

(adapt to your needs)

● #!/bin/bash
  # NPM Ownership Transfer Script
  # Transfers all Nginx Proxy Manager resources from deleted users to active admin

  DB_PATH="${1:-database.sqlite}"

  if [ ! -f "$DB_PATH" ]; then
      echo "Error: Database file not found: $DB_PATH"
      exit 1
  fi

  # Get the active (non-deleted) admin user ID
  ACTIVE_ADMIN=$(sqlite3 "$DB_PATH" "SELECT id FROM user WHERE is_deleted=0 ORDER BY id LIMIT 1;")

  if [ -z "$ACTIVE_ADMIN" ]; then
      echo "Error: No active admin user found"
      exit 1
  fi

  echo "Active admin user ID: $ACTIVE_ADMIN"
  echo "Transferring ownership of all resources..."

  # Transfer ownership of all resource types
  sqlite3 "$DB_PATH" <<EOF
  UPDATE proxy_host SET owner_user_id=$ACTIVE_ADMIN WHERE owner_user_id IN (SELECT id FROM user WHERE is_deleted=1) AND is_deleted=0;
  UPDATE certificate SET owner_user_id=$ACTIVE_ADMIN WHERE owner_user_id IN (SELECT id FROM user WHERE is_deleted=1) AND is_deleted=0;
  UPDATE redirection_host SET owner_user_id=$ACTIVE_ADMIN WHERE owner_user_id IN (SELECT id FROM user WHERE is_deleted=1) AND is_deleted=0;
  UPDATE dead_host SET owner_user_id=$ACTIVE_ADMIN WHERE owner_user_id IN (SELECT id FROM user WHERE is_deleted=1) AND is_deleted=0;
  UPDATE stream SET owner_user_id=$ACTIVE_ADMIN WHERE owner_user_id IN (SELECT id FROM user WHERE is_deleted=1) AND is_deleted=0;
  UPDATE access_list SET owner_user_id=$ACTIVE_ADMIN WHERE owner_user_id IN (SELECT id FROM user WHERE is_deleted=1) AND is_deleted=0;
  EOF

  echo ""
  echo "Ownership transfer complete. Summary:"
  echo "----------------------------------------"
  sqlite3 "$DB_PATH" <<EOF
  .mode column
  SELECT 'Proxy Hosts' as Resource, COUNT(*) as Count FROM proxy_host WHERE owner_user_id=$ACTIVE_ADMIN AND is_deleted=0
  UNION ALL
  SELECT 'Certificates', COUNT(*) FROM certificate WHERE owner_user_id=$ACTIVE_ADMIN AND is_deleted=0
  UNION ALL
  SELECT 'Redirections', COUNT(*) FROM redirection_host WHERE owner_user_id=$ACTIVE_ADMIN AND is_deleted=0
  UNION ALL
  SELECT 'Dead Hosts', COUNT(*) FROM dead_host WHERE owner_user_id=$ACTIVE_ADMIN AND is_deleted=0
  UNION ALL
  SELECT 'Streams', COUNT(*) FROM stream WHERE owner_user_id=$ACTIVE_ADMIN AND is_deleted=0
  UNION ALL
  SELECT 'Access Lists', COUNT(*) FROM access_list WHERE owner_user_id=$ACTIVE_ADMIN AND is_deleted=0;
  EOF

  echo ""
  echo "All resources now owned by user ID: $ACTIVE_ADMIN"

  Usage: ./transfer_npm_ownership.sh [path/to/database.sqlite]

Cheers,
F

<!-- gh-comment-id:3361608806 --> @include commented on GitHub (Oct 2, 2025): Hello. Had the same problem and ended up my migrating ALL things from past admins to the new active admin. (adapt to your needs) ``` ● #!/bin/bash # NPM Ownership Transfer Script # Transfers all Nginx Proxy Manager resources from deleted users to active admin DB_PATH="${1:-database.sqlite}" if [ ! -f "$DB_PATH" ]; then echo "Error: Database file not found: $DB_PATH" exit 1 fi # Get the active (non-deleted) admin user ID ACTIVE_ADMIN=$(sqlite3 "$DB_PATH" "SELECT id FROM user WHERE is_deleted=0 ORDER BY id LIMIT 1;") if [ -z "$ACTIVE_ADMIN" ]; then echo "Error: No active admin user found" exit 1 fi echo "Active admin user ID: $ACTIVE_ADMIN" echo "Transferring ownership of all resources..." # Transfer ownership of all resource types sqlite3 "$DB_PATH" <<EOF UPDATE proxy_host SET owner_user_id=$ACTIVE_ADMIN WHERE owner_user_id IN (SELECT id FROM user WHERE is_deleted=1) AND is_deleted=0; UPDATE certificate SET owner_user_id=$ACTIVE_ADMIN WHERE owner_user_id IN (SELECT id FROM user WHERE is_deleted=1) AND is_deleted=0; UPDATE redirection_host SET owner_user_id=$ACTIVE_ADMIN WHERE owner_user_id IN (SELECT id FROM user WHERE is_deleted=1) AND is_deleted=0; UPDATE dead_host SET owner_user_id=$ACTIVE_ADMIN WHERE owner_user_id IN (SELECT id FROM user WHERE is_deleted=1) AND is_deleted=0; UPDATE stream SET owner_user_id=$ACTIVE_ADMIN WHERE owner_user_id IN (SELECT id FROM user WHERE is_deleted=1) AND is_deleted=0; UPDATE access_list SET owner_user_id=$ACTIVE_ADMIN WHERE owner_user_id IN (SELECT id FROM user WHERE is_deleted=1) AND is_deleted=0; EOF echo "" echo "Ownership transfer complete. Summary:" echo "----------------------------------------" sqlite3 "$DB_PATH" <<EOF .mode column SELECT 'Proxy Hosts' as Resource, COUNT(*) as Count FROM proxy_host WHERE owner_user_id=$ACTIVE_ADMIN AND is_deleted=0 UNION ALL SELECT 'Certificates', COUNT(*) FROM certificate WHERE owner_user_id=$ACTIVE_ADMIN AND is_deleted=0 UNION ALL SELECT 'Redirections', COUNT(*) FROM redirection_host WHERE owner_user_id=$ACTIVE_ADMIN AND is_deleted=0 UNION ALL SELECT 'Dead Hosts', COUNT(*) FROM dead_host WHERE owner_user_id=$ACTIVE_ADMIN AND is_deleted=0 UNION ALL SELECT 'Streams', COUNT(*) FROM stream WHERE owner_user_id=$ACTIVE_ADMIN AND is_deleted=0 UNION ALL SELECT 'Access Lists', COUNT(*) FROM access_list WHERE owner_user_id=$ACTIVE_ADMIN AND is_deleted=0; EOF echo "" echo "All resources now owned by user ID: $ACTIVE_ADMIN" Usage: ./transfer_npm_ownership.sh [path/to/database.sqlite] ``` Cheers, F
Author
Owner

@keypaa commented on GitHub (Oct 2, 2025):

Yup thank you for your file. That's what I did by remaking everything for the new admin :p

<!-- gh-comment-id:3361640979 --> @keypaa commented on GitHub (Oct 2, 2025): Yup thank you for your file. That's what I did by remaking everything for the new admin :p
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#203
No description provided.