Kai zhou18 downloadsSync notes and attachments across devices using your own Cloudflare backend, with conflict copies and version recovery.
Sync an Obsidian vault across desktop, iPhone and Android using your own Cloudflare account. The repository contains both the plugin and the Workers + D1 + private R2 backend. No developer-hosted service or developer credentials are required.
中文使用指南 · Privacy · Self-hosting
This is a community project, not the official Obsidian Sync service. The plugin interface is currently Chinese. On 2026-11-02 the Community directory entry was published and its automated review was in progress; approval and in-app installation are not yet confirmed. Use the manual instructions below if the plugin cannot be installed through Community plugins.
You need a computer for the initial Cloudflare deployment. Phones only need Obsidian and their own device package/configuration; you do not install Node.js or deploy another backend on each phone.
| What you want to do | Start here |
|---|---|
| Deploy with your own Cloudflare account | Steps 1–2 below |
| Create a local Obsidian vault and add the plugin | Installation walkthrough |
| Add the plugin to an existing vault | Existing vault instructions |
| Connect iPhone or Android | Mobile installation |
| Create a separate cloud vault or another device | Device and vault management |
| Build the plugin yourself | Build from source |
| Read the full Chinese walkthrough | 中文:从零开始使用 |
node --version, npm --version and git --version to confirm all three commands work.Vaults folder in your home directory is one option; Documents/Desktop may themselves be in iCloud.Run these commands in order, once on the computer:
git clone https://github.com/javakenn/vault-cloud-sync.git
cd vault-cloud-sync
npm ci
npm run setup:cloudflare
At the prompts:
npx wrangler login, complete the new authorization promptly, then rerun the setup command; do not keep refreshing an old localhost callback URL.my-vault-sync. Use 3–48 lowercase letters, digits or hyphens, starting with a letter. This is an infrastructure name, not your local vault name. The default cloud vault ID is notes.A successful run prints a service URL in this form (example only):
https://my-vault-sync.your-account.workers.dev
Open your actual URL in a browser; it is your device-management page. Your service URL and tokens are already included in the generated device JSONs. No author resources or credentials are needed.
All generated files are in the project folder you just cloned. .data is hidden on many systems; macOS Finder uses Command+Shift+. to show hidden files, while Windows Explorer uses View → Show → Hidden items. You can also navigate directly to these paths in your file manager:
| File, relative to the project folder | What to do with it |
|---|---|
.data/devices/notes/mac-vault.zip |
Start with a new, preconfigured desktop vault |
.data/devices/notes/mac.json |
Connect an existing desktop vault |
.data/devices/notes/iphone-vault.zip / iphone.json |
Transfer privately to the iPhone only |
.data/devices/notes/android-vault.zip / android.json |
Transfer privately to the Android only |
.data/admin-secret.json |
Administrator credential for the management page; use only its ADMIN_TOKEN value |
.data/setup-state.json |
Setup progress and service URL; keep privately |
wrangler.local.jsonc |
Your saved Cloudflare bindings; keep privately |
Do not copy the administrator JSON into the plugin. Device JSONs and vault ZIPs contain device credentials: never publish them, attach them to issues or upload them as releases. Back up .data privately. Rerun the same setup command after a transient failure; see partial-provisioning recovery if an existing-resource conflict remains.
Try a new vault first: unzip mac-vault.zip into a local folder outside any other sync service. It contains Cloud Notes, including a hidden configuration folder. In Obsidian, choose Open folder as vault, then select Cloud Notes itself. Trust the vault you generated, enable Vault Cloud Sync under Settings → Community plugins, open its settings, click 连接 under 保存并验证连接, then enable 启用仓库双向同步 and click 同步 under 立即同步.
The package already includes the plugin and this device's connection. This is a new empty vault, not a copy of your existing notes.
Use an existing vault: install the three plugin files into that vault and import mac.json. See the exact folder layout, download links and button sequence. Obsidian installs plugins per vault; installing in another vault does not install it here. Do not copy another vault's data.json or sync baseline.
Sync test.md with a few lines and add a small image. Run 立即同步. The plugin should report 仓库云同步 · 已同步.iphone-vault.zip/iphone.json or android-vault.zip/android.json. Follow mobile steps, preserving hidden configuration files.Physical mobile installation remains to be verified on your device. If iOS does not recognize a copied local vault, use the supported installation alternatives in the installation guide instead of overwriting an existing vault.
Open the service URL printed by the wizard. Open .data/admin-secret.json in a text editor and copy only the value of ADMIN_TOKEN, without the JSON braces, key name or quotes. Paste it into 管理员令牌, leave 云端仓库 ID as notes (or your chosen ID), and click 连接管理. Enter a device name and click 生成设备配置; copy the complete resulting device JSON into that device's plugin settings. The ID may be new: the first device creation registers its access, and the first file commit creates the vault's version record. No manual database editing is needed. The management page keeps credentials only in page memory; use its sign-out button afterward. Copy only a device configuration to Obsidian.
To create another isolated cloud vault with its own device packages:
npm run devices -- --vault work --platform mac --name "Work Mac"
npm run devices -- --vault work --platform iphone --name "Work iPhone"
A local vault is an Obsidian folder; a cloud vault ID is its server-side namespace; a device token identifies one installation. Giving two independent local vaults the same cloud ID merges their files. To keep a second vault isolated, create it with a different ID and import its newly generated configuration.
The CLI reserves one saved configuration per vault/platform. For more devices of the same platform, create distinct device tokens through the management webpage. Revoking a device stops future access; it cannot erase files already downloaded to that device.
See Troubleshooting for missing commands, R2 activation, authorization callback errors, hidden files, connection failures, revoked tokens and phones not syncing. When requesting help, include the failing step and error text; remove tokens and private note contents.
The plugin uploads allowed vault-relative paths and file contents to your configured server, and stores a local device token and sync baseline in its Obsidian plugin settings. It makes no requests until you configure a service and verify or enable sync. It has no client analytics, ads, automatic code downloading, or self-updater. See PRIVACY.md.
npm ci
npm run check
npm run lint
npm test
npm run build
npm run dev
# After initial setup, redeploy only your own saved bindings:
npm run deploy
Tests cover the sync engine, the packaged plugin, and real local Cloudflare workerd/D1/R2 behavior. Local tests do not prove physical device compatibility or production capacity. npm run dev uses local simulated bindings and a local development secret you provide through .dev.vars; see the self-hosting guide.
Built release files contain no account IDs or device tokens. GitHub Release tag and root manifest.json version must match. See release checklist.
MIT © 2026 Kai. See LICENSE. Cloudflare and Obsidian are separate services with their own terms. Dependencies retain their own licenses.