.nextcloud-ignore file support to exclude specific files from sync
It would be great if Nextcloud supported a simple .nextcloud-ignore file (similar to .gitignore) that allows users to exclude specific files from being synced.
For example, in many development environments there are files such as .env, temporary build artifacts, or local-only configuration files that should remain on the local machine but not be uploaded to the server.
A .nextcloud-ignore file in a directory could provide a straightforward and user-friendly way to define such exceptions without having to adjust global sync rules or client settings for each case.
Benefits:
- Keeps sensitive files (like .env) out of the cloud.
- Reduces unnecessary sync traffic for temporary or system files.
- Offers developers and power-users a familiar, flexible approach (similar to .gitignore).
- Improves usability by giving users fine-grained control at the folder level.
This would make Nextcloud even more convenient in development and professional workflows, while staying true to the principle of giving users full control over their data.
Currently running on latest (Nextcloud Hub 10 (31.0.8)) on RHEL & Ubuntu šš»
How to use GitHub
- Please use the š reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Hi, if I am understanding your request correctly then I believe this feature is already available.
If I misunderstood you please clarify.
Here is how you can use this feature:
- open the tray menu
- go to
settings
- go to
general settings, in the top right.
- open
edit ignored files
- select
add
Edit: I just noticed that you could have meant, that going through this procedure is too annoying and that's why you would wish for such an ignore-file as you described. Is that correct?
Thank you!
This request is similar to #8113. It looks like this could be implemented in the same fashion.
Not sure what the maintainers think about this, because one could already add files to ignore using the method @barisbasar1209 described or by editing sync-exclude.lst (should be in ~\AppData\Roaming\Nextcloud when using windows). However, I don't know of a way to ignore files for a specific user.
Thanks @barisbasar1209 and @mike0609king ā yes, Iām aware of both the global ignore rules in the client UI and the sync-exclude.lst.
Thanks for the hints! š I know about the global ignore rules and sync-exclude.lst, but those apply to all folders. What I meant is a .nextcloud-ignore file per directory (like .gitignore) to define rules locally without changing global settings.
@wiesty you can use .sync-exclude.lstin a single folder to have the ignore rules applied to the specific folder
so this is already existing and done
I am closing the request