README file from
GithubPumice
🇺🇸 English | 🇰🇷 한국어
An Obsidian community plugin that syncs your vault with a self-hosted server (pumice-server — required, run it yourself). The goal is to sync instantly, no matter how many files are in the vault.
Overview
- Client: TypeScript, Obsidian community plugin (this repository)
- Server: Python (
asyncioreactor+Twisted), see pumice-server - Transport: a single persistent WebSocket connection, opened automatically once you've logged in and kept open for as long as Obsidian is running — modeled on Obsidian's own built-in Sync plugin, so an edit on one device shows up on another right away instead of waiting for a periodic sync. (Earlier versions used gRPC-Web, one HTTP/2 request per RPC with no live push; this version replaces that entirely.)
- Auth: a static token stored in Obsidian's own secret storage (
App#secretStorage, desktop and mobile alike, no platform-specific code needed)
Key features:
- Vault file sync (delta comparison, only changed files are uploaded/downloaded)
- Sync history browsing and file recovery (
syncHistoryModal,fileRecoveryModal) - Automatic local snapshots with retention (
localSnapshotStore) - Selective publishing of chosen folders (
publishModal) - Localization support (Korean/English,
src/locales)
Requirements
- Node.js (with npm)
- Obsidian 1.13.4+ (
manifest.json'sminAppVersion). The settings tab renders entirely via the declarative settings API (getSettingDefinitions()), so it's searchable from Obsidian's own settings search; there's no legacy/imperative fallback UI to keep in sync.
Building
npm install
# Development mode (watch)
npm run dev
# Production build
npm run build
# Type-check only
npm run lint
main.js is generated by esbuild from src/. For releases, it's built alongside
manifest.json and styles.css and attached as a GitHub Release artifact.
Releasing
Pushing a tag runs .github/workflows/release.yml, which
builds the plugin and creates a GitHub Release with main.js, manifest.json, and
styles.css attached (this is also what tools like BRAT, and the official Community Plugins
installer, expect to find). The tag must match manifest.json's version exactly, with no
v prefix.
Bump the version with npm version, which syncs manifest.json and versions.json (via
scripts/version-bump.mjs, wired up as the version lifecycle script) and creates a matching
git tag (.npmrc disables npm's default v prefix):
npm version patch # or minor / major
git push --follow-tags
versions.json maps each released plugin version to the minAppVersion it required at the
time — Obsidian's installer uses it to pick a compatible release for users on older app
versions, which matters once this plugin is submitted to the Community Plugins list.
Installing locally in Obsidian for testing
- Run
npm run buildto generatemain.js. - Create a
.obsidian/plugins/pumice/folder in your vault and copymain.js,manifest.json, andstyles.cssinto it. - Enable Pumice under Settings → Community plugins in Obsidian.
How sync works
Once you've logged in (Settings → Pumice → "Log in", which opens the server's login page in your system browser and hands a token back to Obsidian), the plugin keeps one WebSocket connection to the server open for as long as Obsidian is running — there's no separate "enable live updates" toggle or sync-interval setting to configure, matching how Obsidian's own official Sync works. That connection is what:
- pushes local edits to the server (debounced briefly so a burst of keystrokes becomes one upload, not one per keystroke),
- receives other devices' changes and applies them immediately, and
- runs a full safety-net sync every 30 seconds regardless of push activity, so nothing gets permanently stuck even if a push notification is ever missed.
The status bar icon reflects this connection the same way Obsidian core Sync's own icon does — hover it for a short status ("Syncing…", "Fully synced", "Sync error", etc.). Manually triggering a sync (ribbon icon or the command palette) still shows a toast notification; the automatic background activity above stays silent unless something actually fails.
If the connection drops (network blip, server restart, laptop sleep), it reconnects on its own with backoff and catches up on just what changed while it was gone — it doesn't rescan the whole vault on every reconnect.
Settings
| Setting | Default | Description |
|---|---|---|
| serverHost | localhost | Pumice server address |
| serverPort | 8080 | HTTP + WebSocket port |
| useTls | false | Use TLS (recommended for remote servers) |
| deviceName | Obsidian Client | Name identifying this device |
| userName | Obsidian User | User name |
| syncFiles | true | Whether to sync files |
| syncBookmarks | true | Whether to include bookmarks (.obsidian/bookmarks.json) |
| syncPlugins | false | Sync installed community plugins' code/manifest (off by default — this syncs executable code, a bigger trust boundary than note content) |
| syncPluginData | false | Also sync each plugin's own data.json (off by default — commonly holds secrets like API tokens in plaintext) |
| ignorePatterns | see below | Path patterns excluded from sync |
| conflictResolution | server-wins | Which side wins for a non-text file, or a text file with nothing to merge against (server-wins / client-wins) — text files (notes, .json/.css/.js/.base/.canvas) always attempt a 3-way merge first, regardless of this setting |
| enableE2EE | false | Enable end-to-end encryption |
| publishIncludeFolders / publishExcludeFolders | - | Folders to include/exclude when publishing |
| localSnapshotIntervalMinutes | 5 | Local snapshot interval (minutes) |
| localSnapshotKeepDays | 7 | Local snapshot retention (days) |
Default exclude patterns (ignorePatterns / publishExcludeFolders):
.obsidian/workspace
.obsidian/workspace.json
.obsidian/workspace-mobile.json
.obsidian/cache
.obsidian/plugins/pumice
.trash
The vault's folder name is its identity on the server. There's no separate vault ID — the vault's folder name is used as-is to key everything server-side (sync, publish, version history). Every device syncing the same vault needs a folder with the exact same name; a mismatch isn't rejected, it just syncs as an unrelated vault. The settings tab shows the current vault's name for this reason.
"Publish current file" requires
publish: truein the note's frontmatter. Folder-level inclusion (publishIncludeFolders) doesn't need it, but the single-file force-publish action won't upload a file until its frontmatter says so — otherwise a file could go live on the server yet silently fall out of scope on the next folder-wide publish scan, which is frontmatter-driven.
Project structure
pumice/
├── src/
│ ├── main.ts # Plugin entry point; owns the live connection lifecycle
│ ├── settings.ts # Settings types and defaults
│ ├── settingsTab.ts # Settings panel UI
│ ├── syncClient.ts # Sync orchestration (scan/E2EE/conflict-resolution/hashing)
│ ├── syncTransport.ts # Transport-agnostic interface syncClient.ts talks to
│ ├── wsTransport.ts # WebSocket protocol layer (framing, heartbeat, reconnect)
│ ├── wsSyncTransportAdapter.ts # Adapts wsTransport.ts to the syncTransport.ts interface
│ ├── liveUpdates.ts, liveStatus.ts # Reconnect backoff; status bar icon/state model
│ ├── syncHistoryModal.ts # Sync history UI
│ ├── fileRecoveryModal.ts # File recovery UI
│ ├── publishModal.ts # Selective publish UI
│ ├── localSnapshotStore.ts # Local snapshot management
│ ├── contentHashCache.ts # Persists per-file content hashes (mtime+size keyed)
│ ├── concurrency.ts # mapWithConcurrency / streamWithConcurrency helpers
│ ├── diffView.ts # File diff view
│ ├── swipeNavigation.ts # Mobile swipe navigation
│ ├── tokenStore.ts # Auth token storage (App#secretStorage)
│ ├── errorMessage.ts # Error-to-string helper
│ └── i18n.ts, locales/ # Localization strings
├── scripts/
│ └── version-bump.mjs # Syncs manifest.json/versions.json, run by `npm version`
├── main.js # Generated by esbuild
├── manifest.json # Obsidian plugin manifest
├── versions.json # Plugin version → minAppVersion map
└── esbuild.config.mjs # Build configuration
Contributing
- Fork the repository and create a branch.
- Run
npm run lintafter your changes to make sure there are no type errors. - Keep commit messages concise and focused on the reason for the change.
- Open a Pull Request. Include screenshots for UI changes.
Please use GitHub Issues to report bugs or suggest features.
Support
If you'd like to sponsor this project, reach out at [email protected]. Sponsorships make a real difference in how much time can go into development.