N8n docker . how to access local file?

As far as I know, do we block access to files in the .n8n folder. Nobody should read from it or write to it inside of n8n generally anyway.

The proper way to access local files is to mount the folder in Docker.

So you would add another -v <LOCAL_FOLDER>:<FOLDER_IN_N8N>

For example, if you do:

-v /home/james/my-files:/james-files

Then the folder /home/james/my-files on your host, would be accessible inside of n8n via /james-files

I hope that helps.

3 Likes