Recover from a lost passphrase
When a passphrase is gone, your key’s 24 words are what rebuilds the key. Nobody else holds a copy they can open, so nobody else can reset it.
Which passphrase you lost
| Passphrase | It locks | Lost it |
|---|---|---|
Forge key passphrase, set on the account page or at your first loot login | The copy of your key the forge keeps | Restore with the 24 words and choose a new one |
Custody passphrase, offered by loot init or set by loot id lock | .loot/id and the keyring in one repo | Re-lock the repo in place with the 24 words and choose a new one |
Export passphrase, set by loot id export | That export file | The file is useless. Export again from a machine that holds the key |
Write the words down now
The words are your 32-byte key spelled from the BIP39 English word list. Nothing derives from them: they are the key, in the clear. The browser shows a forge key’s words once, when it makes the key. For a repo’s key, run this in a terminal while the repo still opens:
loot id phrase
It refuses a pipe, a redirect or a captured subprocess, with no override, so read the words off the screen. The words are a person’s backup. A script or an agent backs the key up with loot id export <file> --passphrase-file <file> instead. Words you did not take before the key was lost cannot be produced afterwards.
Lost the forge passphrase
On the forge’s account page, choose I have my 24 words, enter them and a new passphrase. The words regenerate the exact key, and the new passphrase replaces the stored copy. In a repo that already holds the key, loot login asks for no passphrase.
Lost the custody passphrase
In the locked repo, run loot id recover and paste the words. The keyring is sealed to your key, not to the passphrase, so the words re-lock the repo in place under a new passphrase it asks for, and nothing local is lost:
loot id recover # paste the words, then Ctrl-D (Ctrl-Z, Enter on Windows)
It refuses words for any other key and changes nothing. Only .loot/id is rewritten, encrypted, and the keyring is left as it is. From a script, set LOOT_PASSPHRASE to the new passphrase.
Lost the repo
loot id recover also rebuilds the keypair in a repo that opens. So start a new repo, put the key in place of the one loot init minted, and take back what your pushes left on the remote:
mkdir rebuilt && cd rebuilt loot init --identity alice loot id recover --replace # paste the words, then Ctrl-D (Ctrl-Z, Enter on Windows) loot whoami --pubkey # must match your old key loot remote add origin <url> loot fetch loot pull-grants loot rehome
loot id recover reads stdin, never an argument, so the words stay out of your shell history. A mistyped word fails its checksum: the phrase's checksum does not match.
What comes back is what the remote holds for you. Internal content comes with the history. Restricted content comes back where a push deposited a standing self-grant for your key: a relay keeps them for Restricted paths, a forge for Internal and embargoed ones too. Anything you never pushed is gone with the old repo.
Why nobody else can help
- The forge stores your public key and your key encrypted under your passphrase: ciphertext it cannot open. There is no escrow and no support reset.
- Resetting your forge account password does not touch your key. The two are separate.
- A relay never receives your private key, and stores Restricted content as ciphertext it cannot read (see Relays and hosts).
The other backup is a loot id export file kept off the machine, which loot id import --replace reads in place of loot id recover --replace above. Either keeps the key it replaces at .loot/id.rotated-<time>. Known issues covers what losing a key costs.