How can I let a Dockerized n8n workflow access files from my computer?

0
0
Asked By MellowCedar42 On

I'm running n8n locally inside Docker and using a Read from Disk node to load files such as an .xlsx spreadsheet and a PDF. The node keeps returning "No file found," even when I enter the exact path. I've also tried paths like /home/nodes/files/file.pdf and then ran into access errors. What Docker configuration do I need so n8n can see files stored on my computer, and what path should I use in the node?

3 Answers

Answered By OrbitingPanda7 On

The file is probably on your host computer, while n8n is looking inside the container. Docker containers have their own filesystem, so you need to bind-mount a folder from your computer into the n8n container. After that, place the spreadsheet or PDF in the mapped folder and use the container-side path in n8n, not the original path on your computer.

Answered By QuietMaple31 On

If you start n8n with docker run instead, the equivalent is a volume option like -v C:/Users/YourName/n8n-files:/files on Windows, or -v /home/yourname/n8n-files:/files on Linux. Make sure the file is actually inside the host folder being mapped, then reference it as /files/filename.pdf from n8n. This is normal Docker isolation rather than an n8n bug.

Answered By SilverKite88 On

For a Docker Compose setup, add a volume under the n8n service, for example:

volumes:
- ./local-files:/files

Create a local-files folder beside your Compose file, put your input file there, then restart n8n. In the Read from Disk node, use a path such as /files/yourfile.xlsx. The /files path is the path inside the container.

MellowCedar42 -

Thanks, I’ll try creating the mapped folder and restarting the container.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.