Simple WebDAV Sync

approved

by gghyoo

This plugin has not been manually reviewed by Obsidian staff. A lightweight WebDAV sync plugin with ETag + SHA-256 three-way comparison. Zero dependencies, bilingual (EN/ZH).

41 downloadsUpdated 1mo agoMIT

Simple WebDAV Sync

A lightweight Obsidian WebDAV sync plugin with ETag + SHA-256 three-way comparison. Zero npm dependencies, bilingual (EN/ZH).

中文文档

Features

  • ETag + SHA-256 three-way comparison — never relies on timestamps, immune to server-side time drift
  • Two-way sync — uploads local changes, downloads remote changes, handles new and deleted files
  • Conflict safety — keeps both versions when both sides change: {name} (server YYYY-MM-DD).{ext}
  • Safe delete — local delete triggers server restore; remote delete moves to local .sync_trash/
  • Real-time sync — monitors modify / delete / rename events with configurable debounce
  • Auto sync — configurable interval for periodic full sync
  • Sync on close — triggers a full sync when Obsidian closes
  • Crash-safe — persists sync state after each operation
  • Bilingual — English / 中文, auto-detects system language
  • Trash management — view trash size and clear from settings

Installation

From Obsidian Community Plugins (recommended)

Search for "Simple WebDAV Sync" in Settings → Community Plugins → Browse.

Manual

  1. Download main.js, styles.css, manifest.json from the latest release
  2. Copy to your vault's .obsidian/plugins/simple-webdav/ directory
  3. Enable the plugin in Settings → Community Plugins

Settings

SettingDescription
Server URLFull WebDAV path to your vault folder (not root)
Username / PasswordWebDAV credentials
Auto Sync Interval0 = disabled
Debounce Delay (sec)Wait time after file change before syncing, default 10s
LanguageSystem default / 中文 / English
Show NotificationsToggle sync notification popups

Sync Strategy

Core Principle

  • ETag as the sole remote change indicator
  • SHA-256 as the final local change confirmation (after mtime + size quick filter)
  • Three-way comparison: Local vs Sync Record vs Remote

Three-Way Decision Matrix

Local vs RecordRemote vs RecordAction
UnchangedUnchangedSkip
ChangedUnchangedUpload
UnchangedChangedDownload
Both changedBoth changedConflict, keep both
Local newRemote doesn't existUpload
Local doesn't existRemote newDownload

Delete Policy

ScenarioAction
Local deleted, remote unchangedDownload from server to restore
Remote deleted, local unchangedMove local file to .sync_trash/
Both deletedClean sync record

Ignore Rules

._*              # macOS resource forks
.DS_Store        # macOS directory metadata
.sync_state.json # Sync database
.sync_trash      # Local trash
*.tmp            # Temporary files
~$*              # Office temporary files

Technical Details

  • Pure obsidian.requestUrl for WebDAV communication, no external dependencies
  • HTTP/1.1 (HTTP/2 Basic Auth has known compatibility issues)
  • Sync state stored in vault root as .sync_state.json
  • Desktop only (uses Node.js crypto for SHA-256)

License

MIT


中文文档

一个轻量级的 Obsidian WebDAV 同步插件,基于 ETag + SHA-256 三方比较,零依赖,中英双语。

特性

  • ETag + SHA-256 三方比较:不依赖时钟,彻底解决服务器乱改时间戳导致的误同步问题
  • 双向同步:上传本地修改、下载远程修改,支持新增和删除
  • 冲突保留双份:双方同时修改时,服务器版本保存为 {name} (服务器 YYYY-MM-DD).{ext}
  • 安全删除:本地删除不删服务器(自动恢复),远程删除移入本地 .sync_trash/
  • 实时同步:监听 modify / delete / rename 事件,防抖延迟可配置
  • 自动同步:可配置定时全量同步间隔
  • 关闭时同步:Obsidian 关闭时自动触发一次完整同步
  • 断电安全:每个操作完成后立即持久化同步状态
  • 中英双语:自动跟随系统语言,可手动切换
  • 回收站管理:在设置中查看回收站大小并清空

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.