I have set up a local external storage folder. A document scanner uses SFTP to directly place scanned documents (PDF files) into this directory. However, the desktop client does not seem to sync these files automatically. I have to access the Nextcloud web interface to make that happen.
Is there any way for the Nextcloud desktop client to pick up changes made to an external storage directory?
I’d be happy to have a cron job execute an occ command every couple of minutes, but there does not seem to be one.
important bits here are the user=www-data line because occ will refuse to operate unless executed as the user who owns the Nextcloud configuration file, which is www-data in the Dockerized setup.
If your external storage ID is not 1, replace -v 1 with whatever is correct for your case.
Sorry for necromancy but this thread shows up high in the search results for “nextcloud client not recognizing changes in external storage” and it is the first and only one that I have found which does give a useful answer – and I have been fighting with this problem literally for years.
The one thing that is lacking is a systemd service file for non-Docker set-ups. I cobbled together a working one and shared it on INotify file watcher (Github).
It sits in the root folder. Make sure you use the correct Dockerfile. Please see the links that I posted above. The standard Nextcloud Docker image does not contain supervisord! You need to use the Dockerfile from the examples.
Correction. It isn’t working. It worked before because I rebooted Nextcloud after inotify install.
I still need to location for that file.
@bovender you mention, root folder, but I can’t find anywhere. Any chance you can be a bit more specific? I ran a recursive search for the filename and I can’t find it.
Are you sure that your Dockerfile installs containerd and uses it to run Nextcloud? Do you use the Dockerfile from the examples that I recommended, or have you written your own Dockerfile?
I believe all these differences are the cause that I cannot find this file and make the proper configuration. and no, I haven’t followed your previous instructions. Furthermore, this is a Docker system ran over LibreElec and I doubt it uses containerd. Just to add complexity…
Either way, thank you very much for trying to help.
Yeah, you’re probably right. Now I don’t know a thing about LibreElec, but you could try and write your own Dockerfile (or use the one provided in the examples). It’s not a requirement to use docker compose.
Give it a try Writing Dockerfiles is not that hard to learn
I feed all my paper mail into an automatic document scanner, and when I sit in the commuter rail later in the morning, all the documents automagically appear on my laptop via Nextcloud, I love it!