Reset Admin Password on Locally Hosted n8n

Hi,

I have installed n8n in Digital Ocean when I created that I created an admin user with a password. Then I did create few flows in there as well. Now I have forgotten my admin password to login to the n8n. Can anyone tell me how I can reset my password without losing my data?

When I click forget password link on the login page, I can see it asks to let Admin know about it and change the password from there.

Please help me with this

  • n8n version: 1.42.1
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker DigitalOcean
  • Operating system: Windows 11

Hi @AmilaDeshan

You can use n8n user-management:reset to reset your admin login. This will not affect your workflows but will however wipe all your other user accounts.

:mailbox_with_mail: A cleaner way though, would be to set up user management via SMTP in another container (e.g. Mailpit) and do the reset this way.

1 Like

Hi @ria

Thank you for your response. But can you tell me where do I need to enter the n8n user-management:reset this code. I am unable to login to my n8n account since I forget my password. Do I need to add that code to the digital ocean console panel?

Hey @AmilaDeshan

You would need to run it in the container itself, if you are using digital ocean you will need to access your droplet using ssh first, from there you can connect to the container like normal and run the command.