Recovery codes not working

I am running N8N in docker, did a fresh install a few days back. Did set up 2FA, and downloaded the recovery codes.

After this I have also ran the ai-beta image. Everything is working. Today I realised I had not set the right TZ environment variable (had set none so was using the default).

So I updated the docker stack with the new TZ. Ofc I did not think of that this would break the 2FA!

So, ok - I redeploy the stack omitting the TZ variable. 2FA still broken.

Next step - log in with the recovery codes. Great! That why I have these. But no.

None of the codes are working.

So thinking - maybe it has to do I am running the ai-beta image. So I switch over to the regular stable version.

Same thing. Recovery codes not working. 2FA broken. So I am now locked out.

I run with a Postgres DB.

Any help very much appreciated, or if I can at least get to the workflows would be nice. But setting up credentials again would be a bit time consuming. I guess they are encrypted anyways.

Help

/kanintesova

Ok. I found the n8n user-management:reset to run in the container, then restarting it worked like a charm!

Should’ve foraged the forum a bit more. :wink:

1 Like

Hi @kanintesova, welcome to the community, and I am glad you figured out how to access your instance again. Perhaps @RicardoE105 knows what could have gone wrong with the recovery codes? Did you see any specific errors in your server logs?

I have not enabled debugging in my ENV variables but that might be a good idea.

I did not think of checking the container logs. Is there any place where I might find something out of interest, albeit I did not enable the debugging?

So this depends on how exactly you have deployed n8n. Assuming you are using docker you could run docker logs <container name> to view the default logs produced by n8n (though chances they might have been pruned if you re-created the container during this process).

You might want to check out Logging | n8n Docs for more information on how to configure logging (and possible write directly to a file).

I will check the docs out.

Unfortunately I believe the docker logs have been wiped. It might be reproducible if you change the timezone settings while having 2FA enabled. :saluting_face::face_with_spiral_eyes::pensive:

Hi again, to further on this topic I wanted to let you know that I just had this message show up on the beta version just now:

It might have been what was happening the other time, but that I missed the notification.

I have not used any codes. :wink:

/kanin

Changing your timezone should not cause this. I have not been able to reproduce the issue! Just tested it and worked just fine! Wonder it had something to do with running the ai image after running the regular image? maybe a migration issue?

It might be the case. This last time I did not change the timezone. But indeed changed to the AI beta.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.