Bob Hyman42 downloadsShare Obsidian vaults between devices and users through Google Drive.
Share all or part of an Obsidian vault with multiple devices via Google Drive.
Changes on one device are uploaded quickly, but are shared to other devices lazily or on demand. This conserves network bandwidth while ensuring you'll see the latest version of a file when you open it, wherever you choose to open it (and have a cloud backup of the vault, to boot).
This plugin was inspired by obsidian-air-sync by Takehito Gondo (and Claude).
vault-share from Obsidian Community Plugins into a new or existing local Obsidian vault.Once you log in, the plugin will remain authenticated to Google Drive across Obsidian sessions until you log out or reset the plugin (at the bottom of settings page).
We recommend disabling the core Obsidian sync plugin: it displays a "Sync" icon in the status bar that could be confusing.
The core function of the plugin is to share changes made in a local Obsidian vault with the shared folder in Google Drive, the so-called "group" vault. Whenever it runs, the sharing operation checks for recent changes in both vaults and ensures the file is updated in both places.
The "update" operation can:
The above rules apply when the plugin has a cached history of prior sharing operations. The history is saved in IndexDB, not in the local vault, so you can't see it. It is retained across login/logout to the same group vault. But you can reset it and start from scratch by clicking the "Plugin Reset" button in Settings.
When the plugin logs in to a group vault for the first time, it has no history of sharing with that vault and cannot determine whether an older file is in fact unmodified as for rule 1 above, or whether it was manually deleted as for rule 3, so the initial sharing operation will only:
This can get ugly if the group vault is similar to, but not an exact replica of the local vault.
You could end up with lots of conflict file pairs or merged text files to resolve by hand.
For this reason, we recommend that you do first-time sharing only with a group vault that is empty or is one you recently logged out of and is likely to be very similar o your local vault. To reduce the risk of unintended conflicts, the plugin will prompt for manual confirmation if any bulk share operation would change more that 10% of the files.
There's a background "bulk" operation, which scans all local files and all group files looking for changes.
This runs when you first open Obsidian, or manually by the "Vault Share: Start or Resume Sharing" plugin command, or hourly in the background,
but only when Obsidian running.
On mobile, Obsidian is suspended when the screen is locked, so it spends most of its time not running.
The bulk operation will catch up when Obsidian is brought back to the foreground and pick up where it left off.
There's also a foreground "single-file" operation which operates only on files that you open for viewing or editing in a tab.
It runs once when you first open the file, to check for recent changes in the group vault.
It runs again while you're editing the file (or otherwise making changes to it), whenever you pause typing for a few seconds.
This shares your most recent changes with the group vault but also picks up any changes from the group vault and refreshes your edit window.
If you're just one person using one device at a time, this is enough to ensure that you'll always see the most current version of a file no matter which device you pick up.
But if there are multiple people making changes to the file at the same time on different devices and you're not actively editing the file yourself,
you can enable "monitor" mode (a plugin command, also in the right-click context menu of the view tab).
This refreshes your view every few seconds to pick up changes from group vault.
All these timers are configurable in settings.
vault-share.bobhy.dev).<localVault>, is /vault-share/<localVault>..txt. and .md. Default is "Keep both" (to avoid losing data by default). Options are:<baseName> to <baseName>-conflict-<timestamp>-<device>, so both files can coexist in the vault..md, .txt)!.Log history size entries.
Log is always written to the javascript console, visible when you type Ctrl-Shift-I in Obsidian window.The Connection section lets you set the Google Drive folder path where vault files are shared (e.g. /vault-share/my-vault) and log in or out of your Google account.
The Sharing section controls behaviour:
the Conflict resolution settings determine what happens when the same file has been changed in two vaults — for most files you choose between keeping both versions (renamed with a timestamp) or keeping the newer one; for text files (.md, .txt) you can additionally choose a 3-way merge that combines changes inline.
Exclude rules let you filter which files are shared, one glob-style rule per line (prefix ! to re-include). Sharing interval and Edit holddown control how often background sharing runs and how long to wait after a keystroke before sharing an open file. The Logging section controls log verbosity and whether recent log entries appear in a right-sidebar panel. The Statistics section shows counters for sharing activity and conflicts since the last reset. Finally, Reset plugin logs you out and clears all local share history, useful for starting fresh without deleting vault files.
TBD
Synchronization can be tricky to debug; file names can be changed (due to conflicts), things are happening in multiple places at once and the action is, by design, mostly happening offstage.
If you run into a problem, raise an issue
Please try to describe a simple and reliable way for someone else to reproduce your problem.
Do include a DEBUG log (using the elegant and sophisticated logging features included in the plugin -- see "Log" section in settings!)