Obsidian LiveSync

Why I use it

I need to take notes on multiple devices with multiple operating systems. Therefore I wanted a private note-taking setup with a lot of flexibility, but I did not want to pay for another small monthly subscription just for sync of a notes app. We already have enough subscriptions. Obsidian gives me the note-taking side, and LiveSync + CouchDB let me host the sync backend myself.

  • Privacy: The sync backend runs on hardware I control.
  • No extra monthly fee: One less subscription.
  • Offline mode: Notes still work when the server or network is unavailable.

My setup

The whole setup is pretty simple: Obsidian on my devices, the Self-hosted LiveSync plugin inside Obsidian, and one CouchDB database on the homeserver.

Device 1                  Homeserver                  Device 2
Obsidian + LiveSync  <-->  CouchDB  <-->  Obsidian + LiveSync
                              ^
                              |
                              v
                    Obsidian + LiveSync
                           Device 3

CouchDB is only the meeting point. The actual writing still happens in local Markdown files, which is pretty pleasant because it allows me to export them easily.

Small setup notes
  • CouchDB runs as a single Docker service.
  • LiveSync gets its own database and user.
  • CORS needs to allow the Obsidian app origins.
  • For phones and tablets, HTTPS through a reverse proxy is required.
My Docker Compose
services:
  couchdb-obsidian-livesync:
    container_name: obsidian-livesync
    image: couchdb:3.5.1
    environment:
      - PUID=1000
      - PGID=1000
      - UMASK=0022
      - TZ=Europe/Berlin
      - COUCHDB_USER=${COUCHDB_USER} # from .env
      - COUCHDB_PASSWORD=${COUCHDB_PASSWORD} # from .env too
    volumes:
      - /home/mattis/media/appdata/couchdb/data:/opt/couchdb/data
      - ./local.ini:/opt/couchdb/etc/local.d/local.ini
    restart: unless-stopped
    networks:
      - proxy
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"

networks:
  proxy:
    external: true

I removed the Traefik labels here. They are only responsible for routing the service through my reverse proxy and do not really explain the LiveSync setup.


How it feels

Once it is configured, it mostly disappears. I open Obsidian, write notes, and my other devices catch up almost instantly. A note-taking app should not be particularly exciting, and this one is not.


Lessons learned

  • Start with one vault and one empty test device before connecting everything. You don't want your precious notes erased.
  • Keep the encryption passphrase somewhere safe before adding more devices.

I followed this Reddit guide for the detailed setup steps. The plugin itself is Self-hosted LiveSync.