Homelab

How to Self-Host Obsidian Sync on Proxmox (LiveSync + CouchDB)

November 28, 2026 · 7 min read · John Crump
Neon diagram of a laptop and phone Obsidian vault syncing over https to nginx and a couchdb database inside an orange lxc proxmox box, inside a dashed obsidian-livesync frame, with notes reading e2e encrypted, not a backup, unpriv lxc and $0/mo sync

I live in Obsidian, and I want my notes on my laptop and my phone. Obsidian’s official Sync works fine, but it’s a paid subscription and your vault lives on someone else’s server. I already run a Proxmox box, so I moved sync home instead.

The tool is Self-hosted LiveSync, the most popular community sync plugin for Obsidian. It keeps a small database inside Obsidian on each device and replicates it to a CouchDB server you control, in close to real time. It supports end-to-end encryption, so even the CouchDB server only sees scrambled data.

Here’s how I set it up: CouchDB in Docker inside an unprivileged LXC, HTTPS through my existing nginx reverse proxy, and a setup URI to add each device in a minute.

Before you start

  • Back up your vault first. Zip the folder and put it somewhere safe. The first sync overwrites things on purpose.
  • Turn off other sync. LiveSync isn’t compatible with Obsidian Sync, and it shouldn’t run on a vault that iCloud, OneDrive or Syncthing is also syncing. Pick one.
  • It’s sync, not backup. The project says this plainly. A deleted note syncs as deleted everywhere. Keep real backups.

What you need

  • A Proxmox VE host
  • A reverse proxy with a valid TLS certificate. Obsidian on iOS and Android won’t connect over plain HTTP or a self-signed cert. Desktop-only on your LAN can skip this.
  • A hostname for it, like notes.example.com
  • Obsidian on each device (the plugin needs Obsidian 1.7.2 or newer)

Step 1: Create the LXC

CouchDB is light. 1 core, 1 GB of RAM and 8 GB of disk is plenty for a normal vault. Keep it unprivileged and turn on nesting and keyctl so Docker runs inside it.

From a shell on the Proxmox host, check the template name you have, then create the container (change the ID, storage and template to match your setup):

pveam update
pveam available --section system | grep debian-12
pveam download local debian-12-standard_12.7-1_amd64.tar.zst

pct create 121 local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst \
  --hostname obsidian-sync \
  --cores 1 --memory 1024 --swap 512 \
  --rootfs local-lvm:8 \
  --net0 name=eth0,bridge=vmbr0,ip=dhcp \
  --unprivileged 1 \
  --features nesting=1,keyctl=1 \
  --onboot 1

pct start 121
pct enter 121

Give it a DHCP reservation or a static IP. Your reverse proxy needs to find it at the same address every time.

Step 2: Install Docker

Inside the container:

apt update && apt install -y curl ca-certificates unzip
curl -fsSL https://get.docker.com | sh

unzip is for the Deno installer in Step 4.

Step 3: Run CouchDB

Make a folder for it, plus separate folders for the database and its config so both survive container updates. CouchDB runs as user 5984, so hand those folders over:

mkdir -p /opt/couchdb/couchdb-data /opt/couchdb/couchdb-etc
chown -R 5984:5984 /opt/couchdb/couchdb-data /opt/couchdb/couchdb-etc
cd /opt/couchdb

Put the admin login in /opt/couchdb/.env:

COUCHDB_USER=obsidian
COUCHDB_PASSWORD=pick-a-long-random-password

Then create /opt/couchdb/docker-compose.yml. This is the project’s own example with the credentials pulled out into the .env file:

services:
  couchdb:
    image: couchdb:latest
    container_name: couchdb-for-ols
    user: 5984:5984
    environment:
      - COUCHDB_USER=${COUCHDB_USER}
      - COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
    volumes:
      - ./couchdb-data:/opt/couchdb/data
      - ./couchdb-etc:/opt/couchdb/etc/local.d
    ports:
      - 5984:5984
    restart: unless-stopped
chmod 600 .env
docker compose up -d
docker compose logs -f

If the container keeps restarting, check the ownership of the two folders first. That’s the usual cause.

Step 4: Prepare CouchDB for LiveSync

Out of the box, CouchDB won’t work with LiveSync. The project ships a script that fixes that. It now runs on Deno 2, so install that first:

curl -fsSL https://deno.land/install.sh | sh
export PATH="$HOME/.deno/bin:$PATH"
deno --version

Then run the init script against your new server, using the same admin login as your .env:

export hostname=http://localhost:5984
export username=obsidian
export password=pick-a-long-random-password
export database=obsidiannotes
curl -s https://raw.githubusercontent.com/vrtmrz/obsidian-livesync/main/utils/couchdb/couchdb-init.sh | bash

