Self-host Obsidian LiveSync: your own CouchDB on a managed VPS

To self-host Obsidian LiveSync on a managed VPS is to keep your notes on a server of your own, which our teams keep up to date and monitor day and night. Self-hosted LiveSync is a free, open source plug-in for Obsidian, under the MIT license, that synchronises your vaults between your computers and phones through a CouchDB database. This guide installs the official CouchDB image at version 3.5.3 with the settings the plug-in checks, and we ran every command on a Simafri VPS before writing it: installation with Docker Compose, HTTPS, a database written and read back over the API, backups, a restore and an update.

Simon Vasconcelos Lee By Published on 5 December 202611 minute read

All guides Documentation and collaboration

In short

  1. Self-hosted LiveSync is the plug-in; the server is CouchDB, under the Apache 2.0 license. Neither has a license to buy.
  2. Install the official image couchdb with Docker Compose, port 5984 published on 127.0.0.1 behind an HTTPS reverse proxy: Obsidian on a phone requires HTTPS.
  3. Put the settings the plug-in checks in a local.ini file: required authentication, CORS for the Obsidian origins and the size limits.
  4. Check the server without Obsidian: a request without credentials gets a 401, a document written over HTTPS reads back, and the CORS preflight answers for app://obsidian.md.
  5. Back up the data and configuration volumes with tar, CouchDB stopped for a few seconds. To update, change the image tag and recreate the container.

What Self-hosted LiveSync does

Self-hosted LiveSync is a community plug-in for Obsidian, the Markdown note-taking app. It synchronises a vault between all your devices, desktop and mobile, through a server you choose, and it is not related to the official Obsidian Sync service, which it cannot synchronise with.

This guide prepares the CouchDB remote, the one the project’s documentation sets up on your own server. Its README advises backing up your vault before you install or upgrade the plug-in, and not running it alongside another synchronisation solution such as iCloud or Obsidian Sync.

What the licenses allow

Self-hosted LiveSync is published under the MIT license: you can use it free of charge, copy it, modify it and redistribute it, keeping the copyright notice. CouchDB is a project of the Apache Software Foundation, under the Apache License 2.0, which also allows use, modification and redistribution, including for a company. Both are provided without warranty.

Obsidian itself is a separate application, published by its own company under its own terms. Self-hosted LiveSync is installed from its list of community plug-ins.

The resources to plan for

CouchDB is light. Here is what we measured on our test VPS, with 2 vCPU and 4 GB of memory, after the installation and a 20 MB test document:

Server size therefore depends on the size of your vaults, the number of devices and the other applications you run beside CouchDB. On a managed VPS, tell us about your usage and we will recommend the right size.

Installing CouchDB with Docker Compose

The project documents two ways to prepare CouchDB: a Compose file and a script that configures it through its API, or the Docker stack of the repository, whose livesync.ini file and init container apply the same settings. This guide keeps one container and puts every setting in a local.ini file. On a server with Docker Engine and its Compose plugin, installed from Docker’s repository for Ubuntu, create a folder such as /opt/obsidian-livesync and put this compose.yaml in it:

compose.yaml
services:
  couchdb:
    image: couchdb:3.5.3
    restart: unless-stopped
    environment:
      COUCHDB_USER: ${COUCHDB_USER:?set COUCHDB_USER in .env}
      COUCHDB_PASSWORD: ${COUCHDB_PASSWORD:?set COUCHDB_PASSWORD in .env}
    volumes:
      - couchdb_data:/opt/couchdb/data
      - couchdb_config:/opt/couchdb/etc/local.d
      - ./local.ini:/opt/couchdb/etc/local.ini
    ports:
      - "127.0.0.1:8124:5984"

volumes:
  couchdb_data:
  couchdb_config:

Next to it, the local.ini file holds the values that the plug-in’s provisioning script writes and that its setup wizard checks under “Check server requirements”:

local.ini
; The CouchDB settings that Self-hosted LiveSync checks
[couchdb]
single_node = true
max_document_size = 50000000

