Moving a Dockerized n8n instance from Windows 11 WSL2 to an always-on Ubuntu Droplet breaks every saved OAuth token, API key, and webhook secret if you only export workflow JSON files—or let the new container boot once before restoring your volume's 32-character encryptionKey.
Lab Cutover Findings (WSL2 Kernel 6.6.87.2 + n8nio/n8n:1.76.1)
-
First-Boot Ciphertext Trap: If the destination container starts with an empty
/home/node/.n8n/config, n8n generates a random key that permanently mismatches imported SQLite orPostgreSQL 16.6credentials (Credentials could not be decrypted). -
Clean Volume Snapshot: Running
docker compose stopbefore archiving the named volume via read-onlyalpine:3.20(tar -czf) prevents active SQLite WAL corruption duringscptransfer. -
Loopback + TLS Cutover: Binding
"127.0.0.1:5678:5678"behindcaddy:2.8.4-alpineblocks UFW port leaks while preserving production/webhook/URLs.
Full Backup Commands, Production Compose File & Converter
-
Canonical Lab Guide (step-by-step volume archive +
docker-compose.yml+ verification checklist): Move Docker n8n to a New Server Without Losing Credentials - Free Interactive Tool: Docker Run to Compose v2 YAML Converter
Top comments (0)