Featured image of post Obsidian sync configs

Obsidian sync configs

Install couchdb

Step 1: Create local config

Edit the local.ini

[couchdb]
single_node=true
max_document_size = 50000000

[chttpd]
require_valid_user = true
max_http_request_size = 4294967296

[chttpd_auth]
require_valid_user = true
authentication_redirect = /e=_/_utils/session.html

[httpd]
WWW-Authenticate = Basic realm="couchdb"
enable_cors = true

[cors]
origins = app://obsidian.md,capacitor://localhost,http://localhost
credentials = true
headers = accept, authorization, content-type, origin, referer
methods = GET, PUT, POST, HEAD, DELETE
max_age = 3600

If your are going to bind with physical directory, put your local.ini inside the physical directory.

Step 2: Deploy couchdb with docker compose

Edit the docker-compose.yml

# If bind with named volumes
volumes:
  couchdb:
    name: couchdb

services:
  couchdb:
    image: docker.kamasylvia.com/couchdb:3.4.3
    container_name: couchdb
    ports:
      - "5984:5984"
    environment:
      - COUCHDB_USER=<Your username>
      - COUCHDB_PASSWORD=<Your password>
      - TZ=Asia/Shanghai
    volumes:
      # The files' owner will be id:5984 when you launch the image.
      # Because CouchDB writes on-the-fly configurations into local.ini.
      # So when you want to perform git pull or change something, you have to change owners back.
      - couchdb:/opt/couchdb

      # If bind with local directory, use the following.
      # - ./data:/opt/couchdb/data
      # - ./conf/local.ini:/opt/couchdb/etc/local.ini

	  # If you want to use named volume with subpath
      # - type: volume
      #   source: couchdb
      #   volume:
      #     subpath: opt/couchdb/data
      #   target: /opt/couchdb/data
      # - type: volume
      #   source: couchdb
      #   volume:
      #     subpath: opt/couchdb/etc/local.ini
      #   target: /opt/couchdb/etc/local.ini

    restart: unless-stopped

If bind with docker volume, copy the local.ini into couchdb container.

docker cp path/to/local.ini couchdb:/opt/couchdb/etc/local.ini

Then restart couchdb container.

Step 3: LiveSync configs

  1. Install LiveSync plugin.
  2. Manual setup.
  3. Remote type: CouchDB
    1. Server URI: your couchdb URL
    2. Use JWT instead of Basic Authentication: Off
    3. Username: your username
    4. Password: your password
    5. Database name: obsidian
      1. Database name can be changed as you like.
      2. There is no need to create a database in advance.
      3. The database name must be in lowercase.
    6. Test -> Check -> Apply
    7. End-to-End encryption: On
    8. Passphrase: your passphrase
    9. Path obfuscation: On
  4. Sync settings:\
    1. Deletion propagation\
    2. Use the trash bin: On\
    3. Keep empty folder: On\
    4. Hidden files: Enabled\
    5. Scan for hidden files before replication: On
  5. Customization sync:\
    1. Enable customization sync: On
Last updated on Apr 11, 2025 09:04 UTC
Built with Hugo
Theme Stack designed by Jimmy