Sync: your notes on every device

Alexandria sync keeps a workspace available on multiple devices. It is end-to-end encrypted and zero-knowledge: the server stores ciphertext, an encrypted manifest, and a non-reversible token hash. Your passphrase and keys never leave your devices.

Sync v1 is file-level blob sync for a single user on a trusted LAN or self-hosted network. Conflicts use last-write-wins by modification time.

Run the server

Run akb-sync-server on an always-on machine:

akb-sync-server --bind 0.0.0.0:4000 --data-dir /var/lib/akb-sync

The server stores encrypted workspace data under the data directory. It does not store plaintext notes, file names, keys, passphrases, or raw tokens.

If the server's data volume fills up, Alexandria reports sync server storage is full. Free space on that volume, then retry the sync.

Clone a workspace

On the first device, register a workspace and push the local folder:

akb --root ~/akb/mykb sync clone mykb http://HOST:4000

Use a strong passphrase. On every other device, use the same workspace name (mykb) and the same passphrase:

akb --root ~/akb/mykb sync clone mykb http://HOST:4000

The master key is derived locally from the workspace name and passphrase. The key never leaves the device.

Sync day to day

Push local changes and pull remote changes:

akb --root ~/akb/mykb sync

Continuously sync on changes and poll for remote changes:

akb --root ~/akb/mykb sync watch

Preview what sync would do without transferring data:

akb --root ~/akb/mykb sync status

List configured vaults, lock state, and cache countdown:

akb sync list

Passphrases and cache

The passphrase is the only secret you need to share between your own devices. After unlock, Alexandria caches a wrapped key for a limited time so repeated syncs do not prompt every time. When the cache expires, enter the passphrase again.

What sync includes

Sync transfers only the workspace layout: regular files under notes/, media/, and trash/, any relative in-workspace symlinks within those trees, and top-level preferences.json. Caches (including the derived index/), .git/, dotfiles, and stray files are ignored.

v1 caveats