[cluster]
n = 1

[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]
origins = app://obsidian.md,capacitor://localhost,http://localhost
credentials = true

The administrator’s name and password go in a .env file, which Docker Compose reads on its own. Create it readable by root only, then start CouchDB:

Terminal, in /opt/obsidian-livesync
umask 077
printf 'COUCHDB_USER=admin\nCOUCHDB_PASSWORD=%s\n' "$(openssl rand -hex 24)" > .env
umask 022
docker compose up -d
docker compose ps

CouchDB answered a few seconds after its container started on our test VPS. On the very first start, its log shows a few messages about missing system databases while it creates them. To check that it is ready:

Terminal, in /opt/obsidian-livesync
. ./.env
curl -s -u "$COUCHDB_USER:$COUCHDB_PASSWORD" http://127.0.0.1:8124/_up
curl -s -u "$COUCHDB_USER:$COUCHDB_PASSWORD" http://127.0.0.1:8124/
curl -s -u "$COUCHDB_USER:$COUCHDB_PASSWORD" http://127.0.0.1:8124/_all_dbs

The first command returns "status":"ok", the second the welcome message with "version":"3.5.3", and the third the system databases, _replicator and _users. The plug-in reads its settings from the configuration API; this loop shows them the same way:

Terminal, in /opt/obsidian-livesync
. ./.env
for k in chttpd/require_valid_user chttpd_auth/require_valid_user httpd/WWW-Authenticate chttpd/enable_cors chttpd/max_http_request_size couchdb/max_document_size cors/credentials cors/origins; do echo "$k $(curl -s -u "$COUCHDB_USER:$COUCHDB_PASSWORD" http://127.0.0.1:8124/_node/_local/_config/$k)"; done

Each line shows the value of local.ini, such as chttpd/require_valid_user "true" and cors/origins "app://obsidian.md,capacitor://localhost,http://localhost".

HTTPS: the reverse proxy

Obsidian on mobile requires HTTPS with a valid certificate. The container serves CouchDB over HTTP, on port 8124 of the server, and a reverse proxy in front of it handles HTTPS. We tested Caddy, installed from its official Debian and Ubuntu repository: it obtains the Let’s Encrypt certificate itself and renews it. CouchDB sits at the root of its own domain, as the project recommends, and the admin interface, Fauxton, is kept off the internet, as the project’s Docker guide advises:

