Obsidian-Sync setup
Server-side setup
Section titled “Server-side setup”-
Create a docker compose and others required files in a directory
Terminal window mkdir /opt/obsidian-sync && cd /opt/obsidian-sync && mkdir couchdb && mkdir couchdb/data && touch couchdb/local.ini && micro compose.yaml -
Import the following
services:couchdb:image: couchdb:latestcontainer_name: obsidiansyncenvironment:- TZ=Europe/Moscow # can be changed- COUCHDB_USER=YOUR_USERNAME # important- COUCHDB_PASSWORD=YOUR_LONG_PASSWORD # importantvolumes:- ./couchdb/data:/opt/couchdb/data- ./couchdb/local.ini:/opt/couchdb/etc/local.iniports:- 5984:5984restart: unless-stopped -
Post-install
- Navigate to http://127.0.0.1:5984/_utils
- Click
<->button to open sidebar. OpenSetuppage. - Select
Configure as single nodeand enter your credentials from compose file. Leave everything else untouched and clickConfigure node. - Verify the installation in
Verify installationpage, you must seeSuccess!message. - Move to
Create Database, enter prefered database name. SelectNon-partiotionedpartitioning option.
-
Configuring node
Nagivate to
Configurationpage and click+ Add optionAdd the following options
Section Option Value chttpd require_valid_user true chttpd_auth require_valid_user true httpd WWW-Authenticate Basic realm=“couchdb” httpd enable_cors true chttpd enable_cors true chttpd max_http_request_size 4294967296 couchdb max_document_size 50000000 cors credentials true cors origins app://obsidian.md,capacitor://localhost,http://localhost
Client-side setup
Section titled “Client-side setup”-
Open Obsidian app, navigate to
Settings->Core Pluginsand installSelf-hosted LiveSyncplugin. -
A window after installation will pop up. Click
Install->Enable->Open setting dialog->Options -
You’ll see much icon on top as subpages. Click the 4th (🛰️ icon)
Remote type ->
CouchDB. URI ->obsidian.domain.com. Username ->YOUR_USERNAME. Password ->YOUR_LONG_PASSWORD. Database ->YOUR_DB_NAME. -
Click
Testunder Test Database connection button, you should seeConnection successful!. -
Click
Checkunder Validate Database button, apply fixes if needed. -
Click
Apply. -
Navigate to 5th subpage (🔄 icon)
Presets ->
Livesync. Sync mode ->LiveSync. -
Navigate to 3rd subpage
Check the 2nd checkbox to see status on status bar.
-
Navigate to 1st subpage
Scroll down till the end and click
I've read everything. -
Back to 2nd subpage
Click
Enableunder Enable LiveSync. -
A lot of popups will appear
- Click fetch.
- Notification about size limitations might be ignored
-
Re-check 7th step. Done.