feat(obsidian): add CouchDB stack for Obsidian LiveSync sync

Self-hosted sync backend for the Obsidian LiveSync plugin, following
https://blog.admin-intelligence.de/selbsthosting-von-obsidian-mit-couchdb-kostenlose-synchronisation-einrichten/.
local.ini.example carries the required chttpd/cors config; local.ini itself
is gitignored since CouchDB rewrites it in place (hashed admin password,
node uuid) on first start, so a tracked copy would never stay clean. The
config also has to be mounted read-write, not :ro: CouchDB's entrypoint
chowns everything under /opt/couchdb and aborts under set -e if that fails.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-20 20:54:55 +02:00
co-authored by Claude Sonnet 5
parent 00cc3583ec
commit a9f9a6765b
5 changed files with 77 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
# CouchDB settings required by the Obsidian LiveSync plugin.
# Mounted into /opt/couchdb/etc/local.d/ (files here override the image's
# default.ini and are picked up on container start, no admin-UI setup needed).
#
# Copy this to local.ini before first start:
# cp local.ini.example local.ini
# local.ini is gitignored: CouchDB rewrites it at runtime (hashed admin
# password, generated node uuid), so it can't be a tracked static file.
#
# Mounted read-write on purpose: the entrypoint chowns everything under
# /opt/couchdb to the couchdb user on start and aborts if that fails, so a
# :ro bind mount here breaks the container. It'll take ownership of this
# file on the host after first start; that's expected.
#
# Reference: https://blog.admin-intelligence.de/selbsthosting-von-obsidian-mit-couchdb-kostenlose-synchronisation-einrichten/
[couchdb]
single_node = true
max_document_size = 50000000
[chttpd]
require_valid_user = true
enable_cors = true
max_http_request_size = 4294967296
[chttpd_auth]
require_valid_user = true
[httpd]
WWW-Authenticate = Basic realm="couchdb"
enable_cors = true
[cors]
credentials = true
origins = app://obsidian.md,capacitor://localhost,http://localhost