Help with self-hosted n8n using Docker Desktop

<Help Anyone.I.
Is this common, what can i do to get back into my account?

Describe the problem/error/question

I have been using docker desktop for a while for my self hosted n8n. I just tried updating by pulling the new image to try out the data table feature and i can’t login in anymore

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

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

Hello efe_odjada, welcome to n8n Community! I’ll try my best to help yaa.

I think the container got replaced, and unless your database and encryption key were persisted, n8n treated it like a fresh install, so your old credentials dont match anymore.

Maybe there are several point you need to check:

  1. By default, n8n stores users, workflows, and credentials in /home/node/.n8n. if you didnt bind that folder to your host machine, the data got wiped when you pulled the new image.

  2. If the data is gone or the password hash no longer matches, you can set env vars to create a new owner account on Startup:

N8N_USER_MANAGEMENT_DISABLED=false
[email protected]
N8N_USER_MANAGEMENT_DEFAULT_PASSWORD=supersecret

Restart the container, then log in with that email/password.

  1. If you had workflows saved:
  • Check if your ./n8n_data (or whatever you mapped) still has a database.sqlite or postgres data folder.
  • If yes, mount it back into the new container.
  • If no, the update probably overwrote the ephemeral data and you’ll need to re-import backups.

Thats all i think i can share to you, hope this will be works! :blush::raising_hands:

2 Likes

Thank @Naufal_Fayyadh.
You actually helped me understood what the problem is.

However, i still have my data from previous setup. i have a folder named n8n-data and i have an SQLite file of about 6200KB.

After stopping docker and rerunning it, the problem still persists.

Is there something am missing?

Okay got it, if you’ve got n8n-datya/database.sqlite still around, all your workflows and users are in there. The reason you still cant log in is usually one of these:

  1. Make sure your docker run or docker-compose.yml mounts that folder into the container at the right path. n8n expects it at /home/node/.n8n. The example just like this::
volumes:
  - ./n8n-data:/home/node/.n8n
  1. If you pulled a new image but forgot the bind, the container is using a blank SQLite inside the container (not your 6 mb file). Thats why it asks for a fresh login.
  2. If you switched between SQLite and Postgres, n8n will ignore databse.sqlite. Confirm your env file doesnt set DB_TYPE=postgres unless you really run Postgres.
  3. If the volume in mounted correctly and the sqlite file is used, but you still cant log in (maybe password hash issues between versions), you can reset the default owner:
-e [email protected] \
-e N8N_USER_MANAGEMENT_DEFAULT_PASSWORD=supersecret \

So.. you can double check the volumes mapping and that the container is actually reading your sqlite file. Once it mounts n8n-data:/home/node/.n8n, your old user will work!