Issue migrating n8n from Docker to Docker Compose

I’m trying to migrate an existing n8n install that was done on Docker to Docker Compose, and the data file is in ~/.n8n, but I can’t for the life of me convince Docker Compose to find the existing install. It keeps wanting me to start all over as a new user. Here is my yaml file:

version: "3"

    image: n8nio/n8n
    restart: always
      - ""
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - /home/paul/.n8n:/root/.n8n

The volume line looks right to me, but I must be missing something. Permissions? Different data storage locations for Docker vs Docker Compose? I looked d at the logs and see some strange stuff at tbe beginning, including a reference to a missing encryption key and to /home/node/.n8n/config, which obv doesn’t exist:

docker-compose logs
n8n-docker-n8n-1  | No encryption key found - Auto-generated and saved to: /home/node/.n8n/config
n8n-docker-n8n-1  | Initializing n8n process
n8n-docker-n8n-1  | n8n ready on, port 5678
n8n-docker-n8n-1  | Migrations in progress, please do NOT stop the process.
n8n-docker-n8n-1  | Starting migration InitialMigration1588102412422
n8n-docker-n8n-1  | Finished migration InitialMigration1588102412422
n8n-docker-n8n-1  | Starting migration WebhookModel1592445003908
n8n-docker-n8n-1  | Finished migration WebhookModel1592445003908
n8n-docker-n8n-1  | Starting migration CreateIndexStoppedAt1594825041918
n8n-docker-n8n-1  | Finished migration CreateIndexStoppedAt1594825041918
n8n-docker-n8n-1  | Starting migration MakeStoppedAtNullable1607431743769

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 @timbenz :wave: It looks like you might be using the wrong path - it’s no longer /root/.n8n , but it should be /home/node/.n8n. Can you give that a try?

1 Like

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