Local File Trigger not working in Docker + Ubuntu Mount

Describe the problem/error/question

I have the following situation:

  1. Ubuntu Host with a live Mount folder containing the directory I am interested in
  2. Docker running N8N with volume pointing to the Host Directory
  3. N8N Local File Trigger (LFT) watching the directory for any File Additions/Modification.

Still, any change I make on the mounted local directory, the Local File Trigger does not trigger.

I have checked almost all of the other posts and made the changes but with no success.
I also tried setting the LFT Node on Polling mode but still wont trigger.

  1. I can list the contents of the target Directory using a Execute Command node (CLI ls command).
  2. I can read/write a File in the target Directory using R/W Files from Disk Node

But if I copy/move or create a file or change a existing file in the target Directory on the Host, the LFT node wont trigger!

Any help will be appreciated…

What is the error message (if any)?

No error messages.

Please share your workflow

image

Share the output returned by the last node

None

Information on your n8n setup

  • n8n version:1.58.0
  • Database (default: SQLite):default
  • n8n EXECUTIONS_PROCESS setting (default: own, main):default
  • Running n8n via (Docker, npm, n8n cloud, desktop app):Docker
  • Operating system:Ubuntu 22

Probably there is an issue with permissions for the directory. Try to set the 777 permissions for the mount point

Hello!

The perms are already 777 on the mount-point and the target Dir.

Thanks and regards,

SG

I think this has something to do with File Notifiers and them generally not functioning properly in Docker containers because of filesystem differences. Either that or it is a permission issue, If you make a file in the mount from inside the n8n container does it trigger the workflow or do you have the same issue?

It may also be worth looking at Use Compose Watch | Docker Docs which could possible help.

Hello Jon,

I tested this right now by having WF 01 watch a specific folder on the mount and WF 02 Write a file to that Folder on the mount. It indeed works i.e. WF 01 can detect the File system changes.

May be the field of investigation is now narrrowed!

Thanks and regards,

SG

Hey @sg_tech,

That would make sense as n8n would be watching the local folder so the file system notifiers wouldn’t be “lost” when going through the Docker filesystem compatability layer.

Your testing would suggest the issue is something within Docker.