Karan Parashar41 downloadsSynchronise your vault between your devices through your own server.
Synchronise your Obsidian vaults between your own devices, through a small server you host yourself.
Red Sync is a self-hosted alternative to a sync subscription. Changes appear on your other devices within a second or two, even in a note open on both. A family can share one server, with each person's vaults kept apart and, if they like, end-to-end encrypted so that not even the server's owner can read them.
Install Red Sync from Obsidian's community plugins: Settings → Community plugins → Browse, search for 'Red Sync', then Install and Enable.
That is all. The status bar shows 'Synchronised', 'Synchronising', or 'Offline' with how many changes are waiting.
.obsidian) is not synchronised.Is there a hosted service? No. You run the server, or use one run by someone you trust.
Can I turn on encryption later? No: it is chosen when a vault is created. To encrypt an existing vault, disconnect every device, then select 'Start a new vault' on one of them with a new invite code.
What if I forget the passphrase? Any device already set up still works and passes it on through Add a device. If every device is lost, encrypted notes cannot be recovered; that is the point of the encryption.
Does it work alongside Obsidian Sync or another sync tool? Use one sync tool per vault; two would fight over the same files.
On a machine with Docker, an HTTPS reverse proxy, and an R2 bucket with an API token limited to that bucket:
git clone https://github.com/whyredfire/obsidian-redsync.git && cd obsidian-redsync/deploy
cp .env.example .env # the R2 details
docker compose up -d # pulls ghcr.io/whyredfire/obsidian-redsync
The server listens on 127.0.0.1:8080. Point your reverse proxy at it with HTTPS, and let it pass WebSocket upgrades (devices keep one open at /v1/ws). Litestream copies database changes to R2 every 10 seconds, and restores it on start when the disk is new.
Add people and give each their invite code:
docker compose exec server redsync-server user add mum --quota 10GB
docker compose exec server redsync-server help # every command
The chart in chart/ runs the server with Litestream as a sidecar, on one pod with a volume (SQLite allows a single writer, so it never runs two):
kubectl create secret generic red-sync-r2 --from-literal=AWS_ACCESS_KEY_ID=… --from-literal=AWS_SECRET_ACCESS_KEY=…
helm install red-sync ./chart --set r2.endpoint=https://<account-id>.r2.cloudflarestorage.com,r2.bucket=redsync,r2.existingSecret=red-sync-r2
kubectl exec deploy/red-sync -c server -- redsync-server user add mum
Route HTTPS to the red-sync Service on port 8080 with your own Ingress, or set httpRoute.enabled for a Gateway API route. See chart/values.yaml for everything else.
R2 holds every file, its versions from the last 30 days, a snapshot of each vault every 6 hours (kept for 30 days), and (through Litestream) the server's database.
| Lost | Recovery |
|---|---|
| The VPS | A new VPS with the same .env; docker compose up -d restores the database from R2. |
| The database and its R2 copy | redsync-server restore rebuilds it from the newest snapshots; devices upload anything newer. |
| The server for good | REDSYNC_STORE=s3://bucket REDSYNC_PASSPHRASE=… redsync-server export <vault-id> <folder> writes a vault as plain files (with the AWS_* variables for R2). |
.obsidian folder excepted) and writes the changes that come from your other devices.The repository holds the plug-in (plugin/, TypeScript), the server (server/, Rust with SQLite), and a test bench (testbench/: two real Obsidian devices in containers, driven by scripts).
cd plugin && bun install && bun run build && bun run test
cd server && cargo test
cd testbench && docker compose up -d --build && bun install
bun run smoke # both devices load the plug-in
bun run sync # synchronisation checks (bun run sync:encrypted: set up through the dialogues, encrypted)
bun run fuzz -- --seed 7 # random use of both devices with network loss (--safe: also checks no line is lost)
bun run drill # the server loses its database and is restored from a snapshot
Watch the test devices at https://localhost:47381 and https://localhost:47382.
Releases: run the 'release' workflow with a version such as 2.0.0. It publishes the plug-in as a GitHub release and the server image to ghcr.io/whyredfire/obsidian-redsync (2.0.0 and latest, for amd64 and arm64). The image is built before the plug-in is released, so a failed build stops the release.
MIT; see LICENSE.