Files shown on Nextcloud do not sync with files on NAS

Nextcloud version (eg, 20.0.5): 27.1.4_22.2.16
Operating system and version (eg, Ubuntu 20.04): Linux 5.15.107+truenas x86_64
Apache or nginx version (eg, Apache 2.4.25): NA
PHP version (eg, 7.4): 8.2.13

The issue you are facing:
Hi all, I’m a complete newbie in terms of self hosting and I just set up my Nextcloud some hours ago. I installed it from Truecharts on my TrueNAS Scale. For App Config Storage and User Data Storage, I just chose Host Path, point to the folder on my NAS that I want my stuff to be stored. (I tried ZFS as well, but seem to have the same issue)

However, I found that files on Nextcloud do not sync with files on my NAS folder. For example, if I upload a photo to the storage folder through my file explorer on my Mac, it won’t appear in Nextcloud. But when I upload the same photo through webUI, Nextcloud would prompt me that the files already exists and ask me if I want to replace it. THEN, the photo would appear. On the same note, if I delete something on my NAS folder through my Mac, it won’t disappear either. BUT, if I delete or upload something on Nextcloud webUI, it’s effective immediately.

Is this intended behavior somehow? Can I manually/automatically index the files? What am I missing here?


I bumped into this Access/Share Nextcloud Data Folder Through Samba Server article and it seems like I should probably not run SMB and Nextcloud on the same directory?

Correct, Nextcloud only shows files that have been added to the Database. This is due to performance reasons, polling the disk in on every access in a multi-user environment isn’t the best idea.

There is the inotify app and the redis notify app if you really need to force the issue, otherwise the best solution is to utilize the external storage features of Nextcloud and either map the local SMB directory or connect to it via SMB and have that separate from your main Nextcloud data dir

Thanks for your reply! Really appreciate your insights!

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.