N8n update issues - can't access dashboard

I helped a friend install n8n on a vps. All works really well.

When I apply the exact same update steps to his instance as I do mine, I have an issue.

The issue is when he tries to access his newly updated n8n he is shown the interface to create a new account and there is no option to log in to his dashboard. It seems update is actually creating a brand new blank n8n

Following the update steps here

# Pull latest version
docker compose pull

# Stop and remove older version
docker compose down

# Start the container
docker compose up -d

Hi @Robm :wave:

Did you by chance upgrade from a pre-v1 version to a more recent version? User management is now mandatory for v1 accounts, as mentioned in the upgrade guide here: n8n v1.0 migration guide | n8n Docs

So you could be seeing this for the first time if you didn’t previously set up user management.

The other possibility is that the data directories are wrong - could you share the Docker compose file (and redact any sensitive data)?

Thanks for replying and trying to help appreciated.

Not sure if it’s a pre-v1 or not. Set it up about 2 months ago using the latest version availbale at that time. Going to assume it’s a post v1 version given that it is quite new.

version: "3"

services:
  traefik:
    image: "traefik"
    restart: always
    command:
      - "--api=true"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.web.http.redirections.entryPoint.to=websecure"
      - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
      - "--entrypoints.websecure.address=:443"
      - "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true"
      - "--certificatesresolvers.mytlschallenge.acme.email=${SSL_EMAIL}"
      - "--certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ${DATA_FOLDER}/letsencrypt:/letsencrypt
      - /var/run/docker.sock:/var/run/docker.sock:ro

  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: always
    ports:
      - "127.0.0.1:5678:5678"
    labels:
      - traefik.enable=true
      - traefik.http.routers.n8n.rule=Host(`${SUBDOMAIN}.${DOMAIN_NAME}`)
      - traefik.http.routers.n8n.tls=true
      - traefik.http.routers.n8n.entrypoints=web,websecure
      - traefik.http.routers.n8n.tls.certresolver=mytlschallenge
      - traefik.http.middlewares.n8n.headers.SSLRedirect=true
      - traefik.http.middlewares.n8n.headers.STSSeconds=315360000
      - traefik.http.middlewares.n8n.headers.browserXSSFilter=true
      - traefik.http.middlewares.n8n.headers.contentTypeNosniff=true
      - traefik.http.middlewares.n8n.headers.forceSTSHeader=true
      - traefik.http.middlewares.n8n.headers.SSLHost=${DOMAIN_NAME}
      - traefik.http.middlewares.n8n.headers.STSIncludeSubdomains=true
      - traefik.http.middlewares.n8n.headers.STSPreload=true
      - traefik.http.routers.n8n.middlewares=n8n@docker
    environment:
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
    volumes:
      - ${DATA_FOLDER}/.n8n:/root/node/.n8n
      - /local-files:/files

Hope that is the right file?

So it could be that you need to change

${DATA_FOLDER}/.n8n:/root/node/.n8n
to
${DATA_FOLDER}/.n8n:/home/node/.n8n

Starting with v1 of n8n we use the node user rather than root, so won’t be looking in the /root/.n8n path for the database. Assuming your ~/.n8n folder is still intact locally and you are performing the docker run command as the user you originally did, hopefully this will sort everything out for you :+1:

Perhaps some progress has been made. Made the changes and re-ran the updates but now getting a 404 error, on repeated refreshes I get bad gateway when trying to access n8n.

Hey @Robm,

Has n8n started up ok? Could be worth checking the logs for any errors.

No joy, and can’t find the logs for this n8n. I expected to find them here

/n8n/logs/n8n.log

But no files. No log directory.

Hey @Robm,

The logs would only exist in file form if you have the env option set, You might be able to get away with something like docker logs n8n