problems with .obsidian folder

Is there any reason why syncthing should (sometimes) balk at the .obsidian subfolder in an Obsidian vault? I have a set of Obsidian vaults which I am syncing both to a raspberry pi and a repurposed x64 PC running Ubuntu 24.04.3 LTS. With the Pi, there is no problem; but the PC hung repeatedly at 93% synced

I saw from a discussion here about mysterious hangs that someone had advised deleting the .obsidian folder tree (which holds all the configuration information) so I tried that and the PC synced everything up quickly and without complaint.

But what is it about that particular folder which makes it a problem for Syncthing?

  • Syncthing fails to sync a file if the file is opened exclusively.
  • Syncthing will detect and react on conflicts by creating conflict files for you to resolve, because there is no way for Syncthing to resolve conflicts on its own.

The above are the reasons why the “.Obsidian" directory should be excluded from syncing. Not syncing that directory is no big drawback, since it does not contain the actual documents.

(Disclaimer: I don’t use Obsidian myself. The information comes from similar topics in this forum.)

1 Like

Given the two devices above, it’s very likely that Obsidian is more often used on the PC (possibly even running whenever you’re logged on), so the chances of a race condition and/or conflict increases.

Obsidian’s .obsidian subdirectory contains more than settings – it’s also where Obsidian keeps a vault’s manifest. Obsidian watches for whenever the contents of a vault changes so that it can update the manifest file (workspace.json).

So syncing an .obsidian subdirectory from the RPi to the PC while Obsidian is running on the PC means that Obsidian will detect new changes to a vault’s contents, resulting in an update to workspace.json at the same time that Syncthing is trying to replace it with a copy sent by the RPi. It’s also not limited to just Syncthing, any transfer/copy program is affected.

If you can guarantee that Obsidian isn’t running on either device while Syncthing is syncing, then it’s doable, otherwise it’s a dice roll. It’s why Obsidian recommends that .obsidian not be synced between devices.

2 Likes

Thank you for this very lucid and helpful explanation. All I really want to sync is the plugin directory under the .obsidian folder and I’m sure I can work out some way to do that from the documentation.

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