Need Help Migrating n8n Self-Hosted Instance (Workflows Not Showing)

Hi everyone,

I’m trying to migrate my self-hosted n8n instance from an old VPS to a new one. My goal is to have all workflows, credentials, and settings exactly as they were on the old server.

What I’ve Done So Far:

  • I’m using Docker Compose on both servers.
  • On the old server, my docker-compose.yml uses a Docker-managed volume:
volumes:
  - n8n_data:/home/node/.n8n
  • I created a backup of the Docker volume using:
docker run --rm -v n8n_data:/volume -v $(pwd):/backup alpine sh -c "cd /volume && tar -czvf /backup/n8n_data.tar.gz ."
  • Then I copied n8n_data.tar.gz to the new server.
  • On the new server:
    1. I created the volume:
docker volume create n8n_data
  1. Restored the backup:
docker run --rm -v n8n_data:/volume -v /root:/backup alpine sh -c "cd /volume && tar -xzvf /backup/n8n_data.tar.gz"
  • My docker-compose.yml on the new server is the same:
services:
  n8n:
    image: n8nio/n8n:latest
    container_name: n8n_compose_instance
    restart: unless-stopped
    ports:
      - "5678:5678"
    environment:
      - WEBHOOK_URL=http://<new-server-ip>:5678/
      - N8N_HOST=<new-server-ip>
    volumes:
      - n8n_data:/home/node/.n8n

volumes:
  n8n_data:
  • I ran:
docker-compose down
docker-compose up -d

:cross_mark: The Problem:

Even though n8n runs fine on the new server, it’s starting from a fresh instance — all workflows and credentials are missing.

:white_check_mark: What I Need Help With:

  • Am I missing something in copying the Docker volume?
  • Is there a better way to ensure I bring over all n8n data (especially workflows & credentials)?
  • Would switching to a bind mount (/root/n8n_data:/home/node/.n8n) be more transparent?

Would really appreciate your help in figuring this out.

Thanks in advance!

The easiest way to move your workflows and credentials is to export and import them using CLI:

Export instructions
Import instructions

Is your N8N_ENCRYPTION_KEY the same?

Yes, my N8N_ENCRYPTION_KEY same.

Yes, I have setup the same encryption key in new server

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