Skip to content

Devices & recovery

Once sync is initialized, you can enroll more devices and recover a vault if you lose them all. The vault key is never uploaded; every method below hands it over end-to-end or rebuilds it from a phrase you hold.

Both methods end with the same result: the new device holds the vault key and caches it in the OS keychain. They differ only in how the key reaches the new device.

MethodWhat you provideBest when
weft sync pairNothing typed on the new device; you confirm an 8-digit code on both screensYou have access to an already-enrolled device
weft sync joinThe shared passphraseYou only have the passphrase, not another device

Either method can be driven from the CLI or from a GUI. The macOS app has an Add a Device sheet that runs the same pairing flow and shows the same 8-digit code to compare; the iPhone enrols by pairing with an already-enrolled device or by reconstructing the vault from the 24-word recovery phrase. The CLI commands below are the canonical description of what those sheets do.

Pairing transfers the vault key from an enrolled device to a new one without anyone typing the passphrase. It is the recommended path.

On the new device, start pairing. It prints a pairing code.

Terminal window
weft sync pair

On an already-enrolled device, approve that code.

Terminal window
weft sync pair-approve <code>

Both screens then show an 8-digit code — a short authentication string (SAS). Compare the two codes. If they match, confirm on both devices; if they differ, abort. Only after both sides confirm is the vault key handed over.

If you do not have a second device on hand, enroll with the shared passphrase instead.

Terminal window
weft sync join

This derives access from the passphrase you set at weft sync init. After joining, the device caches the vault key locally just like pairing does.

Once a device is enrolled — by pairing or joining — the vault key is cached in the OS keychain:

PlatformStore
macOSKeychain
LinuxSecret Service
WindowsCredential Manager

Because the key is cached, the daemon and weft sync need no passphrase on that device going forward. The passphrase is only for the initial join; the key itself lives in the keychain, not in your bucket.

The recovery phrase is your escape hatch if every device is lost. Print it on a device that already has the vault, and store it offline.

Terminal window
weft sync recovery

This prints a 24-word phrase. Write it down and keep it somewhere physical and private. It can reconstruct the vault key, so treat it with the same care as the key itself — anyone holding it can decrypt your vault.

To rebuild a vault from the phrase on a fresh machine:

Terminal window
# pass the phrase inline, or via stdin / WEFT_RECOVERY_PHRASE
weft sync recover --phrase "word1 word2 ... word24"

Recovery rebuilds the vault from the ciphertext in your bucket using the key the phrase derives. The local SQLite index is not synced; each device rebuilds it from the .html files after recovery.

The iPhone uses this same phrase to enrol when you do not have a second device to pair with: enter the 24-word phrase in the app and it reconstructs the vault key on-device, no daemon involved.

  • One key, never uploaded — The vault key is generated on your first device and never leaves it over the network. Pairing and recovery move or reconstruct that key; the bucket never holds it.
  • Cloud sees only ciphertext — Blobs and manifests are sealed with XChaCha20-Poly1305. Cloud credentials are separate from the vault key and decrypt nothing. A compromised bucket leaks no plaintext.
  • SAS-checked handover — Pairing transfers the key end-to-end. The 8-digit SAS on both screens is what makes it man-in-the-middle resistant. Compare before confirming.
  • Tamper detection — A per-device Ed25519-signed HEAD bound to the manifest by hash, a sealed device registry, and rollback detection mean the cloud cannot forge, splice, or silently roll back your history.

Sync for setup and convergence, and the CLI reference for every flag.