You should see CouchDB provisioning completed. at the end. Behind the scenes it sets CouchDB up as a single node, requires a login for every request, turns on CORS for Obsidian’s desktop and mobile apps, raises the request and document size limits, and creates the obsidiannotes database.

As always, read a script before you pipe it into a shell. It’s short.

Step 5: Put it behind HTTPS

I already run an nginx container with a wildcard cert, so CouchDB just gets one more server block. Swap in your hostname, cert paths and the LXC’s IP:

server {
    listen 443 ssl;
    server_name notes.example.com;

    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

    location / {
        proxy_pass http://192.168.0.50:5984;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_buffering off;
        client_max_body_size 50M;
    }
}
nginx -t && systemctl reload nginx

proxy_buffering off keeps sync progress from stalling, and client_max_body_size lets bigger attachments through. Raise it if you keep large PDFs in your vault.

Check it from your laptop. You should get a login challenge, not a page full of data:

curl -i https://notes.example.com/

If you publish it through Cloudflare like I do with my other services, it works the same way. If you see the connection dropping in LiveSync mode, switch the plugin to periodic sync. If you only need sync at home or over Tailscale, you don’t have to expose it to the internet at all.

Step 6: Make a setup URI

A setup URI is one encrypted string that holds your server address, login and vault encryption settings. You paste it into Obsidian instead of typing everything on a phone keyboard. Back in the LXC:

export hostname=https://notes.example.com
export database=obsidiannotes
export username=obsidian
export password=pick-a-long-random-password
export passphrase=a-strong-vault-encryption-passphrase
export uri_passphrase=a-different-setup-uri-passphrase
deno run --minimum-dependency-age=0 --allow-env https://raw.githubusercontent.com/vrtmrz/obsidian-livesync/main/utils/setup/generate_setup_uri.ts

There are two different passphrases here, and they matter:

  • passphrase encrypts your notes end to end. Lose it and the data on the server is useless.
  • uri_passphrase only unlocks the setup URI. If you leave it out, the tool makes one and prints it once.

Put both in your password manager, separately. Then clear your shell history so the passwords aren’t sitting in it.

Step 7: Set up your first device

Do this on the device with the most complete copy of your vault, usually your desktop.

  1. In Obsidian, go to Settings > Community plugins, search for Self-hosted LiveSync, install it and enable it.
  2. Open the Welcome to Self-hosted LiveSync notice and choose I am setting this up for the first time.
  3. Pick Use a Setup URI (Recommended), paste the URI, enter the setup URI passphrase, and choose Test Settings and Continue.
  4. Choose Restart and Initialise Server, then confirm I Understand, Overwrite Server. Only do this once you have that backup.
  5. Wait for the progress indicators to clear. The first upload of a big vault takes a while.

Step 8: Add your other devices

On the working first device, open the command palette and run Self-hosted LiveSync: Copy settings as a new Setup URI. Give it a passphrase and send the result to your phone in a way you trust.

  1. On the new device, create an empty vault, then install and enable the plugin.
  2. Choose I am adding a device to an existing synchronisation setup, then Use a Setup URI (Recommended). Paste it and enter its passphrase.
  3. Choose Restart and Fetch Data, then Overwrite all with remote files since the vault is empty.

Make a test note on your phone and watch it show up on your desktop, then edit it on the desktop and watch it come back. If both directions work, you’re done.

If the device already has notes you want to keep, don’t use the overwrite option. Follow the project’s Fast Setup guide instead.

Back it up

  • Back up the vault itself from at least one device. That’s your real copy, in plain Markdown.
  • Back up the LXC with Proxmox Backup Server or a nightly vzdump in snapshot mode, so sync keeps running during the job.
  • Snapshot before updates. Take a Proxmox snapshot before you pull a new CouchDB image.

Security checklist

  • Don’t forward port 5984 on your router. Only the reverse proxy should talk to CouchDB.
  • Use a long random CouchDB password. It’s the only thing standing between the internet and your database.
  • Keep end-to-end encryption on. Then even a stolen copy of the database is just ciphertext.
  • Treat setup URIs like passwords. Anyone with the URI and its passphrase gets your whole vault.
  • Keep /opt/couchdb/.env at chmod 600.

Don’t want to run CouchDB?

LiveSync has two other modes. It can sync through S3-compatible object storage like MinIO, AWS S3 or Cloudflare R2. It also has a peer-to-peer mode over WebRTC with no data server at all, though it still needs a signalling relay to find your devices, and at least one device with the data has to be online. For a homelab, though, CouchDB in an LXC is the simplest thing that just keeps running.

Sources: Self-hosted LiveSync on GitHub, Setup your own CouchDB server, LiveSync Quick Setup, CouchDB provisioning script.

Leave a Reply

Your email address will not be published. Required fields are marked *