I would like to put in place a self-hosted cloud storage solution (on Linux), which would allow for a global selective sync.

As an example, I would like that a directory called hello and *.jpg files are never synchronized, no matter the place.

I do not care about any other feature, the only hard requirements are:

  • global selective sync
  • server based on Linux
  • clients for Linux and Windows

The only solution which I found doing this is Mega.nz, but it is commercially hosted.

1 Answer 1


i would definitely recommend Nextcloud, although i'm not 100% sure that i understand what your goal is...

  • first it is FOSS and therefor self-hosting (for sure on linux) is no problem.
  • dedicated FOSS-clients are available for linux, windows, mac, android, ios and even windows mobile. but also on other platforms, or if you don't like them, it shouldn't be a problem since file-exchange is done via WebDAV; so every WebDAV-client is fine.
  • a bunch of apps (expandable functions, like contacts, calender, tasks, mails, newsreader,...) do also integrate into resp. interact/synchronize with other applications flawlessly, since standard-protocols & -formats are used.

now regarding your special recommendation (global selective sync)...

  • either you use the client and deselect the unwanted folder and/or add the extension which should be ignored to the list in the settings. - i guess this isn't what you are looking for... but the other answer was about this; maybe this confused me a little bit.
  • or if you are the admin of the instance and don't want such a file/folder on your server at all, you should have a look at the Ransomware protection app. it is designed in first place for something other - as the name says - but i guess with this you can accomplish your goals.
  • if not, maybe take a look at the config.php's line 'blacklisted_files' => array('.htaccess'),, but only use/change it, if you really know what are you doing!

and the last advice i want to express is, if you are fine with the folder/files on your server, but want to restrict access (not just for some users, but for other special conditions) File access control is the app you should look at a bit closer.
i mention this, because hopefully you are aware of, that blocking before uploading just checks/works with the name of the files/folders (renaming and uploading will still be possible - or also the same pictures with a .jpeg-extension may exist...), but a check of the files on the server also works with mime-types for example.
--> maybe both checks/apps in combination will make sense to be on the safe side...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.