Daisuke ITO4k downloadsBidirectional sync between Obsidian and Nextcloud using hash-based change detection.
Good news for anyone working across multiple desktops and mobile devices.
The only cost you pay is waiting for the initial Vault index to complete on first install. From that moment on, you get:
Bidirectional sync between your Obsidian Vault and Nextcloud — built specifically for Nextcloud, not just generic WebDAV.
Most "WebDAV sync" plugins treat the server as a dumb file store: they compare modification times, copy files, and hope for the best. Nextcloud Sync instead talks to Nextcloud's own APIs (Capabilities, file IDs, checksums, versions, locking, Login Flow v2) to make syncing safe, fast, and frictionless — while still degrading gracefully to plain WebDAV when those APIs aren't available.
A Japanese translation is available at
README.ja.md.
This plugin is still young and some behaviour can be rough around the edges. Please tell me what you run into — it genuinely helps. Whether something broke, something's missing, or you just have a thought after using it, I'd love to hear from you (impressions especially make my day!):
⚠️ Heads-up: settings are being streamlined. Over the next few days, options with little practical value will be progressively removed so the plugin stays simple and hard to misconfigure. Sensible behaviour is derived automatically instead. If a setting you used to see is gone, that is intentional — the plugin now picks the right value for you.
js-yaml to 5.2.1 (GHSA-724g-mxrg-4qvm, quadratic-complexity DoS) and pinned transitive brace-expansion copies to their patched versions (GHSA-3jxr-9vmj-r5cp, exponential-time DoS). Both are development-only dependencies used by the test/lint tooling, not bundled into the plugin; no user-visible behavior change.For the full version history of every release, see the changelog.
| Concern | Generic WebDAV plugin | Nextcloud Sync |
|---|---|---|
| Change detection | Modification time (clock-skew prone, false re-uploads) | Content hash + Nextcloud sync-token / checksums capability for true differential sync |
| Rename / move | Delete + re-create (loses history, re-downloads everywhere) | File-ID (OC-FileId) tracking — a rename stays a rename on every device, history preserved |
| Deletion safety | Hard delete | Routed through the Nextcloud trashbin — recoverable, never an irreversible DELETE |
| Setup | Manual app-password copy & paste | Login Flow v2 — approve in the browser, credentials are issued and stored automatically |
| Large files | Skipped or fail on a single PUT |
Chunked upload — split, resumable, checksum-verified |
| Concurrent edits | Hope nobody else writes | Optimistic concurrency — every update carries an If-Match precondition, so a remote changed by another device is turned into a conflict (no lost update) without locking round trips |
| Recovery from mistakes | None (your copy is all you have) | Server version history — browse and restore any past revision from inside Obsidian |
| Server unavailable | Cryptic errors / partial writes | Maintenance-mode detection (/status.php) and parsed Nextcloud error messages |
| Capability awareness | None | Capabilities probing (/ocs/.../capabilities) — features light up only when the server supports them (Progressive Enhancement) |
If you point it at a non-Nextcloud WebDAV server, it automatically disables the Nextcloud-only features and falls back to standard recursive WebDAV sync — so it still works, just without the extras.
.trash / permanently delete) rather than forcing one behavior; folders and files outside the Vault's tracked notes (e.g. config-folder files) are handled too..git, and for large media you keep device-local. Matching is a folder-prefix match at a folder boundary, so Attachments excludes Attachments/ and everything under it but not Attachments-old. Add or remove entries under Settings → Excluded folders (type a path or use the folder picker). Dotfolders (.git, the config-folder plugins/, the plugin's own state) are already excluded automatically; this list is an additive layer on top.0 for manual-only), plus a Sync now command.nextcloud-debug_<device>.txt, written to the vault root and named per device so multiple devices never overwrite one another (another device's log can even sync into this vault for side-by-side comparison). Each line is timestamped and carries the plugin version, and a full settings snapshot is written when logging turns on; every sync operation is recorded. Useful for troubleshooting on mobile where there's no console. Note: Obsidian hides .txt files unless Settings → Files & Links → Detect all file extensions is on, and they never appear in Quick Switcher — you can also open the file from your OS or Nextcloud. Turn logging off and delete the file when finished.reconcile-text / diff3, the default for auto merge files) integrates edits in different regions, including YAML frontmatter when the two sides changed non-overlapping lines. A text conflict is written as conflict markers; a non-text file is left untouched and flagged (never corrupted with markers).#conflict tag search).data.json.maxFileSizeMB cap guards memory in both directions — oversized files are skipped on upload and on download (the download size is taken from the server's PROPFIND, so the body is never fetched).If-Match precondition: a remote changed by another client returns 412, which the engine turns into a conflict (download remote + resolve). This replaces per-file WebDAV LOCK/UNLOCK round trips, so server-side file locking is intentionally never used.Mobile is supported, with a few platform-aware differences (desktop behaviour is unchanged):
0 for unlimited) to avoid out-of-memory crashes; skips are reported.1.11.4 or later (the plugin uses the secret-storage API introduced in 1.11.4). Desktop (Electron) and mobile (iOS / Android) are supported.33) or later is recommended for the Nextcloud-specific features. Older Nextcloud servers are no longer blocked — they still connect and sync, but the settings screen shows a recommendation banner and some features may degrade. Plain WebDAV servers fall back to core sync.main.js and manifest.json (and styles.css if present) from the latest GitHub Release.<YourVault>/.obsidian/plugins/nextcloud-sync/.https://cloud.example.com).Your Vault is synced into a folder named after the Vault on the Nextcloud side, keeping multiple Vaults cleanly separated.
Can I use a scoped Nextcloud Public Link Share instead of granting full account access?
Yes. If you'd rather not hand the plugin an app password with full account access, you can share a single directory as a Public Link Share with username/password on the Nextcloud side, then point the plugin at it:
https://<host>/public.php/webdav//s/)One point of confusion here: when you click Link… to store the app password, you're asked for an ID and a value. The ID is a local storage key inside Obsidian's encrypted Secret Storage — it is never sent to the server, so it can be anything (e.g. default); it's restricted to lowercase letters/digits/dashes because that's an Obsidian platform constraint, not something this plugin controls. The actual share password goes in the value, which accepts any characters. Put the share token in the Username field, not in the ID field.
Note: version history / restore and chunked upload are optional convenience features layered on top of core sync; they haven't been verified against Public Link Share endpoints and may not work there. Basic upload/download sync is unaffected.
One power feature depends on a server-side Nextcloud app. It only needs to be enabled once by a Nextcloud administrator. The plugin detects it through the capabilities API — if the app is missing, the feature simply stays inactive (no error).
Lost-update safety needs no setting. The plugin always sends an
If-Matchprecondition on upload, so a file changed on the server by another client is turned into a conflict instead of being silently overwritten — there is no File Locking toggle to configure.
Server-side versions come from the built-in Versions app (app ID files_versions), which is enabled by default on a standard Nextcloud install — usually nothing to do.
sudo -u www-data php /var/www/nextcloud/occ app:enable files_versions
versions_retention_obligation in config.php).These are not strictly required, but on self-hosted instances they often need attention for smooth, reliable syncing. All are server-side (admin) settings.
trusted_domains in config.php, otherwise the server rejects requests. Add your domain/IP if needed.overwriteprotocol => 'https', overwritehost, overwrite.cli.url, and trusted_proxies correctly. If these are wrong, the URLs returned by Login Flow v2 (and downloads) can point to the wrong scheme/host and fail. Always use an https:// server URL in the plugin.upload_max_filesize and post_max_size, and the web-server body limit (nginx client_max_body_size, e.g. 0 or a large value). Chunked upload sends small chunks, but the final assembly and very large files still hit these limits.max_execution_time and php-fpm / web-server timeouts (e.g. nginx fastcgi_read_timeout). The plugin uses a fixed 30-second network timeout.auth.bruteforce.protection.enabled/the IP allow-list in config.php.oc:checksums (SHA-256) for change detection and automatically falls back to ETag when they aren't present, so no configuration is required; leaving Nextcloud's default checksum support enabled gives the most accurate detection.The settings screen is intentionally minimal: only Server URL, sign-in, Sync folder, Sync interval, Wi-Fi only, Excluded folders, the config-folder toggles, and an Enable logging switch are shown. Every other option was removed and is now a fixed value or derived automatically from your platform. They are documented here so you always know what the plugin is doing.
These are the options you can change. Most start the same on both platforms; a few differ on first run.
| Setting | Desktop | Mobile |
|---|---|---|
| Server URL / Username / App password | empty | empty |
| Sync interval | 15 min | 15 min (disabled — use Sync now or Sync on startup) |
| Sync on Wi-Fi only | off | on |
| Sync config folder (master) | off | off |
| └ Bookmarks / Other settings | on / on | on / on |
| Auto merge file types | md, txt, cpp, py, c, h, hpp, rs, go, ts, js, java, sh | same |
| Auto merge file strategy | Merge | Merge |
| Other file strategy | Latest modified | Latest modified |
| Enable logging | off | off |
| Excluded folders | empty | empty |
The config-folder category toggles (Bookmarks, Other settings) only take effect once the master Sync config folder is on.
| Setting | Value |
|---|---|
| Network timeout | 30 seconds |
| Startup sync delay | 1 second (0 = no startup sync) |
| Chunk threshold | 50 MB (desktop) / 20 MB (mobile) |
| Chunked upload | on |
| Bulk upload | on |
| File locking | off — If-Match preconditions provide lost-update safety |
| Max conflict regions | 0 (no region-count fallback) |
| Compare with remote | on (desktop and mobile) |
| Log folder | vault root |
| Device name | auto (<platform>-<deviceId>) |
| Setting | Desktop | Mobile |
|---|---|---|
| Sync on file change | on | off |
| Maximum file size | unlimited (0) |
20 MB |
| Network concurrency | auto from RAM (≈ 16 on 8 GB+) | ≈ 3 |
On connect, the plugin probes /status.php (maintenance mode) and /ocs/v1.php/cloud/capabilities to learn the server version and which features (checksums, files locking, …) are available. It then maintains a per-device state database — a snapshot of every file's path, content hash, and remote file ID at the last successful sync. Each sync diffs the current state against that snapshot and the server's sync-token, transferring only what changed. Every Nextcloud-specific behavior is gated behind capability detection, so the same plugin works against a full Nextcloud Hub and a bare WebDAV server alike (Progressive Enhancement).
Sync correctness is guarded by an extensive automated test suite: hundreds of fast pure-logic tests (run on every change) plus live end-to-end suites that drive two devices against a real Nextcloud server, including exhaustive option-combination matrices for conflict resolution and multi-device convergence.
These tests exist specifically to prevent sync-inconsistency states — data loss, endless re-uploading/re-downloading, a remote change that never reaches the local copy, or a local change that never reaches the remote. Even so, no test suite can cover every possible case, and unintended behavior can never be entirely ruled out. If you ever run into such a situation, please don't hesitate to open an issue — it will be addressed as quickly as possible.
data.json.requestUrl API..obsidian/) is excluded from sync by default — only your notes and other vault files are synced. You can opt in to syncing selected parts of it via Sync config folder (see below). Community plugins (.obsidian/plugins/) and the plugin's own sync-state database are never synced, regardless of settings — they hold executable code and device-specific state, which is unsafe to overwrite across devices..obsidian/ config across devices, chosen with two toggles: Bookmarks and Other settings (appearance, themes & snippets, hotkeys, and core-plugin settings). Community plugins and the plugin's own sync-state database are never synced (executable code / device-specific state). A synced change to core-plugin settings may require an Obsidian restart on the other device to take effect.Issues and pull requests are welcome on GitHub. The plugin is still maturing, so feedback of any kind is especially valuable:
MIT © Daisuke ITO