Skip to content

docs: warn about the stale lnd seed and the backup password - #269

Merged
prusnak merged 2 commits into
bitcoinix:masterfrom
ostermayer:docs-lnd-seed-and-backup-password
Nov 18, 2026
Merged

prusnak merged 2 commits into
bitcoinix:masterfrom
ostermayer:docs-lnd-seed-and-backup-password

Conversation

@ostermayer

@ostermayer ostermayer commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

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.nix creates a new wallet and writes its seed to lnd-seed-mnemonic in lnd's data dir. "Migrate existing services to bitcoinix" in docs/configuration.md copies the old data dir with rsync -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. And examples/configuration.nix says to back it up as the wallet seed.

With nix-bitcoin.generateSecrets, services.backups includes the secrets dir, and with it backup-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:

  • The lnd step of the migration section says to copy lnd-seed-mnemonic off 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.
  • The lnd backup note in examples/configuration.nix says that bitcoinix creates the seed file only with a new wallet, and points to the migration section.
  • The backups section of examples/configuration.nix and the description of services.backups.enable say to keep a copy of backup-encryption-password off the node. The example uses the default secrets dir and says so.
  • A 0.2.0 release note points users who already migrated or already run backups to these steps.

There's no backups page under docs/, so the example config and the option description are where the backups are documented.

Testing

  • nix eval .#ciTestInfo passes.
  • nix build .#checks.x86_64-linux.module-config passes.
  • mdbook build passes on the final head, and the built configuration.html has the new lnd step.
  • No VM test, because nothing changes at run time.
  • After the rebase onto master 0d12e6c, module-config, test-runner, ci-workflows and 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.

@github-actions github-actions Bot added area: docs docs/, README, examples/, SECURITY.md, book.toml, assets area: modules modules/ and pkgs/lib.nix labels Nov 15, 2026

@viberaven viberaven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@github-actions github-actions Bot added the status: rebase needed Merge conflicts need to be resolved label Nov 16, 2026
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 seberm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@seberm seberm added this to the v0.2.0 milestone Nov 17, 2026
@ostermayer
ostermayer force-pushed the docs-lnd-seed-and-backup-password branch from fd527e5 to b3ca92c Compare November 18, 2026 00:19
@github-actions github-actions Bot added status: rebase needed Merge conflicts need to be resolved and removed status: rebase needed Merge conflicts need to be resolved labels Nov 18, 2026
prusnak
prusnak previously approved these changes Nov 18, 2026

@prusnak prusnak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@prusnak
prusnak enabled auto-merge November 18, 2026 10:41
@github-actions github-actions Bot removed the status: rebase needed Merge conflicts need to be resolved label Nov 18, 2026
@prusnak
prusnak merged commit d55e4bd into bitcoinix:master Nov 18, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs docs/, README, examples/, SECURITY.md, book.toml, assets area: modules modules/ and pkgs/lib.nix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: the lnd migration keeps a stale seed file and the backup password is stored only inside the backup

4 participants