I took over an n8n installation that was set up manually using Node.js (not containerized). Here’s what I’m dealing with:
No .n8n directory exists, no configuration files saved, and the DATA_ENCRYPTION_KEY is nowhere to be found on the server
The previous admin probably launched it directly using node command, so n8n likely created the encryption key in memory during startup
All the stored credentials (for services like Mailgun, Supabase, Notion, etc.) are encrypted in the database but I cannot decrypt them now
I need to migrate this setup to Docker containers for proper production deployment.
Here’s my approach:
Export all workflows as JSON backups
Create fresh API keys for each external service
Pass these new credentials through Docker Compose using .env file
Manually reconnect everything in the n8n interface
Decommission the old setup once verified
My question:
Is regenerating credentials this way sufficient to restore workflow functionality?
Are there any hidden issues with n8n’s encryption system that might cause problems?
Thanks for any advice or experiences you can share.
Having faced a similar n8n setup issue, I can say your migration strategy looks very sensible. When recreating credentials, just be aware that workflows may reference specific credential IDs that change during this process, which can lead to some issues. While most workflows adapt well, custom nodes or webhooks might require reintegration. It’s wise that you’re exporting workflows as JSON, since n8n’s security measures prevent credential data from being included. Transitioning to Docker will simplify management and scaling down the line. After completing the migration, thorough testing of all workflows is crucial, particularly for those with complex authentication sequences.
Your approach is spot on - I went through the exact same thing last year. The biggest pain point you’ll hit is that n8n stores credential references by internal IDs. Even after importing your workflow JSONs, you’ll have to manually reconnect every credential in each workflow node. It’s tedious if you’ve got lots of workflows with multiple integrations. What saved me time was writing down which credentials each workflow used before migrating, since the exported JSONs don’t show this mapping clearly. The Docker setup is totally worth it though, especially for backups and recovery. Just make sure you properly secure your new DATA_ENCRYPTION_KEY in the Docker environment and actually back it up this time.
your plan’s solid, but brace urself for downtime during the switch. the credential reconnection will be a pain - every node shows red errors until u manually relink them. pro tip: screenshot ur current workflow credential mappings before export. trust me, it’ll save u major headaches later. docker’s def the right call for production.