DEV Community

Cover image for Reset password in uptime kuma
Minhaz
Minhaz

Posted on • Originally published at Medium

Reset password in uptime kuma

The purpose of this is to reset the password of an uptime kuma installation. The motivation behind this is that I forget my password for the uptime kuma very frequently. So I need to reset them every 4-6 months (⓿_⓿).

So I'm just documenting the flow here for anyone that needs it.

if you are running the uptime kuma in a docker, then at first go inside the container

docker exec -it uptime-kuma bash
Enter fullscreen mode Exit fullscreen mode

Install sqlite in the container

apt install sqlite
Enter fullscreen mode Exit fullscreen mode

Locate the kuma.db file and open it in sqlite, for my case it is in the /app/data

sqlite3 /app/data/kuma.db
Enter fullscreen mode Exit fullscreen mode

You can list all the users using this query and note the id

SELECT * FROM user;
Enter fullscreen mode Exit fullscreen mode

Run this command to update the password

UPDATE user SET password="$2y$10$IWoZl5q9Tvvp1wxROvi4hOul7XP.rfyrvm4xbm7ufVANke1nfvLIu" WHERE id=1;
Enter fullscreen mode Exit fullscreen mode

If you want to set a specific password then just go to this website and generate the bcrypt password. Then put it inside the sql password="<encrypted_password>".

Now you can just log in to your user account using the password password, don't forget to change the password after you log in.

Thanks for reading, let me know if you face any issue (it can be any webdev/devops related issue) and a star on the repo will be much appreciated :)

Reference

  1. https://docs.pikapods.com/apps/uptime-kuma
  2. https://github.com/minhaz1217/devops-notes/tree/master/77.%20reset%20password%20in%20uptime%20kuma

Top comments (0)