title: “Obsidian + obsidian-livesync” date: 2026-04-14 tags:
- obsidian
- self-hosted
← Back to overview · Next: CouchDB + couch-sync →
obsidian-livesync is a community plugin that replaces Obsidian’s native sync with a self-hosted CouchDB backend. It supports end-to-end encryption, so even though notes live in a database on your server, they’re encrypted before leaving your device.
Setting Up the Plugin
- In Obsidian, open Settings → Community Plugins → Browse and search for Self-hosted LiveSync.
- Install and enable it.
- Under Remote Database Configuration, enter:
- URI:
http://your-vps-ip:5984 - Username / Password: your CouchDB admin credentials
- Database name:
obsidian
- URI:
- Enable End-to-end encryption and set a passphrase. Store this safely — without it you cannot decrypt your notes.
- Click Test Connection, then Apply & Restart.
Repeat this on every device. All devices sync through the same CouchDB instance; obsidian-livesync handles conflict resolution automatically.
How obsidian-livesync Stores Notes
obsidian-livesync does not store plain markdown in CouchDB. It uses a chunked, content-addressed format:
Leaf documents
Each file is split into chunks. Every chunk becomes a leaf document:
{
"_id": "h:+2wl1oyw4xkjoo",
"type": "leaf",
"data": "<encrypted base64 content>",
"e_": true
}_idis a hash of the chunk content — identical chunks are deduplicated across files.dataholds the encrypted, base64-encoded chunk.e_: truemarks the document as encrypted.
Parent documents
A parent document ties the chunks together, using the filename as its _id:
{
"_id": "my-note.md",
"type": "plain",
"path": "my-note.md",
"ctime": 1776028129377,
"mtime": 1776028134157,
"size": 142,
"children": ["h:+2wl1oyw4xkjoo", "h:+1b8os20kjykp8"],
"published": true
}childrenlists the leaf IDs in order to reconstruct the full file.published: falseis a custom field — couch-sync uses this to unpublish a note without deleting it.
Why this matters
Because content is encrypted, couch-sync cannot read actual note text out of CouchDB without the decryption key. If you want the sync pipeline to publish note content, you either need to disable E2E encryption or run a separate decryption step.
Real-time Sync
Once configured, obsidian-livesync maintains a persistent connection to CouchDB and pushes changes within a second or two of saving. Sync is bidirectional — changes from any device appear on all others automatically.
Conflict resolution follows “latest write wins” for most edits, with a dedicated conflict UI for cases where two devices edited the same note while offline.