Can Nextcloud be forced to sync directories and allow access via the web interface which aren't created by itself?

Hi there,

long story short, I use Syncthing for years now and wondered if Nextcloud could actually read, write and access files created by Syncthing already.

It didn’t work in my initial test with NextcloudPi as intended when I install Syncthing on top of it and normally it wouldn’t matter much for me anyway as I can’t host things with my DSlite connection (shared IPv4 which doesn’t help in Germany where most mobile providers and APs still only offer v4 access) but I was curious nonetheless.

Having a nice web interface and things such as my own globally accessible RSS reader are nice to have.

I’m not sure if this is what your looking for but as a workaround you could use the External Storage plugin and direct the shares to the local path of your Syncthing files. This should allow you to access your Syncthing files within Nextcloud.

https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/external_storage_configuration_gui.html

1 Like

I would say this is a bad idea because the open file handles that each program would have would end up stepping on each other’s toes a lot.

You can use the “external storage” plugin as already mentioned which makes Nextcloud only query the current directory you look at and pretty much disables search for it.
Or alternatively share a path within the data directory of NextCloud (which requries proper permission/ownership managemen) and have a cron job to cause NextCloud to re-scan for changed/new/deleted files within the shared directory.
I’m using the latter solution myself with application which writes into NextClouds data directory and search quite nice after the scan, only disadvantage would be that it depends on the scan interval till you can see the files/changes via NextCloud (either its web interface or using WebDav).
I was thinking about a 3rd party solution to sync from and to my NextCloud but had bad experience with SyncThing (though it has been a while since I last used it). I’d rather try either rclone’s webdav integration and do a 2-way sync or use NextCloud cli tool.