Where to upload files for import? RE: Docker

Hi I’ve tried this:

But I’m still unsure of where to put my workflows.json file so I can run;

docker exec -it -u node n8nDocker n8n import:workflow --input=workflows.json

I’ve tried putting the file in /home/myusername and linking directly in the command, but as n8n is in Docker I’m assuming that will never work. So I tried in
/var/lib/docker/volumes/n8nDocker-data/_data/workflows.json and still nothing.

I always get;

ENOENT: no such file or directory, open 'workflows.json'

Thank you

1 Like

Make sure you’re copying the file into the container. The working directory when you execute a command in the container is /data. So --input=workflows.json is looking for /data/workflows.json.

docker cp /path/to/workflows.json n8n:/data/
4 Likes

@adamhl8 thank you, very much appreciated, was tearing my hair out! :sweat_smile:

2 Likes

That inst work for me, when i enter in the docker container doesnt have any folder or file but the command docker cp logs succesful. I dont know what i do im stuck on this.