/etc/caddy/Caddyfile
obsidian-livesync.example.com {
	@fauxton path /_utils /_utils/*
	respond @fauxton 404
	reverse_proxy 127.0.0.1:8124
}
Terminal
systemctl reload caddy

Checking the server the way the plug-in uses it

Before you open Obsidian, three checks over HTTPS show that the server is ready for it. A request without credentials must be refused:

Terminal
curl -sI https://obsidian-livesync.example.com/

The answer is HTTP/2 401, with www-authenticate: Basic realm="couchdb" and via: 1.1 Caddy. Then, with the credentials, the welcome message, the CORS preflight that Obsidian sends before a request, and Fauxton:

Terminal, in /opt/obsidian-livesync
. ./.env
U=https://obsidian-livesync.example.com
curl -s -u "$COUCHDB_USER:$COUCHDB_PASSWORD" $U/
curl -s -o /dev/null -D - -X OPTIONS -H 'Origin: app://obsidian.md' -H 'Access-Control-Request-Method: PUT' -H 'Access-Control-Request-Headers: authorization,content-type' $U/obsidiannotes
curl -s -o /dev/null -w '%{http_code}\n' $U/_utils/

The preflight returns HTTP/2 204 with access-control-allow-origin: app://obsidian.md and access-control-allow-credentials: true, and Fauxton returns 404. Last, create the database for your vault, obsidiannotes as in the project’s guides, then write a document in a test database, read it back and delete that database:

Terminal, in /opt/obsidian-livesync
. ./.env
U=https://obsidian-livesync.example.com
curl -s -u "$COUCHDB_USER:$COUCHDB_PASSWORD" -X PUT $U/obsidiannotes
curl -s -u "$COUCHDB_USER:$COUCHDB_PASSWORD" -X PUT $U/connection-test
curl -s -u "$COUCHDB_USER:$COUCHDB_PASSWORD" -X PUT -H 'Content-Type: application/json' -d '{"note":"Written over HTTPS"}' $U/connection-test/hello
curl -s -u "$COUCHDB_USER:$COUCHDB_PASSWORD" $U/connection-test/hello
curl -s -u "$COUCHDB_USER:$COUCHDB_PASSWORD" -X DELETE $U/connection-test

Each write answers {"ok":true}, and the document comes back with its _rev. On our test VPS, we also wrote documents in bulk with _bulk_docs, read them from the _changes feed, the two endpoints that replication relies on, and sent a 20 MB document over HTTPS, accepted and read back whole. A wrong password got a 401, like a request with none.

Connecting Obsidian

In Obsidian, install Self-hosted LiveSync from the community plug-ins, then follow the project’s Quick Setup for the first device. Without a Setup URI, choose to configure a remote manually, select CouchDB and enter:

“Check server requirements” then reads the settings of local.ini. Once a test note has reached the server, the project advises creating a Setup URI from this first device for each additional one, rather than typing the settings again. We did not run Obsidian on our test VPS: the checks above follow the requests the plug-in makes.

Backups

Everything lives in three places: the couchdb_data volume with your databases, the couchdb_config volume with the administrator and the runtime settings, and the folder with compose.yaml, local.ini and .env. As in the project’s Docker guide, the copy is made with CouchDB stopped, a few seconds during which the plug-in waits and then resumes. The CouchDB image includes tar:

Terminal, in /opt/obsidian-livesync
umask 077
docker compose stop couchdb
docker compose run --rm --no-deps -T --entrypoint tar couchdb -C /opt/couchdb -czf - data etc/local.d > couchdb-$(date +%F).tar.gz
docker compose start couchdb
tar -czf config-$(date +%F).tar.gz compose.yaml local.ini .env
umask 022

The two archives are readable by root only. Schedule this copy and send it off the server. Stored on the disk, the files are also included in the server’s nightly backups. With end-to-end encryption on, the archive holds your notes encrypted: keep your passphrase separately, since the backup cannot be read without it.

Restoring

CouchDB is restored into empty volumes: on a new server with the same compose.yaml, local.ini and .env, or on the same one after removing the current volumes. The first line checks the archive and removes the volumes only if it is intact; the second extracts it, then starts CouchDB only if the extraction succeeded:

Terminal, in /opt/obsidian-livesync
BACKUP_DATE=2026-11-20
(
  set -e
  for f in couchdb-$BACKUP_DATE.tar.gz; do
    test -s "$f" || { echo "Missing or empty: $f"; exit 1; }
  done
  gzip -t couchdb-$BACKUP_DATE.tar.gz
  docker compose down -v
  docker compose run --rm --no-deps -T --entrypoint tar couchdb -C /opt/couchdb -xzf - < couchdb-$BACKUP_DATE.tar.gz
  docker compose up -d
)

Set BACKUP_DATE, on the first line, to the date in the names of the backup you restore, as listed by ls. The commands run in parentheses with set -e, which stops them at the first error. They first check that each file exists and is not empty, before anything is stopped, removed or overwritten: a wrong date stops there, with your data untouched, and a failed step stops every step after it, so the application is never started again on a partial restore.

We tested the whole cycle on our VPS: archive, volumes removed, an empty CouchDB started to make sure the database was gone, then the restore into new volumes. The database came back with its three documents, the 20 MB one included, and the administrator signed in with the same password. A truncated archive stopped at the first line, and at the second, tar refused it and CouchDB was not started. Before you resume your devices after a restore, follow the project’s recovery guide, which explains how to choose the copy that wins.

Updates

Two things are updated separately. The plug-in updates from Obsidian, like any community plug-in, and its releases on GitHub say what each one changes. CouchDB updates with its image: this guide pins 3.5.3, the most recent image on Docker Hub when we tested it, so check the tags page for a newer release before you install. Take a backup, change the image tag in compose.yaml, then pull the new image and recreate the container:

Terminal, in /opt/obsidian-livesync
docker compose pull
docker compose up -d

The welcome message shows the new version:

Terminal, in /opt/obsidian-livesync
. ./.env
curl -s -u "$COUCHDB_USER:$COUCHDB_PASSWORD" http://127.0.0.1:8124/

Who does what on a managed VPS

Self-hosting means running the server on top of the application. On a managed VPS, our teams take charge of the server and proactively monitor your CouchDB instance; Self-hosted LiveSync remains your tool, with your vaults, your encryption passphrase and your settings.

TopicOur teamsYou
The serverSystem and security updates, server interventions includedThe timing that suits you
MonitoringServer monitored 24/7, with intervention without waiting for your callYour vaults and your devices in Obsidian
CouchDBProactive monitoring: errors, slowdowns and disk space spotted, fix recommendedIts installation, updates and settings, which you apply, yourself or through your AI assistant
EncryptionThe server that stores your encrypted data, monitored and backed upYour end-to-end encryption passphrase, which never reaches the server
BackupsEvery night, encrypted and kept off the machine; restores includedCouchDB’s own archives, and the restore request, when you need one
MigrationYour current server migrated, free of chargeThe timing of the switch

If you would rather have our teams work inside the application itself, that service is billed by the hour or at a fixed rate, with an estimate shared before the work starts.

Your notes, on a server run for you

With a Simafri Managed VPS, our teams keep the server of your CouchDB instance up to date, monitor it day and night and step in without waiting for your call; they also proactively monitor your instance and recommend useful fixes, which you apply, yourself or through your AI assistant. Backups are encrypted every night and kept off the machine, restores are included, and migrating your current server is free.

Explore Managed VPS

Frequently asked questions

Is Self-hosted LiveSync free?

Yes. The plug-in is under the MIT license and CouchDB under the Apache License 2.0: neither has a license to buy, for personal or business use. What remains is the cost of the server that runs CouchDB.

How do I self-host the Obsidian LiveSync server with Docker?

Run the official couchdb image with Docker Compose, the administrator in a .env file and the settings the plug-in checks in a local.ini file: required authentication, CORS for app://obsidian.md, capacitor://localhost and http://localhost, and the size limits. Publish port 5984 on 127.0.0.1 and put an HTTPS reverse proxy in front.

Does Obsidian LiveSync need HTTPS?

On mobile, yes: Obsidian requires HTTPS with a valid certificate. A desktop device can use plain HTTP on a trusted local network only. A reverse proxy such as Caddy obtains and renews a Let’s Encrypt certificate on its own.

Which CouchDB settings does LiveSync require?

require_valid_user set to true, the WWW-Authenticate header, CORS turned on with credentials and the three Obsidian origins, max_http_request_size of 4294967296 and max_document_size of 50000000. The plug-in checks them under Check server requirements.

How much memory does the LiveSync server need?

Little. On our test VPS, CouchDB used about 180 MB of memory at rest and its image takes about 160 MB of disk. The database grows with your vaults and their history.

How do I back up the Obsidian LiveSync server?

Stop CouchDB for a few seconds, archive /opt/couchdb/data and /opt/couchdb/etc/local.d from its image with tar, start it again, and keep a copy of compose.yaml, local.ini and .env. With end-to-end encryption, also keep your passphrase: the backup holds encrypted data.

Can the server read my notes?

Not with end-to-end encryption turned on in the plug-in: notes are encrypted on your devices with a passphrase that never reaches the server, which stores only encrypted data.

Does a managed VPS cover Self-hosted LiveSync?

A managed VPS covers the server: system, security, monitoring and backups. Our teams also proactively monitor your CouchDB instance and recommend useful fixes, which you apply. Work inside the application is billed by the hour or at a fixed rate.

Contact us