Reset Nginx Proxy Manager Password

I run Nginx Proxy Manager, or NPM for short, at home for the media stack. I haven’t logged in for a while, and clearly had forgotten my password for my NPM admin account. So how does one reset it?

I found a tutorial or two to follow, but neither of those seemed to work for me, and added a step or two that I thought unnecessary, and have since discovered were unnecessary.

So NPM uses SQLite3 by default, but can be setup with PostgreSQL and MariaDB/MySQL. My setup uses SQLite, and within that they use the BCrypt hashing algorithm of passwords for security.

I found a BCrypt generator online, and opted for the default setting of 12 rounds of hashing of my password. Initially I tried one as I wasn’t sure how that would go, but I found that 12 worked for me.

Once I had the BCrypt hash of my password, I used SQLite Manager to open my database, and ran the following SQL command to insert the password hash into the database.

UPDATE auth SET secret="<BCrypt-Hash>";

Once I had run that code, I restarted the NPM Docker container to ensure it was loading the database, and tried logging in. It worked like a charm.

So updating a forgotten password for NPM running on SQLite is as simple as updating the password hash through the backend. Assuming you have access to it obviously.

There you go, hope that works for you!