Skip to content

Multi-device sync

eden-memory can keep the same memory store in sync across multiple devices. Sync is peer-to-peer: devices exchange signed delta logs, and conflicts are resolved with logical clocks. You can sync two databases on the same host, or sync across different hosts through a lightweight relay.

New to multi-device sync? Read the step-by-step tutorial:

Mode Use case Pairing Best for
Direct sync Two databases on the same machine or shared filesystem Optional pair-device One-shot local backup or shared store
Relay sync loop Devices on different networks Required Continuous sync across laptops, desktops, or servers
  • How sync works — delta logs, logical clocks, conflict resolution, double envelope, PAKE pairing, and key rotation.
  • Sidecar files<db>.sync-keys.json and <db>.root-key.json.
  • Security model — relay threat model, password requirements, and what the relay can and cannot see.

Direct sync between two local databases:

Terminal window
eden-memory --db ~/.eden-memory/local.db \
sync --peer-db /mnt/shared/peer.db --confirm

Start a foreground relay sync loop:

Terminal window
eden-memory --db ~/.eden-memory/device.db \
sync loop start \
--relay-url http://relay.example.com:8787 \
--account-id your-account \
--root-key-passphrase "$(cat passphrase.txt)" \
--confirm

See the CLI reference for every flag and subcommand.