Trouble to sign-in on self-hosted docker (web)

Describe the issue/error/question

Hello everyone. First and foremost, thanks for the n8n.

I’ve been using the self-hosted version for quite some time. Now my session expired, and I have to sign in to the system again. I’ve defined N8N_BASIC_AUTH_USER and N8N_BASIC_AUTH_PASSWORD environment variables. Also N8N_BASIC_AUTH_ACTIVE=true. And successfully signed in about a month ago. But now when I see the sign-in screen, it requires an email. But my N8N_BASIC_AUTH_USER=sadig. How to proceed? Am I missing something?

docker-compose.yml

version: '3.1'

networks:
  nginx-proxy:
    external:
      name: nginx-proxy

volumes:
  n8n-postgres-vlm:

services:

  postgres:
    image: postgres:12
    container_name: n8n-postgres
    restart: always
    env_file: .env
    volumes:
      # - ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
      - n8n-postgres-vlm:/var/lib/postgresql/data

  n8n:
    image: n8nio/n8n
    restart: always
    networks:
      - default
      - nginx-proxy
    env_file: .env
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
      - DB_POSTGRESDB_USER=${POSTGRES_USER}
      - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
    ports:
      - 5678:5678
    links:
      - postgres
    volumes:
      - ~/.n8n:/home/node/.n8n
    # Wait 5 seconds to start n8n to make sure that PostgreSQL is ready
    # when n8n tries to connect to it
    command: /bin/sh -c "sleep 5; n8n start"

What is the error message (if any)?

{
  "code": 0,
  "message": "Wrong username or password. Do you have caps lock on?",
  "hint": "",
  "stack": "Error: Wrong username or password. Do you have caps lock on?\n    at /usr/local/lib/node_modules/n8n/dist/src/UserManagement/routes/auth.js:29:27\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async /usr/local/lib/node_modules/n8n/dist/src/ResponseHelper.js:90:26"
}

Screen Shot 2022-06-14 at 13.39.02

Please share the workflow

N/A

Share the output returned by the last node

Information on your n8n setup

  • n8n version: docekr image n8nio/n8n:latest
  • Database you’re using (default: SQLite): postgress
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: docker

Hi @msadig, welcome to the community!

I am sorry to hear you’re having trouble. The email address required to log in is part of the user management feature rolled out a while ago.

Unless the N8N_USER_MANAGEMENT_DISABLED variable was set to true, you or your users would have been presented with a set up screen for user management where they would have registered the email + password that’s now required to log in.

Seeing you haven’t configured the SMTP details for user management you might want to use the n8n user-management:reset CLI command to be able to log in again (you’d need to run this in your docker container). Afterwards you should be able to create a new user account:

2 Likes

You’re the hero we all need =) worked like a charm :partying_face:

1 Like

Glad to hear, thanks so much for confirming!

Also thanks to @ivov who fixed this command just last week!

1 Like