Repository navigation
docs: warn about the stale lnd seed and the backup password - #269
Conversation
viberaven
left a comment
There was a problem hiding this comment.
Reviewed fd527e5200cf.
No actionable findings. Checked the migration warning against LND wallet initialization and the rsync -a workflow, and the backup-password guidance against the generated duplicity environment and backup file list. The documentation correctly distinguishes the newly generated wallet seed from the migrated wallet seed and requires an independent copy of the backup password. The mdBook build passes; no runtime behavior changes.
Review performed with Codex (GPT-6 Astra).
Two documented steps left users with a recovery file that recovers nothing. When lnd starts without a wallet, as after the first deploy, it creates a new wallet and writes its seed to lnd-seed-mnemonic. The migration steps copy the old data dir with `rsync -a`, which keeps that file. lnd reads it only to create a wallet, so nothing notices that it doesn't match the migrated wallet. And examples/configuration.nix says to back it up as the wallet seed. The lnd migration step now says to delete the file before the copy, and that the seed of a migrated wallet is the seed of the old node. With generateSecrets, the backups include the secrets dir, and with it backup-encryption-password, the password that decrypts them. No copy of it exists outside the node and the backups. The backups section of examples/configuration.nix and the description of services.backups.enable now say to keep a copy off the node. Fixes bitcoinix#124. Assisted-by: Claude Code (Claude Opus 5.5)
seberm
left a comment
There was a problem hiding this comment.
LGTM, no must- or should-fix items. Checked the new steps against the seed and wallet creation in modules/lnd.nix and the secrets handling in modules/backups.nix: the stale-seed explanation, the scp/rm order and the backup-password advice are accurate.
Needs a rebase: docs/release-notes.md conflicts. The next release is v0.2.0, so the ## 0.1.7 entry moves into the existing ## 0.2.0 section. Nothing else changes.
Assisted-by: Claude Code (Claude Opus 5.5)
fd527e5 to
b3ca92c
Compare
Fixes #124.
Two documented steps left users with a recovery file that recovers nothing.
When lnd starts without a wallet, as after the first deploy,
modules/lnd.nixcreates a new wallet and writes its seed tolnd-seed-mnemonicin lnd's data dir. "Migrate existing services to bitcoinix" indocs/configuration.mdcopies the old data dir withrsync -a, which keeps that file. lnd reads the file only to create a wallet, so nothing notices that it doesn't match the migrated wallet. Andexamples/configuration.nixsays to back it up as the wallet seed.With
nix-bitcoin.generateSecrets,services.backupsincludes the secrets dir, and with itbackup-encryption-password, the password that decrypts the backups. No copy of it exists outside the node and the backups. So when the node's disk dies, the backups can't be decrypted.This PR changes only docs and one option description:
lnd-seed-mnemonicoff the node and remove it before the copy, and to keep that copy if the new wallet got funds, because the migration replaces that wallet. It says the seed of a migrated wallet is the seed of the old node. Users who migrated before get a paragraph on how to tell which seed the file holds.examples/configuration.nixsays that bitcoinix creates the seed file only with a new wallet, and points to the migration section.examples/configuration.nixand the description ofservices.backups.enablesay to keep a copy ofbackup-encryption-passwordoff the node. The example uses the default secrets dir and says so.There's no backups page under
docs/, so the example config and the option description are where the backups are documented.Testing
nix eval .#ciTestInfopasses.nix build .#checks.x86_64-linux.module-configpasses.mdbook buildpasses on the final head, and the builtconfiguration.htmlhas the new lnd step.module-config,test-runner,ci-workflowsand the mdBook build pass on the KVM host.Models
Claude Opus 5.5 wrote the change. Codex GPT-5.6 Sol, Codex GPT-6 Astra (two passes plus rechecks), Kimi K3.1 Pro (two passes), DeepSeek V4.1 Flash 1017 and GLM 5.3 reviewed it. Claude Opus 5.5 rebased it onto #224.