3.9 KiB
3.9 KiB
publish, permalink, title, created, modified, tags, cssclasses
| publish | permalink | title | created | modified | tags | cssclasses | |||
|---|---|---|---|---|---|---|---|---|---|
| true | /sh/garden/livesync | Self-hosted LiveSync | 2026-02-05T09:58:59.620-07:00 | 2026-02-05T12:21:13.920-07:00 |
|
Self-hosted LiveSync is a community plugin for 20-29 HOBBYS/22 SELF HOSTING/22.11 DIGITAL GARDEN/Obsidian that enables real-time synchronization across devices using CouchDB or object storage.
Features
- Real-time sync — Changes sync immediately
- Conflict resolution — Automatic merging of simple conflicts
- End-to-end encryption — Data encrypted before leaving device
- Self-hosted — Your data on your server
- Multi-platform — Works on all Obsidian platforms (desktop, mobile)
Architecture
Device A (Obsidian) ←→ CouchDB Server ←→ Device B (Obsidian)
All devices sync to a central CouchDB instance. Changes propagate in real-time.
Server Setup (CouchDB)
Docker (Recommended)
# docker-compose.yml
version: "3"
services:
couchdb:
image: couchdb:latest
restart: always
ports:
- "5984:5984"
environment:
- COUCHDB_USER=admin
- COUCHDB_PASSWORD=your-secure-password
volumes:
- ./couchdb-data:/opt/couchdb/data
docker-compose up -d
Configure CouchDB
Access Fauxton UI at http://server:5984/_utils
- Create a database for your vault (e.g.,
obsidian-vault) - Configure CORS if accessing from different domains
CORS Setup
In Fauxton → Configuration → CORS:
- Enable CORS
- Set origins to
app://obsidian.mdand your domain
Or via curl:
curl -X PUT http://admin:password@localhost:5984/_node/_local/_config/httpd/enable_cors -d '"true"'
curl -X PUT http://admin:password@localhost:5984/_node/_local/_config/cors/origins -d '"app://obsidian.md"'
curl -X PUT http://admin:password@localhost:5984/_node/_local/_config/cors/credentials -d '"true"'
curl -X PUT http://admin:password@localhost:5984/_node/_local/_config/cors/methods -d '"GET, PUT, POST, HEAD, DELETE"'
curl -X PUT http://admin:password@localhost:5984/_node/_local/_config/cors/headers -d '"accept, authorization, content-type, origin, referer"'
Plugin Setup
- Install Self-hosted LiveSync from Obsidian Community Plugins
- Open plugin settings
- Configure connection:
- URI:
https://couchdb.example.com - Username: your CouchDB user
- Password: your CouchDB password
- Database:
obsidian-vault
- URI:
- Set up encryption passphrase (all devices must use same passphrase)
- Test connection
- Enable sync
Sync Modes
| Mode | Description |
|---|---|
| LiveSync | Real-time sync (uses more bandwidth) |
| Periodic | Sync at intervals |
| On file save | Sync when files change |
Customization Sync
Sync settings, themes, plugins across devices:
Settings → Customization Sync → Enable
Select what to sync:
- Settings files
- Snippets
- Themes
- Plugins (careful with this)
Encryption
Always enable end-to-end encryption:
- Settings → Encryption → Enable
- Set passphrase (same on all devices)
- All data is encrypted before upload
Troubleshooting
Sync not working
# Check CouchDB is running
curl http://localhost:5984
# Check database exists
curl http://admin:password@localhost:5984/obsidian-vault
Conflicts
Plugin shows conflict indicator. Open note to resolve:
- View both versions
- Choose or merge manually
- Conflicts auto-resolve if possible
Rebuild database
If sync gets corrupted:
- Disable sync on all devices
- Delete database in CouchDB
- Re-create database
- Rebuild from primary device
- Re-enable on other devices
Alternatives to CouchDB
LiveSync also supports:
- MinIO (S3-compatible)
- Cloudflare R2
- AWS S3
- WebRTC (peer-to-peer, experimental)