Prasit Singzom31 downloadsSync your vault across desktop and mobile through your own Google Drive (appDataFolder).
Sync your Obsidian vaults across desktop and mobile through your own Google Drive. One plugin for desktop and mobile (iOS, Android). No server, no third-party sync service, and no one else's app in the middle: you sign in with your own Google Cloud OAuth client.
⚠️ Early software. Back up your vault before the first sync. NSync moves and deletes files to keep devices in step. It has safety checks, but a backup is the only real undo.
Files are stored in your Google Drive's hidden appDataFolder, which only
the OAuth client that created it can read. NSync asks for the narrow
drive.appdata scope and cannot see any of your other Drive files.
Each sync compares three states per file: this device, Google Drive, and the last successful sync. From that it decides to upload, download, delete, or keep both copies on a conflict.
NSync connects to:
accounts.google.com, oauth2.googleapis.com to sign inwww.googleapis.com for the Google Drive APInesprasit.github.io/nsync/callback.html, mobile sign-in only. It's a
static page that hands Google's sign-in code back to Obsidian. It stores
nothing, and the code is useless without a secret that never leaves your
device. You can host your own copy (callback.html) and set
its URL in settings.No analytics or telemetry.
You need a Google Cloud OAuth client of your own. It's free and takes about 10 minutes, once. Every device and vault can then reuse it.
NSync), your support email, your developer
contact email.https://nesprasit.github.io/nsync/https://nesprasit.github.io/nsync/privacy.html
(or your own pages if you host the bridge yourself).https://www.googleapis.com/auth/drive.appdata.http://127.0.0.1:42813https://nesprasit.github.io/nsync/callback.html⏳ Changes to redirect URIs can take a few minutes to a few hours to apply.
redirect_uri_mismatchright after setup usually just means "wait".
Pick one. BRAT is easiest, especially on a phone, and keeps NSync up to date.
BRAT installs plugins straight from their GitHub releases. Do this in each vault where you want NSync:
nesprasit/nsync, keep Latest version, tick
Enable after installing the plugin, then Add plugin.Updates: BRAT can check for new releases when Obsidian starts (turn on its auto-update option), or run BRAT: Check for updates to all beta plugins from the command palette. Updating only replaces the plugin files; your NSync settings and sign-in are kept.
main.js, manifest.json and styles.css from the
latest release.<your vault>/.obsidian/plugins/nsync/ (create the folder;
.obsidian is hidden, so on macOS press Cmd+Shift+. in Finder to see it).On iPhone/iPad the Files app can't open the hidden .obsidian folder, so use
BRAT there.
Once NSync is listed in Obsidian's community plugin browser, you can install it there instead and let Obsidian handle updates.
On a phone, Sign in opens a small window. Tap Open Google sign-in. After you allow access, Safari/Chrome sends you back to Obsidian.
| Sync now | ribbon 🔄, command NSync: Sync now, or click the status bar |
| Status (desktop) | status bar cloud: green = synced, spinning = syncing, red = failed |
| Browse Drive | command NSync: Show files on Google Drive |
| Auto-sync | on by default, every 60 s while Obsidian is open (settings) |
On mobile, Obsidian only runs plugins while the app is open, so syncing happens when you open the app and when you press sync. There's no background sync.
appDataFolder are not end-to-end encrypted. Google can read them,
as with any Drive file..obsidian settings, themes and plugins are not synced.npm install
npm run dev # esbuild watch
npm run build # typecheck + production bundle (main.js)
npm test # unit tests (node --test + tsx)
npm run lint # the same ESLint rules Obsidian's plugin review runs
src/
├── main.ts plugin entry, sync scheduling, auth glue
├── settings.ts settings tab
├── auth/ OAuth client, PKCE, desktop loopback + mobile bridge flows
├── drive/driveClient.ts Google Drive REST (appDataFolder)
├── sync/ reconcile (pure), engine, namespaces, tombstones, progress
└── ui/ status bar, modals
Design notes: CONTEXT.md and docs/adr/.