Obsidian WebDAV Sync
WebDAV Sync is a plugin for Obsidian that syncs your vault with a WebDAV server. It excels existing solutions at more robust file handling and better performance without vendor lock-in.
WebDAV Sync is a plugin for Obsidian that syncs your vault with a WebDAV server. It excels existing solutions at more robust file handling and better performance without vendor lock-in.
Obsidian WebDAV Sync is a general-purpose & bidirectional WebDAV syncing plugin for Obsidian. It is created due to the current landscape that no single plugin can reliably and conveniently sync your vault with a WebDAV server. It has following features:
As an Obsidian user working across multiple devices, I've personally encountered the sync dilemma: finding a solution that's reliable, flexible, and doesn't compromise data integrity. After trying nearly every syncing plugin in the community, I found that each came with trade-offs that frustrated my daily workflow:
Then I discovered Nutstore Sync — an excellent plugin, but designed for Nutstore only. I thought: why not make this general-purpose? So I forked it, extensively overhauled it for no vendor lock-in, better performance, and improved stability. What came out was Obsidian WebDAV Sync.
To sync an Obsidian vault to a WebDAV server is a typical decentralized coordination problem, where each client has their own copy and changes of the vault and there's no centralized resolver between. The goal is to synchronize the vaults between clients for maximum data integrity.
To address this, this plugin keeps a record of the last known sync state of local and remote files. During syncing evaluates four states (current local, current remote, recorded local, recorded remote) for each file path and decides the sync action accordingly:
✅ = Exists, ❌ = Doesn't Exist, ✏️ = Changed Compared to Record
| Cases | Local File | Remote File | Sync Record | Action |
|---|---|---|---|---|
| 1 | ✅ | ✅ | ✅ | ⏭️ Skip (already synced) |
| 2 | ✏️ | ✏️ | ✅ | ⚠️ Resolve Conflict (apply strategy) |
| 3 | ✅ | ✏️ | ✅ | ⬇️ Pull (download remote) |
| 4 | ✏️ | ✅ | ✅ | ⬆️ Push (upload local) |
| 5 | ✅ | ❌ | ✅ | 🗑️ Delete Local (cleanup) |
| 6 | ❌ | ✅ | ✅ | 🗑️ Delete Remote (cleanup) |
| 7 | ❌ | ✏️ | ✅ | ⬇️ Pull (restore from remote) |
| 8 | ✏️ | ❌ | ✅ | ⬆️ Push (restore to remote) |
| 9 | ✅ | ✅ (comparing with local) | ❌ | 📝 Record (capture unrecorded file) |
| 10 | ✅ | ✏️ (compared with local) | ❌ | ⚠️ Resolve Conflict (first sync) |
| 11 | ❌ | ✅ | ❌ | ⬇️ Pull (new remote file) |
| 12 | ✅ | ❌ | ❌ | ⬆️ Push (new local file) |
| 13 | ❌ | ❌ | ✅ | 🧹 Clean Record (database cleanup) |
Now the syncing is reliable enough, but some new issues emerged.
For example, comparing four states before syncing means we need a whole WebDAV, local vault and record traversal at the start of each sync, which is impractical for large vaults. To address this, Fast Mode is introduced that reuses the remote state in the record as current state. This avoids traversing the whole WebDAV, but it ignores remote changes. So a normal sync before fast syncs is recommended.
Moreover, to store the records and content of all files (to compare and decide whether a file is changed) requires a huge and active amount of storage to ensure fidelity. This plugin leverages IndexedDB to store the records and query them on-demand.
Then, more issues emerged: what if the file changes between the time of traversal and execution? What if the file becomes a folder at remote? If later changes to storage are made, how to migrate users' data? There's a lot more to discuss about.
Since the plugin is currently in beta, installation requires the BRAT (Beta Reviewer Auto-update Tool) plugin:
https://github.com/hesprs/obsidian-webdav-syncAlways backup important notes before your initial sync. While the plugin handles file presence resolution robustly, having a backup provides peace of mind during first-time setup.
Obsidian WebDAV Sync is licensed under the AGPL-3.0 License.