Overview Link to heading

This guide will help you set up Obsidian LiveSync using CouchDB on your Linux setup. The setup involves using Docker to configure CouchDB and setting up the Obsidian LiveSync plugin.

Prerequisites Link to heading

  • Any OS capable of running Docker

  • If you don’t have Docker, please refer to this LINK

  • For Docker Compose, refer to this LINK

Step 1: Configure CouchDB with Docker Compose Link to heading

  1. Create Docker Folder:

    • Create a directory called couchdb anywere you like in your filesystem.

    • Navigate to it and create a file called docker-compose.yml.

  2. Define the compose file:

    • In the web editor, paste the following code:
 1        services:
 2          couchdb:
 3            image: couchdb
 4            container_name: couchdb
 5            hostname: couchdb
 6            mem_limit: 2g
 7            network_mode: host
 8            ports:
 9              - "5984:5984"
10            volumes:
11              - /volume1/docker/couchdb:/opt/couchdb/data
12              - /volume1/docker/couchdb/config/local.ini:/opt/couchdb/etc/local.ini
13            environment:
14              - COUCHDB_USER=yourusername
15              - COUCHDB_PASSWORD=yourpassword
16            restart: unless-stopped

Step 2: Configure CouchDB Link to heading

  1. Create Configuration File:

    • In the docker/couchdb folder, create a folder named config.

    • Inside the config folder, create a file named local.ini.

  2. Edit local.ini:

    • Add the following configuration:
1	[couchdb]
2	single_node = true
3	
4	[httpd]
5	bind_address = 0.0.0.0
6	port = 5984

Step 3: Set Up Obsidian LiveSync Plugin Link to heading

  1. Install Obsidian LiveSync Plugin:

    • Open Obsidian.

    • Go to “Settings” > “Community plugins”.

    • Turn off “Safe mode” and browse the community plugins.

    • Search for “Self-hosted LiveSync” and install it.

  2. Configure LiveSync Plugin:

    • Go to “Settings” > “Plugin options” > “Obsidian Live Sync”.

    • Enter the CouchDB server URL (e.g., http://<DEVICE_IP>:5984).

    • Enter the database name (obsidian-myvault).

    • Enter your CouchDB admin credentials (admin and $Rf39mth$#8*).

Step 4: Verify and Test Link to heading

  1. Verify CouchDB Access:

    • Open a web browser and navigate to http://<DEVICE_IP>:5984/_utils.

    • Log in with your CouchDB admin credentials.

  2. Test Synchronization:

    • Make changes in your Obsidian vault and verify they sync correctly across devices.

    • Check the CouchDB web interface to ensure changes are reflected in the database.

Troubleshooting Link to heading

  • Connection Issues:

    • Ensure the network mode and ports are correctly configured.

    • Check for firewall settings that may block access.

  • Data Persistence:

    • Verify the volume mappings in the Docker Compose file.

    • Check permissions on the mapped directories.

Additional Resources Link to heading

By following this guide, you should have a reliable setup for synchronizing your Obsidian vault using CouchDB. If you encounter any issues, don’t hesitate to ask for help from the community or refer to the provided resources.