vinci000798 downloadsPassword-confirmed Git sync with optional encrypted remote note snapshots.
Secure Git Sync is an Obsidian desktop plugin for password-confirmed Git sync, optional encrypted remote note snapshots, and direct LAN vault sync.
Secure Git Sync is built for users who already use Git to back up or move an Obsidian vault, but want stronger control over private notes and local-first workflows.
The plugin can:
.git repository and import its configured remotes..git/config remotes without rewriting their URLs..secure-git-sync/index/.data.json into .secure-git-sync/local-cache.json.release/.Secure Git Sync is not a hosted sync service. It is a local-first Obsidian plugin that uses the Git remotes and devices you choose.
Its main split is local usability versus remote privacy:
The plugin also tries to cooperate with existing Git workflows. If a vault already has remotes in .git/config, you can import and reuse them instead of forcing the plugin to recreate the remote setup.
When encrypted Git sync is enabled, the remote repository stores notes in this layout:
.obsidian/ # selected Obsidian settings, plaintext
.secure-git-sync/
manifest.enc # legacy full encrypted manifest
manifest-index.enc # encrypted shard index
manifest-shards/
00.enc # encrypted manifest shard
...
keyring.json # optional password-wrapped vault key
objects/
ab/<object-id>.enc # encrypted note object
The plugin uses a random 256-bit vault key for note content. The administrator password wraps that vault key. New keyrings use Argon2id, while older PBKDF2-SHA-256 keyrings can still be unlocked and migrated.
Each note object is encrypted with AES-256-GCM. The vault-relative path is used as authenticated additional data, binding encrypted content to its intended path.
LAN sync is designed for trusted devices on the same Wi-Fi or local network.
Because LAN sync starts a local HTTP listener and UDP discovery listener, your operating system firewall may ask whether Obsidian can communicate on the local network.
The plugin is organized around these modules:
src/main.ts: Obsidian plugin entry point, commands, setting tab, modals, operation panel, unlock flow, progress UI, and LAN controls.src/git.ts: Git orchestration, encrypted push/pull/sync, plaintext compatibility, conflict handling, remote import, manifest management, and performance cache.src/lan.ts: Local network discovery, peer HTTP server, device manifest comparison, and direct file transfer.src/crypto.ts: Password verification, key wrapping, key migration, AES-GCM encryption, decryption, and hashing helpers.src/providers.ts: Hosted Git provider integrations for repository browsing and creation.src/types.ts: Settings, remotes, providers, password config, sync state, cache types, and LAN settings.release/build-release.mjs: Build and package script for release artifacts.The Git sync engine uses Git subprocesses, but guards command execution with an allowlist and path checks. Git is only run inside the vault or the plugin's internal temporary/cache workspaces.
Encrypted sync now favors a single remote session:
Expensive checks are now more selective:
Encrypted mode treats notes as encrypted remote objects. Selected Obsidian configuration can still be synchronized as plaintext.
The plugin excludes noisy or unsafe runtime state, including:
.git/.secure-git-sync/.secure-git-sync-conflicts/.secure-git-sync-trash/data.json, cache.json, and workspace.jsondata.jsonPlugin runtime sync only includes the runtime artifacts needed by Obsidian:
manifest.jsonmain.jsstyles.cssInstall the built plugin files into this Obsidian plugin folder:
<vault>/.obsidian/plugins/secure-git-sync/
Runtime files:
manifest.json
main.js
styles.css
Then enable Secure Git Sync in Obsidian's Community plugins settings.
Install dependencies:
npm install
Build a local plugin folder under release/:
npm run build
Create a full release package:
npm run release
Release output:
release/secure-git-sync-<version>/
manifest.json
main.js
styles.css
release/secure-git-sync-<version>.zip
release/secure-git-sync-<version>.sha256
The repository root must not contain generated main.js. Build and release artifacts are kept under release/.
If Secure Git Sync helps your Obsidian workflow, support links are reserved here for future use:
Thank you for helping keep the plugin maintained, tested, and improved.
GitHub Actions release automation lives at .github/workflows/release.yml. It can run manually, by pushing an x.x.x version tag such as 0.2.1, or by changing the plugin version on main. The action builds the release package and publishes a GitHub Release for <manifest.version> when that release does not already exist.