Reset master admin password

Dear team,

I am running locally ./kc.sh start-dev and I forgot my password. Is there a way to reset master password? keycloak 20.0.2

Thank you for your help.

If you have access to the database you could delete the master user out of the ENTITY and CREDENTIAL tables to trigger a reprompt.

I’ve not tried this so you should definitely backup that data first in case it causes an issue…

If you have the access to database you can execute this commands
Export keycloak_admin={new username}
Export keycloak_admin_password={new password}