self-hosting obsidian sync with couchDB

Infra · July 4, 2026 · 10 min read

i assume you already use Obsidian.

obsidian?

Obsidian is a local-first markdown note app. which simply means it stores your notes as markdown files .md on disk.

unlike apps like Notion (cloud native, data lives on Notion's servers, sync is inherently supported), Obsidian has no backend by default - nothing to sync your notes across devices out of the box.

the trade-off is very clear:

workaround

Obsidian provides a solution for its users for this specific issue, which is Obsidian Sync, a paid subscription for cross-device vault sync.

for me this is not bueno. i installed Self-Hosted LiveSync, a community plugin that replaces Obsidian Sync with your own CouchDB backend.

i already have a VPS with Caddy and other Compose services, so adding CouchDB there is basically a sync backend for free.

common setup

services: caddy: ... couchdb: image: couchdb:3 environment: COUCHDB_USER: admin COUCHDB_PASSWORD: <secret> volumes: - couchdb_data:/opt/couchdb/data - couchdb_config:/opt/couchdb/etc/local.d

same compose network as caddy → reachable internally as couchdb:5984, no published port needed.

setting up the plugin

adding another device: generate a setup URI from the primary device, paste it on the new one along with the E2EE passphrase, done.

before initializing: back up the vault. if it's an existing vault, safer to start fresh and import into it than point LiveSync at it directly.

how the syncing actually works

LiveSync uses CouchDB's replication protocol instead of a custom sync layer. The Obsidian plugin runs PouchDB client side, API-compatible with CouchDB, so it replicates with it directly.

more detail → repo