Skip to content

Instantly share code, notes, and snippets.

@roelven
Last active May 25, 2025 20:15
Show Gist options
  • Save roelven/dc7d691ee1e6776218f49cf12af5890f to your computer and use it in GitHub Desktop.
Save roelven/dc7d691ee1e6776218f49cf12af5890f to your computer and use it in GitHub Desktop.
A Docker Compose file to self-host a CouchDB instance for Obsidian Livesync
services:
couchdb:
image: couchdb:latest
container_name: obsidian-livesync
# user: 1000:1000 # You may need to adjust this depending on your host system's user/group IDs for file permissions
environment:
- COUCHDB_USER=${COUCHDB_USER}
- COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
volumes:
- /docker/volumes/obsidian-livesync/data:/opt/couchdb/data
- ./local.ini:/opt/couchdb/etc/local.ini # Ensure this file exists in the same directory as this docker-compose.yml
ports:
- "8091:5984"
restart: unless-stopped
# Note: You will need to create a 'local.ini' file in the same directory as this docker-compose.yml.
# A basic 'local.ini' could look like this (adjust as needed):
#
# [couchdb]
# uuid = your_unique_uuid_here_generate_one
#
# [chttpd]
# bind_address = 0.0.0.0
# port = 5984
#
# [chttpd_auth]
# require_valid_user = true
# admin_users = username # Use the same username as COUCHDB_USER
#
# You can generate a UUID using 'uuidgen' command in linux or an online generator.
# For more details on local.ini, refer to CouchDB documentation.
COUCHDB_USER=YOURADMINUSER
COUCHDB_PASSWORD=YOURPASSWORD
@roelven
Copy link
Author

roelven commented May 25, 2025

This should help you get going with a CouchDB server to support your self-hosted Obsidian Livesync setup:
https://github.com/vrtmrz/obsidian-livesync

Found some useful docs to put this together:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment