Deploy Obsidian LiveSync on Pethost in one click
A CouchDB server that syncs your Obsidian vaults with Self-hosted LiveSync
What happens
- You sign in to Pethost or make an account, with a passkey, GitHub or Google.
- No machine yet? You pick a plan, and we prepare one for you. The link waits in your browser until it is ready.
- New project opens at the app. You fill in what it asks for and click Create project: Admin password.
- In a minute or two the app is live at its own address with HTTPS. Its secrets are made for it at random, and its data is in the nightly backup.
- It is a project like any other: its compose.yaml, its .env, its logs and a terminal are in the panel, and your agent can change it, roll it back or restore it.
First steps
In Obsidian, install the Self-hosted LiveSync plugin and give it https://obsidian-livesync.sam.pethost.app as the server, admin as the username and the password you gave. The plugin makes its database by itself.
What it runs
The template is this compose.yaml and the variables it writes into the project’s .env. Pethost runs the file as it is written.
services:
couchdb:
image: couchdb:3
restart: unless-stopped
environment:
COUCHDB_USER: admin
COUCHDB_PASSWORD: ${ADMIN_PASSWORD}
COUCHDB_SECRET: ${COUCHDB_SECRET}
configs:
- source: livesync
target: /opt/couchdb/etc/local.d/livesync.ini
volumes:
# The image declares /opt/couchdb/data a volume: the vaults are in it.
- data:/opt/couchdb/data
configs:
# What Self-hosted LiveSync's own setup script sets (utils/couchdb/provision.ts): one node,
# nothing answered without a sign-in, room for big notes, and Obsidian's apps let in by CORS.
livesync:
content: |
[couchdb]
single_node = true
max_document_size = 50000000
[chttpd]
require_valid_user = true
max_http_request_size = 4294967296
enable_cors = true
[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
volumes:
data: