I am running a self-hosted n8n with Docker and after the update that introduced user creation I decided to go with it and set up the owner account, but now I can’t log in with the credentials I used.
I am still logged in with the previously implemented authorisation method, but when I try to open the link to my n8n instance I am redirected to the log in screen where my credentials don’t work.
I tried to change the password in the user settings menu, but it says my password is incorrect.
I haven’t set up SMTP yet, so maybe that has something to do with it. Maybe there needs to be an activation process via email before the credentials work.
Maybe I have in fact saved the wrong password, but nevertheless I am scared that when I log out now, there will be no way back in.
So my question is, how can I reset the user or find/change the passwords in any other way besides that in the user settings?
Is there a way to launch the login page the way that it was before without being redirected to the new one?
This one has come up a few times recently, You can disable the usermanagent feature with an environment variable. What you can’t do though is recover a password as we store a hash which isn’t something that can be decrypted.
It could be easier to set up the SMTP options (I use mailersend as they have a very good free tier) but there are other options available.
Hey @Jon
Thank you for you suggestion.
So do I understand correctly, that when I set up the SMTP options, I will have the ability to change the user (owner) password through email?
Thank you @Shirobachi
Are there the environment variables that @Jon is talking about?
This will delete the users I created with the recent update that has introduced such an option.
My credentials I am logged in with at the moment (how should I refer to this way of logging in BTW?) will remain intact and I will still be able to log in this way, right?
You got it, So if you had SMTP options set up you could just follow the email password reset process. The approach by @Shirobachi looks like it would do the job and you could then set up the account again.
Hey @Jon
Sorry to bother you again.
Since my BASIC_AUTH session ended, I lost access to my self-hosted instance, so it was motivation enough to get to setting up the SMTP. I think I did what I was supposed to, but I am still getting the Recover password error: “Please contact your admin. n8n isn’t set up to send email right now.”
I restarted docker a couple of times using different configurations and I know I can delete BASIC_AUTH, but from what I understand it gets ignored anyway in this instance.
I am considering editing the database the way @Shirobachi instructed me, but that is something I still need to wrap my head around, as I need to learn what tools I need for that. Although here my question would be, will that delete all users meaning the users set us with user management not the basic authority, right?
So if you remove users from db, you delete from about user management no basic auth.
Instead of docker-compose restart try this docker-compose stop && docker-compose start
BTW. @Jon what do you think about make some command or env what will restart user managenent?
Hi all, just wanted to drop by and let you know this CLI command exists and works since [email protected]. It’ll also be added to the documentation soon. As you long as you are using this version (or a new one), you can run n8n user-management:reset inside your docker container. Afterwards, you can create a fresh owner account.
I managed to get it working, following @Shirobachi’s advice.
I actually ended up changing the password in the db following @GlitchWitch’s advice in this thread as I wasn’t sure if I should delete all user roles.
Unfortunatelly @MutedJam, resetting the user management didn’t work for me for some reason, although I was on the most recent version (0.181.2) and received the confirmation.
So pretty similar to what you’ve been doing @Rafix, apart from a different email provider (and the sender value not using spaces, though I don’t think that would cause a problem). Is there a chance your environment variables haven’t been applied? Did you re-create your container after setting/changing them?
Should I have used docker-compose up --force-recreate then?
No, your commands are looking good to me. docker-compose down would remove your container and docker-compose up would already have re-created and re-started it, so no need for additional commands here.
Unfortunately I have no idea why emails can’t be sent from your instance. Perhaps you can share a full docker-compose.yml file (with all confidential values redacted, of course) using which this problem can be reproduced?
That didn’t do anything, even though I managed to successfully reset the database.
I wonder if there is a chance it was executed with the wrong user account and has instead reset the default SQLite database for that user rather than your actual Postgres database.
When using the n8n standard docker image, n8n runs as user node. So after logging into your docker container as described by @Shirobachi, try running su-exec node n8n user-management:reset (this should execute the command as user node). Make sure to restart your n8n container afterwards.
This command is what worked for me after hours of resetting and looking through every thread. I am still not at all sure how I even got to the point needing to reset it. I have had the same password for 5 months and up until this week could not login.