How can I reset my self-hosted n8n credentials?

Hello everyone, sorry if this a basic question.

I have my n8n running on Docker, but it stopped all of a sudden. I restarted the computer, and it forgot my credentials, and everytime I write /setup it redirects to /signin. I’ve already uninstalled, and reinstalled, tried guidance from chatGPT, but no solution. How can I get access to the /setup again, at least to create a new account?

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hi @Joao_Mesquita!

Welcome to the community :raised_hands:

You can use a CLI option to reset the user management feature or you can set up the SMTP environment options then reset the password that way.

joao@MacBook-Air-de-Joao ~ % docker run -it --rm -v ~/.n8n:/home/node/.n8n n8nio/n8n n8n user-management:reset

User settings loaded from: /home/node/.n8n/config
› Error: command n8n not found

I’m getting this repsonse from the terminal. How should I procede? Sorry for wasting your time with this

If you are running in docker, you want to use ‘docker exec’ to run any n8n commands.
e.g.

docker exec -it n8n sh -c "n8n user-management:reset"

P.S. it isn’t a waste of time! A lot of container-related stuff is confusing for people and your question and answer may help others too!

4 Likes

Thank you.

The terminal said: “Successfully reset the database to default user state.”
But on the localhost says this:
http://localhost:5678/signin?redirect=%252Fsetup

It always redirects

edit: “To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.”

Should I edit the docker compose yml file to make this change?

Hmmm. What happens if you run

docker volume ls

joao@MacBook-Air-de-Joao ~ % docker volume ls
DRIVER VOLUME NAME
local self-hosted-ai-starter-kit_n8n_storage
local self-hosted-ai-starter-kit_postgres_storage
local self-hosted-ai-starter-kit_qdrant_storage

Ah, I didn’t know you were running the ai starter kit. So when you start it up again you are using docker compose? Usually credentials problems are caused by not persisting the storage, but it should be in the n8n_storage attached in the .yml file

I don’t find it to be honest. Do you have any other GitHub link where I can download the self-host kit and start again?

sure:

Hope you have better luck!

n8n version: Version: 1.83.2
Database (default: SQLite):
n8n EXECUTIONS_PROCESS setting (default: own, main): Inactive
Running n8n via (Doctor, npm, n8n cloud, desktop app): Docker
Operating system: Ubuntu 22.04.5 LTS

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