Syncthing container warning: failed to setup inotify handler

Hi team. Firstly thanks so much for so many awesome images! I use a few of them.

I’m getting a warning in my Syncthing container:

### Filesystem Watcher Errors
For the following folders an error occurred while starting to watch for changes. It will be retried every minute, so the errors might go away soon. If they persist, try to fix the underlying issue and ask for help if you can’t. Support

Folder1 failed to setup inotify handler. Please increase inotify limits, see

I have tried the suggested fixes - as well as manually adding the following lines to /etc/sysctl.conf (by bashing into the container as root):

fs.inotify.max_user_watches = 999999
fs.inotify.max_queued_events = 999999
fs.inotify.max_user_instances = 999999

However, after a reboot, the warning persists. Additionally, if I run:
sudo sysctl fs.inotify.max_user_watches fs.inotify.max_queued_events fs.inotify.max_user_instances
it returns:
fs.inotify.max_user_watches = 8192
fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 128

So the new limits are clearly not applying.

I am running the container on a rock64 (ARM). My variables are:
-v /root/docker/syncthing/config:/config (a folder on the sd card in the rock64)
-v /mnt/nas-syncthing:/data1 (an NFS share on a NAS mounted on the rock64)

Any help would be appreciated. Thanks in advance!

Hi team. Sorry for the wasted post. But I thought I would add this if anyone else comes across the same issue. I added the lines to the host (my Rock64) and this seemed to fix the issue.

I’m having the same issue. Even after I enter the command found here FAQ — Syncthing v1 documentation to the docker container (accessed via portainer) the issue doesn’t resolve.