Forgot my password

System Information
  • Strapi Version: “strapi”: “3.6.1”,
  • Operating System: MacOs Catalina 10.15.7
  • Database: SQL Light / from localhost
  • Node Version: v14.16.1
  • NPM Version: 6.14.12
  • Yarn Version: –

Hello !

I was working with localhost and I forgot about my password, I tried with recover by email and I didn’t get one email back with the recovery code. Perhaps because I was working with localhost.

What do I do?

1 Like

Try resetting your password using Strapi CLI.


  1. Open terminal (iTerm, cmd, etc.) in your Strapi app directory.
  2. Run : yarn strapi admin:reset-user-password --email="YOUR_EMAIL" --password="YOUR_NEW_PASSWORD" (if you use Yarn). You may have to create alphanumeric password (according to Strapi), so weak password like 12345 might fail to reset your password.

If you use NPM, you probably should run npm run strapi admin:reset-user-password --email="YOUR_EMAIL" --password="YOUR_NEW_PASSWORD".


Although I use yarn to run and build my projects, I found this command only worked for me using npm. But it worked!

I am using npm. but I got the problem like

Finaly got the solution by

strapi console


function changePassword(useremail, password) {{ email: useremail }).then(u => {
if (u) { => {
strapi.query(‘user’, ‘admin’).update({id: }, { password: hashedPassword })
.then(() => console.log(‘Updated successfully.’))
.catch((ex) => console.error(‘Failed to update password.’, ex))
}).catch(ex => console.error(‘Failed to hash password and update it.’, ex));
} else {
console.error(‘Wrong email?? Please check your email’);
changePassword(‘’, ‘newpassword’);

Hello, don’t work for me bc i forgot username so it tell me cannot findOne of undefined…

Thank you!
Strapi community is the best around.

I got an error /admin/telemetry-properties (2 ms) 401 when I tried logging in after changing the password using the command line.


Thank, save my life <3


thx so much

Can’t log in to Strapi app on Render production. Correct credentials work on dev. Error: “Invalid credentials.” No terminal access on Render. Can any help how to solve this?

Thank you!

Thanks for this! I have been struggling to find a solution to this as I was experiencing the same issue. I forgot the admin password but can’t reset it either

1 Like

Thanks for sharing this solution. I also struggled with it. Appreciate it. I solved it.

1 Like

Thank you!
Works for me.