Bidirectional sync between your Obsidian vault and Google Drive.
- Bidirectional sync with automatic and manual triggers
- Timestamp-based three-way diff — latest modification wins on conflict
- Resumable uploads for large files (>5MB)
- Configurable sync interval and exclude patterns
- Works on both desktop and mobile
- Duplicate file detection and cleanup on Google Drive
git clone https://github.com/rayjun/obsidian-google-drive-sync.git
cd obsidian-google-drive-sync
./install.sh # Build only
./install.sh /path/to/vault # Build and install to vaultDownload manifest.json, main.js, styles.css from the Releases page, and place them in .obsidian/plugins/google-drive-sync/ inside your vault.
git clone https://github.com/rayjun/obsidian-google-drive-sync.git
cd obsidian-google-drive-sync
npm install
npm run buildCopy manifest.json, main.js, styles.css to .obsidian/plugins/google-drive-sync/ in your vault.
- Install the plugin on desktop first (via any method above), making sure the plugin files are inside the vault's
.obsidian/plugins/google-drive-sync/directory - Move the vault to the Obsidian iCloud directory on your Mac:
mv /path/to/your/vault ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/
If this directory does not exist, open Obsidian on your iPhone first and create a new vault with "Store in iCloud" enabled. This will create the directory on your Mac.
- Wait for iCloud to sync (may take a few minutes depending on vault size)
- Open Obsidian on your iPhone — the vault should appear automatically
- Go to Settings > Community Plugins > disable Restricted Mode > enable Google Drive Sync
- Enter Client ID and Client Secret, tap "Login to Google Drive"
- Complete authorization in the browser, copy the authorization code, go back to plugin settings and paste it
- Create an OAuth 2.0 client in Google Cloud Console (choose Desktop app type)
- Enable the Google Drive API
- Add your Google account as a test user under OAuth consent screen > Test users (required while the app is in "Testing" status)
- Open Obsidian Settings > Google Drive Sync
- Enter your Client ID and Client Secret
- Click "Login to Google Drive" to authorize
- Sync starts automatically after login
On desktop, authorization completes automatically. On mobile, copy the authorization code from the browser and paste it in the plugin settings.
If duplicate files appear on Google Drive (e.g., due to interrupted syncs), you can clean them up:
- Open the command palette (
Cmd/Ctrl + P) - Search for "Google Drive Sync: Remove duplicate files from Google Drive"
- The plugin will scan for files with the same path, keep the newest copy, and delete the rest