Import & Export Credentials

Hi,

I’ve been using N8N for over a month and its been amazing to automate my work. Just wanted to ask can we have a export & import credentials feature similar to the workflow one so whenever an update is release and the data is wiped we would be able too easily import the credentials and get the workflows running.

Thanks!

Upvote for this. We will be migrating from sqllite to mysql and I understand I have no way to migrate my credentials.

2 Likes

I found a workaround you can use the encryptionKey value from ‘.n8n/config’ file on your old instance and decrypt the credential values, as result you’ll get a json.
After you can encrypt this json with new encryptionKey of new DB and save new value.

Or even simple you can just copy both encryptionKey and credential values to new DB.

Here is online tool that you can use for encryption/decryption

4 Likes

Sorry actually typed a response a few days ago but just realized that I did never send it.

You can find an example that could be helpful here:

1 Like

guys there is a better method

sudo docker exec -u node -it ubuntu-n8n-1 n8n export:credentials --all --decrypted --output=old_credentials.json

sudo docker cp ubuntu-n8n-1:/home/node/old_credentials.json ./old_credentials.json

sudo docker cp ./old_credentials.json azureuser-n8n-1:/home/node/old_credentials.json
sudo docker exec -u node -it azureuser-n8n-1 n8n import:credentials --input=/home/node/old_credentials.json

takes 5 sec