木尘痕70 downloadsManual, confirmation-based vault snapshots through a self-hosted HTTP server.
Manual, confirmation-based snapshots for an Obsidian vault backed by a self-hosted relay server.
Snapshot Relay is provider-neutral: it does not depend on Google Drive, Google Cloud, a particular VPS, or a vendor-specific tunnel. The relay only stores versioned vault snapshots; the plugin controls when a snapshot is previewed, uploaded, or downloaded.
The current release is an early, working implementation. It favors explicit user actions and recoverable snapshots over background synchronization.
The generated main.js is committed so a user can install a release without setting up Node.js.
For a local or development install, copy these three files into the target vault:
.obsidian/plugins/snapshot-relay/
main.js
manifest.json
styles.css
Enable community plugins in Obsidian, then enable Obsidian Snapshot Relay.
For Android, the vault must be stored in a user-accessible local folder. Close Obsidian before copying the files. After enabling the plugin, configure the same relay URL, Vault ID, and token on each device.
The plugin settings contain:
attachments/ or coding/. Rules apply to uploads, remote previews, and downloads on that device. The plugin directory and snapshot-relay-backups/ are always excluded, even if the list is empty or customized.Devices can use different exclusions for the same Vault ID. For example, Android can exclude coding/ while the desktop uploads that directory. Android will skip those remote files when previewing or downloading; existing local files under an excluded prefix are left untouched, and are not backed up or deleted. Excluding a directory does not remove files already downloaded there. After upgrading, remove those unwanted local files manually if needed.
When local backups are enabled, snapshot-relay-backups/ contains recovery copies created before a download modifies or deletes local files. With backups disabled, downloads do not create local backup folders or recovery copies. The directory is always excluded from uploads, remote previews, and downloads, so backups already present in a remote snapshot are skipped and local backups are never recursively copied. Repeated downloads of identical files create no new backups. Existing backup folders are left untouched when switching the setting off.
A Vault ID is a relay namespace, not a Google Drive ID or a local filesystem path. Changing it creates a separate remote namespace.
The relay uses only the Python standard library:
OBSIDIAN_RELAY_TOKEN='replace-me' \
python3 server/server.py \
--host 127.0.0.1 \
--port 8787 \
--root ./data
The service requires a non-empty token. In production, keep it behind an HTTPS reverse proxy and bind the Python service to localhost or a private interface.
Example deployment templates are provided in server/:
All routes below except health require:
Authorization: Bearer <token>
Uploads go to a temporary snapshot directory. The server publishes the snapshot and updates the latest pointer only after the manifest has been completed and every declared file exists.
Requirements:
Run the checks:
npm install
npm test
npm run typecheck
npm run build
python3 -m unittest discover -s server -p 'test_*.py'
The build writes the installable main.js at the repository root.
MIT. See LICENSE.