Unable to import workflows/credentials when running n8n w/ docker

Ah, figured it out.

The problem is that when you enter a shell in the container (or run a command like I am), it’s being done as root. Most of the n8n stuff in the container is owned by the user node. There’s some weird permission stuff going on I guess. If I run the import commands as node, my workflows and credentials show up in n8n.

docker exec -it -u node n8n n8n import:workflow --input=workflows.json
docker exec -it -u node n8n n8n import:credentials --input=credentials.json
5 Likes