About this project
PKV Sync lets you run your own synchronization service for Obsidian vaults instead of relying on a managed cloud. It is distributed as a single binary that stores metadata in one SQLite database and keeps each vault as a bare git repository, so no cluster, object storage or managed service is required. The README is written in English and the project is licensed AGPL-3.0-only.
Core capabilities described in the README:
- Multi-user, multi-vault sync over authenticated devices, with per-vault push locks and idempotent retries.
- Real-time push: small edits arrive sub-second over Server-Sent Events, with polling retained as a fallback.
- Git as the source of truth: each vault is a bare git repo, giving per-file history, unified diff and single-file restore in both the plugin and the admin panel.
- Conflict handling: the plugin does not silently overwrite local edits; conflicts appear as .conflict-* files with a one-click resolver.
- Admin panel available in five languages (English, Simplified Chinese, Traditional Chinese, Japanese, Korean) for users, device tokens, vaults, invites, activity and blob garbage collection, with confirmation dialogs for destructive actions.
- MCP read/write tools exposed over stdio, standalone Streamable HTTP, or an embedded /mcp route on the server process, aimed at AI-readable vaults.
- Safety defaults: setup-grade password policy for admin-created passwords, one-time token secrets, size caps on uploads and MCP responses, and revalidation of revoked tokens on live SSE streams.
Deployment: the recommended path is Docker Compose with Caddy in deploy/caddy/ terminating HTTPS via Let's Encrypt, while the server listens on 127.0.0.1:6710 inside the compose network. Setup requires a domain with A/AAAA records and ports 80 and 443 reachable. Steps include generating a deployment key with the genkey command, creating config.toml with server, storage, network and MCP sections, editing the Caddyfile for your domain, running docker compose up -d, then creating the first administrator at the /setup URL and installing the plugin zip into the vault's .obsidian/plugins/pkv-sync/ folder. Native installs, reverse-proxy tuning (Caddy, Nginx, Traefik), public_host semantics, backup/restore and disk encryption are covered in a deployment hardening guide.
MCP modes: embedded mode is opt-in via a config flag that mounts /mcp on the main server port, sharing TLS termination, reverse proxy, deployment key and bearer token enforcement; standalone mode runs a separate process bound to a chosen address, described as useful for air-gapped setups or independent scaling.
Obsidian plugin: local files remain the source of truth, and the plugin reads and writes the normal vault on disk. Non-sensitive settings and sync indexes are stored in the plugin's data.json inside the vault, while login state, the active bearer device token, deployment key and device identity live in Obsidian's device-local storage. Device tokens renew on use, expire after 90 idle days and have a 365-day absolute lifetime; logging in again on the same device rotates the active token. Day-to-day features include a command palette, file history, side-by-side diff, conflict resolution, selective .obsidian sync, device management and self-update, documented in a user manual.
Encryption status: the README states that version 1.0 does not yet ship native end-to-end encryption and that the server can read vault contents. Native per-vault E2EE is planned as an opt-in mode on the 1.x roadmap, since encryption trades away server-side features such as history diff, three-way auto-merge, inline SSE payloads and MCP read/write. As a workaround, git-crypt can be layered on the vault so marked paths reach the server as ciphertext blobs, while filenames remain plaintext on the server; standard git clone and the materialize command still work for clients holding the key. The README also recommends HTTPS, restricted trusted_proxies, encrypted data disks and encrypted backups for real deployments.
Releases and status: the README lists documentation for plugin usage, server administration, CLI reference, upgrade notes, deployment hardening, an OpenAPI spec, MCP setup, an LLM-maintained wiki workflow and migration from Obsidian Sync. Each GitHub release publishes Linux amd64/arm64 binaries, a Windows x64 binary, a multi-arch GHCR Docker image, the Obsidian plugin zip and SHA256SUMS. Version 1.5.1 is described as a visual redesign of the admin panel and plugin plus a documentation alignment pass with a CI docs guard; 1.5.0 covers an audit remediation and performance work including blob retention tied to git object liveness, path validation, rate limits, non-blocking SSE shutdown, allowlisted .obsidian sync and batched git reads. The public REST API, CLI, storage layout, plugin package and Docker image are versioned together under semver, with the OpenAPI spec as the compatibility contract; SQLite databases from 0.x cannot be upgraded in place to 1.0.0. Development commands cover cargo fmt, clippy and test plus plugin typecheck, vitest, and build, with CI running a Rust matrix on Linux and Windows, plugin checks, a Docker build and release-binary smoke tests.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.