From fac53afe84153a0dc12cc0e9073620fc52543ffe Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Wed, 28 Oct 2026 07:41:49 +0000 Subject: [PATCH] Restore self-hosting as the primary setup path --- README.md | 10 +++++++--- docs/README.md | 5 +++-- docs/setup_flyio.md | 2 ++ docs/setup_own_server.md | 18 ++++++++++++------ 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c75dd253..1fd6eef7 100644 --- a/README.md +++ b/README.md @@ -37,11 +37,13 @@ This plug-in may be particularly useful for researchers, engineers, and develope ### Setup workflows +Self-hosting lets us choose a server we trust and manage it ourselves. For CouchDB, please set up and maintain your own instance. CouchDB can run on a Raspberry Pi, another server you operate, or infrastructure such as Fly.io. Please keep your server secure. + Choose a synchronisation method, prepare its server where required, then follow the corresponding client setup: | Method | What you need | Nice to have | Setup guides | | --- | --- | --- | --- | -| CouchDB | A CouchDB server you operate or trust. | — | [Own server](docs/setup_own_server.md), [Docker stack](docker/README.md), [Fly.io](docs/setup_flyio.md), or [IBM Cloudant](docs/setup_cloudant.md); then [Quick Setup](docs/quick_setup.md). | +| CouchDB | A CouchDB server. | — | [Set up your own server](docs/setup_own_server.md), [Docker stack](docker/README.md), or [Fly.io](docs/setup_flyio.md); then [Quick Setup](docs/quick_setup.md). | | Object Storage | An S3-compatible service or server. | — | [Object Storage Setup](docs/setup_object_storage.md). | | Peer-to-Peer | Nothing. | Your own signalling server. | [P2P communication model](docs/p2p.md), then [Peer-to-Peer Setup](docs/setup_p2p.md). | @@ -56,14 +58,16 @@ For the Fly.io video walkthrough, see [automated setup](docs/setup_flyio.md#a-ve ### Third-party managed CouchDB hosting > [!NOTE] -> The services below are operated by third parties. They are not official Self-hosted LiveSync services, and this project neither endorses nor recommends them. +> The services below are operated by third parties. They are not official Self-hosted LiveSync services, and this project neither endorses nor recommends them. The providers proposed the listings in the table. -If you prefer a hosted CouchDB server, the following providers offer options for this plug-in: +If you would rather not set up and maintain a server yourself, the following providers offer managed CouchDB servers which this plug-in can be configured to connect to: | Provider | Offering | | --- | --- | | [Zenith Hosting](https://zenith.hosting/host/obsidian-livesync) | Managed CouchDB hosting. | +[IBM Cloudant](docs/setup_cloudant.md) is another managed alternative, with some limitations. + Your synchronisation data will reside on a server operated by the provider. Consider whether that is acceptable for your Vault, and review the provider's current terms, pricing, and data-handling policies before using the service. ## Information in the Status Bar diff --git a/docs/README.md b/docs/README.md index 9c5499f9..a43a43ea 100644 --- a/docs/README.md +++ b/docs/README.md @@ -9,8 +9,9 @@ A document's original date and reviewed-version fields describe its baseline. Re | Task | Start here | |---|---| | Choose a synchronisation method | [Project overview and setup workflows](../README.md#setup-workflows) | -| Set up CouchDB clients | [CouchDB server setup](setup_own_server.md), then [Quick setup](quick_setup.md) | -| Choose a CouchDB hosting option | [Docker stack](../docker/README.md), [Fly.io](setup_flyio.md), or [IBM Cloudant](setup_cloudant.md) | +| Run your own CouchDB server | [Own server](setup_own_server.md), [Docker stack](../docker/README.md), or [Fly.io](setup_flyio.md) | +| Configure CouchDB clients | [Quick setup](quick_setup.md) | +| Consider third-party managed services | [Alternatives to maintaining your own server](../README.md#third-party-managed-couchdb-hosting) | | Set up S3-compatible storage | [Object Storage Setup](setup_object_storage.md) | | Set up peer-to-peer synchronisation | [P2P communication model](p2p.md), then [Peer-to-Peer Setup](setup_p2p.md) | | Diagnose P2P connectivity | [Browser-assisted check](../src/apps/webpeer/README.md#p2p-connection-check), [network tips](tips/p2p-sync-tips.md), and [self-hosted TURN](../docker/coturn/README.md) | diff --git a/docs/setup_flyio.md b/docs/setup_flyio.md index fcc3c1ee..475e7e54 100644 --- a/docs/setup_flyio.md +++ b/docs/setup_flyio.md @@ -3,6 +3,8 @@ This is how to configure fly.io and CouchDB on it for Self-hosted LiveSync. +The CouchDB instance is yours to manage. You can configure it yourself or set up another instance and switch to it, following the preservation and recovery guidance below. + > [!WARNING] > Before replacing or deleting an existing CouchDB instance, back up every available Vault and the remote database, then [choose the authoritative copy](recovery.md#first-choose-the-authoritative-copy). Stop or suspend synchronisation on other devices while reviewing recovery options. Local files alone do not establish that every needed edit or revision has been preserved. diff --git a/docs/setup_own_server.md b/docs/setup_own_server.md index cc1994e1..4f59c95b 100644 --- a/docs/setup_own_server.md +++ b/docs/setup_own_server.md @@ -15,7 +15,7 @@ - [4. Starting Docker Compose in background](#4-run-the-docker-compose-file-in-the-background) - [C. Install CouchDB directly](#c-install-couchdb-directly) - [2. Run couchdb-init.sh for initialise](#2-run-couchdb-initsh-for-initialise) - - [3. Expose CouchDB to the Internet](#3-expose-couchdb-to-the-internet) + - [3. Make CouchDB reachable from your devices](#3-make-couchdb-reachable-from-your-devices) - [4. Client Setup](#4-client-setup) - [1. Generate the setup URI on a desktop device or server](#1-generate-the-setup-uri-on-a-desktop-device-or-server) - [2. Setup Self-hosted LiveSync to Obsidian](#2-setup-self-hosted-livesync-to-obsidian) @@ -143,12 +143,16 @@ If you are using Docker Compose and the above command does not work or displays curl -s https://raw.githubusercontent.com/vrtmrz/obsidian-livesync/main/utils/couchdb/couchdb-init.sh | hostname='http://:5984' username='' password='' database=obsidiannotes bash ``` -## 3. Expose CouchDB to the Internet + -- You can skip this instruction if you using only in intranet and only with desktop devices. - - For mobile devices, Obsidian requires a valid SSL certificate. Usually, it needs exposing the internet. +## 3. Make CouchDB reachable from your devices -For temporary testing, create a Cloudflare Quick Tunnel by following the [Quick Tunnels instructions](https://developers.cloudflare.com/tunnel/get-started/quick-tunnels/). It prints a random hostname which changes each time you create a tunnel, and the URL stops working when the `cloudflared` process stops. Quick Tunnels are intended for testing and development, not production. See the [Cloudflare Tunnel guide](https://developers.cloudflare.com/tunnel/get-started/) for durable use. +- You can skip this step if you use CouchDB only on a trusted local network with desktop devices. + - For mobile devices, Obsidian requires HTTPS with a valid certificate. HTTPS does not require making CouchDB publicly accessible. + +Choose how your devices reach your CouchDB server. You can use a [reverse proxy you operate](#reverse-proxies), private-network access, or a tunnel service of your choice. The [Docker profiles](../docker/README.md#profile-details) provide examples. + +Cloudflare is one optional choice. The following example uses a [Quick Tunnel](https://developers.cloudflare.com/tunnel/get-started/quick-tunnels/) for temporary testing. It prints a random hostname which changes each time you create a tunnel, and the URL stops working when the `cloudflared` process stops. Quick Tunnels are intended for testing and development, not production. For ongoing use, configure your chosen connection method; the [Cloudflare Tunnel guide](https://developers.cloudflare.com/tunnel/get-started/) applies if you choose that provider. ``` cloudflared tunnel --url http://localhost:5984 @@ -178,8 +182,10 @@ Use the URL printed by your tunnel as the server address. Keep the tunnel proces The `LIVESYNC_USER` and `LIVESYNC_PASS` here are the credentials which Self-hosted LiveSync will store for routine access to this database. They may be the administrator credentials from step 2. If you have separately configured a CouchDB account with the required access to this database, use that account instead. Neither the provisioning wrapper nor the Setup URI generator creates that separate account. +Use the server URL through which your devices reach CouchDB. For the temporary Quick Tunnel example above, use the URL printed by your own running tunnel. + ```bash -export LIVESYNC_HOST='' +export LIVESYNC_HOST='' export LIVESYNC_DB=obsidiannotes export LIVESYNC_USER='' export LIVESYNC_PASS=''