senjanson537 downloadsReal-time vault synchronization over LAN using Yjs CRDT for conflict-free merging.
Real-time, conflict-free vault synchronization across your local network — no cloud, no server, no subscription.
Edit on your Mac and see changes appear instantly on your iPhone. All traffic stays on your LAN.
Most sync solutions route your notes through a third-party server. LAN Vault Sync is different:
| Feature | Details |
|---|---|
| Real-time sync | File changes pushed to all peers within seconds via WebSocket |
| CRDT text merge | Markdown / text files merged automatically at character level using Yjs — no conflicts, no data loss |
| Binary file sync | Images, PDFs, and other attachments synced via SHA-256 hash comparison |
| Auto-discovery | Devices find each other via UDP broadcast — zero configuration needed |
| Manual peers | Add peers by IP:port for networks where broadcast is blocked |
| QR code pairing | Generate a QR code on desktop; scan with your phone to add the peer instantly — no typing required |
| Offline-friendly | Edit while offline; changes are merged automatically on reconnect |
| P2P architecture | Every device is equal — no central server or hub required |
| Conflict backups | Binary-file conflicts are backed up before overwrite so nothing is lost |
Device A (Mac) Device B (iPhone / iPad)
┌──────────────────┐ WebSocket P2P ┌──────────────────┐
│ Obsidian │◄───────────────►│ Obsidian │
│ + LAN Vault Sync│ Yjs CRDT │ + LAN Vault Sync│
└──────────────────┘ updates └──────────────────┘
▲ ▲
│ UDP broadcast │
└────────────────────────────────────┘
(auto-discovery, LAN only)
.md, .txt, etc.) sync via Yjs CRDT — edits from multiple devices are merged automatically, even if made simultaneously while offline.main.js, manifest.json, and styles.css..obsidian/plugins/lan-vault-sync/.The easiest way to connect a phone or tablet — no typing required:
Tip: If your desktop has multiple network interfaces (e.g. Wi-Fi + Ethernet), use the dropdown above the QR code to select the correct IP before scanning.
Auto-discovery uses UDP broadcast, which is blocked on some managed Wi-Fi networks (guest networks, corporate networks). In that case:
53712).192.168.x.x:53712.The plugin shows a status indicator in the Obsidian status bar:
| Icon | Meaning |
|---|---|
| 🔴 | Sync disabled or no peers found |
| 🟡 | Discovering peers |
| 🟢 | Connected and syncing |
Open the command palette (Cmd/Ctrl + P) and search for:
IP:port| Setting | Default | Description |
|---|---|---|
| Enable Sync | On | Master on/off switch |
| Device Name | Auto-generated | Friendly name shown to other peers |
| Port | 53712 |
WebSocket listening port |
| Ignored Paths | .obsidian/, .trash/ |
Glob patterns excluded from sync |
| Sync Check Interval | 30s |
Period between full file-tree verification passes |
| Debug Logging | Off | Write verbose logs to the developer console |
fast-diff for efficient delta computation53713 (same subnet only).obsidian/plugins/lan-vault-sync/crdt-state/.obsidian/plugins/lan-vault-sync/conflicts/| File type | Strategy |
|---|---|
Text (.md, .txt, .canvas, …) |
Yjs CRDT — automatic, lossless merge at character level |
| Binary (images, PDFs, audio, …) | Last-write-wins by modification timestamp; previous version backed up |
ws://) within your local network. Do not enable this plugin on public or untrusted networks.# Clone and install
git clone https://github.com/your-username/obsidian-lan-vault-sync
cd obsidian-lan-vault-sync
npm install
# Development build — watch mode (auto-recompile on save)
npm run dev
# Production build
npm run build
# Run tests
npm test
Enable the Hot Reload community plugin in Obsidian to automatically reload the plugin after each build.
See doc/debug-and-testing.md for a full multi-device test guide.
Pull requests and issues are welcome. Please open an issue before submitting a large PR.