Is there a .stignore file that *will* be synced across device?

So if you want to block a folder from being synced on all devices you need to copy the .stignore file to all devices manually?

1 Like

Nope, there is more discussion to be found on this on the forum, but in short: use includes, e.g. ‘#include .stignore-shared’.

1 Like

I am not sure if the Syncthing .stglobalignore still is considered and where it is stored. That might also be a way.

In addition, #include .stignore-shared would be interesting if it is stored in one place and processed. For example #include /volume1/xxx/yyy/zzz/.stignore-shared.

Would something like that work and what is the exact sequence for it?

This is more of a hack than anything else, but does the job.

You need to have a folder, which is synced between all your devices. Let us name it folder-synced-with-all. Then create a file .stignoreall in that folder, save your ignored patterns there, and then include the file in the .stignore of folder-synced-with-all using #include .stignoreall.

Then you place other folders in the same root folder, and in their .stignore you put #include ../folder-synced-with-all/.stignoreall.

The overall structure will look something like this:

folder-synced-with-all/.stignore (#include .stignoreall)
folder-synced-with-all/.stignoreall (your actual ignore patterns)

folder1/.stignore (#include ../folder-synced-with-all/.stignoreall)
folder2/.stignore (#include ../folder-synced-with-all/.stignoreall)

Of course, more complex relative paths are possible too, but I would not go this route. Also, there is an older topic somewhere in the forums, where a lot of people have already discussed this question.

Are the sub/.stignore synced though? It sounds like you need to manually create all of those right?

You should try not rely on the ../ syntax, as I personally wanted to kill it multiple times.

Yes, you need to create the initial .stignore files manually. It really only comes in handy when you want to update your patterns later on, so that only one file needs to be edited then. A fully automatic solution is not possible, at least for now.

Not fully but semi automation. All your path information are included in the config.xml. Extract it and make a script a prepared .stignore from a stored place to the individual path. In this way I make now all my global modifications in seconds.

Is a .stglobalignore a option from Syncthing side?

There is one additional problem with #include - the folder goes to failed state if included file does not exist. Moreover, it is impossible to fix the problem from GUI as “.stignode could not be loaded”.


There seems to be a syncthing feature “Default ignore patterns” which should address that issue about global ignore patterns. However it does not seem to work and I did not find any information about it.

Here it is: GUI - Settings - Edit Folder Defaults - Ignore Patterns

If you type in same patterns they go into:


There is a section followed by the patterns.

There is also a cli command available to import such patterns via txt file. That command maintains the same config.xml section.

So it looks pretty well implemented but no one talks about it and it does not work for me.

Does anybody know something about it or know how to get it working?


I just openend a new thread for that: