Skip to content

secrets: reject empty secret files and write generated keys atomically - #244

Merged
prusnak merged 11 commits into
bitcoinix:masterfrom
ostermayer:secrets-empty-and-atomic
Nov 13, 2026
Merged

prusnak merged 11 commits into
bitcoinix:masterfrom
ostermayer:secrets-empty-and-atomic

Conversation

@ostermayer

@ostermayer ostermayer commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #56.

A failed or interrupted run could leave an empty or partial secret, key or wallet behind, and setup accepted it. Some of these blocked every later start. Others let services start with an empty credential.

  • setup-secrets fails when a declared secret is empty or isn't a regular file. nix-bitcoin.secrets.<name>.allowEmpty covers a secret that may be empty. backup-encryption-env sets it, because an env file for unencrypted backups has nothing in it.
  • Generated secrets go through a mktemp file next to the target, then a synced mv -fT. A directory at the target fails instead of receiving the file.
  • Identity keys (the TLS key, the WireGuard keys, the replication SSH key) are created only when the path is absent. An empty key, or a symlink to a missing file, fails with a message that says to restore the key or delete it, and what a new key breaks. Nothing replaces a key that might still be in use.
  • Derived parts are rebuilt on every run: the WireGuard public keys from the private keys, the replication .pub (best effort, so encrypted and agent-held keys keep theirs), and the TLS cert from its key when it's missing, empty, unreadable, or the alt names changed.
  • The backup passphrase is read into a checked variable, so an empty one is never written to the env file.
  • lnd creates its seed only when the file is absent, through a synced temp file. An empty seed, or a symlink to a missing file, stops lnd while there's no wallet yet. lnd creates a wallet only when wallet.db is absent, and a symlink to a missing file there fails before any seed is made. init-wallet runs in a temp dir, and wallet.db moves into place only after it succeeds, which is the fix for lnd: a failed init-wallet leaves a wallet.db that blocks wallet creation on later starts #56.
  • A 0.1.6 notice, for setup-secrets and lnd users, and an upgrade section, including how to recover a node already stuck by lnd: a failed init-wallet leaves a wallet.db that blocks wallet creation on later starts #56.

Tested

On my KVM host:

  • setup-secrets: a missing, empty and directory secret each fail with a clear error.
  • TLS: a missing, empty or broken cert is rebuilt with the same key, and an empty key fails and stays as it is.
  • WireGuard: a missing, empty or wrong public key is rebuilt, and an empty private key fails and stays as it is.
  • Replication: module-config runs the real key generator for the .pub rebuild, an encrypted key, a public-key-only identity, an empty key and a symlink to a missing file.
  • A newline-only backup password fails and leaves the env file alone.
  • lnd-wallet-init: a wallet init that fails on an empty password leaves no wallet.db, and the next start creates the wallet with the same seed. An empty seed stops lnd.
  • The new checks fail on master. module-config, test-runner, shellcheck, the deployment examples and the setup-secrets, default, netns, netnsRegtest and wireguard-lndconnect scenarios pass.

These stay as they are on master and aren't part of this PR: an empty password (also backup-encryption-password) is still regenerated even when existing state depends on it, HMAC regeneration still goes by file mtimes, and a TLS key and cert aren't checked against each other.

Opus 5.5 wrote this. Codex GPT-6 Astra and Kimi K3.1 Pro reviewed it twice each over six rounds. Among other things, they found that regenerating empty keys could silently replace a working WireGuard client's key, and that an encrypted SSH key would break setup. Both are fixed. GPT-5.6 Sol and Astra also reviewed each round's changes. Kimi K3.1 Pro (two passes) and DeepSeek V4.1 Flash ran over the branch, and Astra checked their report. Nothing came up in the code this PR changes. Fable 5.2 and Astra then found that the docs called the refusal of an empty seed new, which lndinit already did, and that the allowEmpty description promised too much. Both are fixed.

@github-actions github-actions Bot added area: ci .github/, test/, dev/ area: docs docs/, README, examples/, SECURITY.md, book.toml, assets area: modules modules/ and pkgs/lib.nix labels Nov 9, 2026
@ostermayer
ostermayer force-pushed the secrets-empty-and-atomic branch from 21d8a8f to 7d7751f Compare November 10, 2026 19:12
@ostermayer

Copy link
Copy Markdown
Collaborator Author

Rebased onto master, because today's merges made it conflict. The only conflict was in test/configuration.nix, where master dropped clnrest from the migration list. The changes are the same as before. #188 also changed modules/presets/wireguard.nix, but only the firewall part, and this PR changes only the key setup.

nix flake check --all-systems, the ciTestInfo eval, and the setup-secrets and wireguard-lndconnect scenarios pass on the KVM host. Fable 5.2 (xhigh), GPT-6 Astra (max, two passes), Kimi K3.1 Pro (max, two passes) and GLM 5.3 (max) reviewed the rebase and found nothing in it.

@seberm seberm added type: bug Behaviour is wrong vs. documented or intended breaking Changes existing user config; needs a versioning.nix entry labels Nov 10, 2026
@seberm seberm added this to the v0.1.6 milestone Nov 10, 2026
@seberm

seberm commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Hello @ostermayer , please recheck these:


Should-fix

  • modules/presets/bitcoind-remote.nix: set nix-bitcoin.secrets."bitcoin-HMAC-<name>".allowEmpty = true for every rpc user with passwordHMACFromFile, instead of having users compute HMACs for files nothing reads. With this preset, the only reader is bitcoind's preStart, which writes rpcauth=<user>: into a bitcoin.conf no daemon uses, so an empty file is harmless. Then drop the bitcoind-remote.nix bullet from docs/upgrading.md and the matching sentence from the versioning message.
  • docs/release-notes.md: add the migration pointer to the 0.1.6 section, as in 0.1.5: "For this release's configuration and service migrations, see Upgrading to config version 0.1.6."

Nits (optional)

  • A crash between mktemp and mv leaves <name>.XXXXXX files in the secrets dir, lnd-seed-mnemonic.XXXXXX in lnd's data dir or wallet-init.XXXXXX in its network dir. Nothing is exposed (setup-secrets restricts stray files to root, and the lnd ones are 0600 and owned by lnd), so this is only clutter. A cleanup at the start of each script would remove them.
  • modules/backups.nix: with allowEmpty on backup-encryption-env, an env file that an earlier version truncated after writing the password is never rewritten, because the generator only checks -nt. Duplicity then fails for lack of a passphrase rather than backing up unencrypted, but the backups stay broken until someone notices. if [[ backup-encryption-password -nt backup-encryption-env || ! -s backup-encryption-env ]] repairs it, as makeBitcoinRPCPassword does for HMAC files.

Tested: no local runs; relied on CI at 7d7751f (ci_gate, test_scenario default/netns/netnsRegtest/setup-secrets/wireguard-lndconnect, check_flake, deployment examples, shellcheck all pass).

Assisted-by: Claude Code (Claude Opus 5.5, Claude Fable 5.1 as advisor)

@prusnak prusnak added status: changes needed Cannot proceed until suggested changes are implemented status: rebase needed Merge conflicts need to be resolved and removed status: changes needed Cannot proceed until suggested changes are implemented labels Nov 10, 2026
…file

setup-secrets only checked that each declared secret exists. It
accepted an empty file, for example one supplied with
`nix-bitcoin.generateSecrets = false`, and services then started with
an empty credential, such as an empty bitcoind RPC password. It also
accepted a directory. Fail setup with a clear error in both cases, as
for a missing file.

Of the secrets that bitcoinix declares, only `backup-encryption-env`
can be empty on purpose: a supplied duplicity environment file has
nothing to set with `--no-encryption`. The new per-secret option
`allowEmpty` keeps it accepted.

Assisted-by: Claude Code (Claude Opus 5.5)
writeSecret wrote to a fixed `$out.tmp`, which it followed if it was a
symlink, and moved it into place with plain `mv`. When the final path
was a directory, or a symlink to one, mv moved the temp file into it
and reported success, so the secret was never written.

Create the temp file with `mktemp` next to the target, and move it with
`mv -fT --`: it replaces the final path itself and fails on a
directory. Also sync the temp file before the rename and the directory
after it, so that a crash can't leave an empty secret behind. The HMAC
tests now look for any temp file left behind.

Assisted-by: Claude Code (Claude Opus 5.5)
makeCert created a key whenever the key path didn't exist, so an empty
key made lnd fail without a hint, and a symlink to a missing file got a
new key written through it. A new key silently breaks every client that
pinned the old certificate. So the key is now created only when its
path is absent. An empty key, or a symlink to a missing file, fails
setup with an error that names the file and says to restore it from a
backup, or to delete it to generate a new key.

The cert depends only on the key, so also rebuild it from the key when
it is empty or doesn't parse. openssl writes a new key and cert to
`mktemp` files, which are synced and moved into place after success:
the cert first, so that an interrupted run leaves no key and the next
run creates both again. The alt-names file is written the same way
after the cert, instead of through a plain redirect.

Assisted-by: Claude Code (Claude Opus 5.5)
…ic keys

`wg genkey > $priv` left an empty private key when it failed. The key
was kept, `wg pubkey` failed on it, and setup-secrets failed at every
boot without a hint. Replacing the key would break the configured
clients. So a private key is now created only when its path is absent,
and an empty one, or a symlink to a missing file, fails with an error
that says how to restore or replace it.

Write the keys with `writeSecret`, and derive the public key from the
private key on every run. A missing, empty or wrong public key is
rewritten, without relying on timestamps.

Assisted-by: Claude Code (Claude Opus 5.5)
…ublic key

ssh-keygen wrote the key directly to its final path, and setup-secrets
now rejects an empty key. Replacing the key would break replication
until the replication server authorizes the new one. So the key is now
created only when its path is absent, and an empty one, or a symlink to
a missing file, fails with an error that says how to restore or replace
it.

Generate a missing key in a new `mktemp` dir and move it into place
after syncing it. Rebuild `.pub` from an unencrypted private key on
every run when it is missing, empty or different. Other identities
that worked before, such as an encrypted key or a public key whose
private key is in an SSH agent, keep their `.pub`. The module-config
check runs the real generator.

Assisted-by: Claude Code (Claude Opus 5.5)
The env file got `PASSPHRASE=$(cat backup-encryption-password)`, so a
password file that reads as empty, e.g. one with only a newline, gave
an empty passphrase. Read the password into a variable first, and fail
when the read fails or the value is empty. Write the env file with
`writeSecret`. It is still regenerated only when the password is newer.

Assisted-by: Claude Code (Claude Opus 5.5)
lnd's preStart creates the seed and the wallet while there's no
wallet.db. A failed `lndinit gen-seed` left an empty seed file, and
wallet creation then failed at every start. `lndinit init-wallet`
creates wallet.db before it creates the wallet in it. When it failed,
for example on an empty wallet password, wallet.db stayed, and every
later start skipped wallet creation.

Create the seed only when its path is absent, in a `mktemp` file that
is synced before it's moved into place. A missing wallet.db doesn't
prove that no wallet ran from an existing seed, so an empty seed, or a
symlink to a missing file, fails with an error that says when to delete
it and when to restore it. Create the wallet in a `mktemp` dir in the
network dir, move wallet.db into place after success, and remove the
temp dir when lndinit fails. lndinit writes only wallet.db there.

Create a wallet only when the wallet path is absent. A wallet.db that
isn't a regular file, such as a symlink to a moved or unmounted wallet,
fails before any seed is created, instead of getting a new wallet
written in its place.

The new lnd-wallet-init test uses a new data dir and restores the
original one afterwards.

Assisted-by: Claude Code (Claude Opus 5.5)
setup-secrets now fails on an empty declared secret file or one that
isn't a regular file, and secret generation fails on an empty TLS,
WireGuard or replication SSH private key instead of replacing it. lnd
fails on an empty seed while it has no wallet. Secret files can't be
inspected at evaluation time, so add a 0.1.6 notice for everyone who
uses setup-secrets or lnd, as for the 0.1.3 sandbox change. The upgrade
notes say how to keep a secret that may be empty, what to write to the
unused local HMAC files of the bitcoind-remote preset, what to do about
an empty lnd seed, and how to unblock an lnd node whose earlier wallet
creation failed.

Assisted-by: Claude Code (Claude Opus 5.5)
@ostermayer
ostermayer force-pushed the secrets-empty-and-atomic branch from 7d7751f to 9a44c8a Compare November 12, 2026 17:46
@ostermayer

Copy link
Copy Markdown
Collaborator Author

Rebased onto master 2362b11. #170 added two 0.1.6 notices to modules/versioning.nix and a 0.1.6 section to docs/upgrading.md, and this PR adds its own in the same places. I kept both. This PR's notice now comes after the two from #170, and its upgrade notes sit inside the existing 0.1.6 section, before the line that says to set configVersion. The first seven commits are unchanged.

On the KVM host, nix flake check --all-systems, nix eval .#ciTestInfo and the setup-secrets and wireguard-lndconnect scenarios pass.

#236 adds a 0.1.6 notice in the same place, so whichever of the two merges second needs the same small fix. I'll do it.

@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 9a44c8a. No blocking correctness findings in the changed code. I checked the temporary-file/rename ordering, preservation of existing identity keys, derived public-key/certificate repair, supplied-secret validation, and wallet initialization retries. The config-version notice and recovery instructions cover the intentional compatibility changes.

[P3] Add the release-note entry. The documentation item in the earlier review comment is still outstanding: docs/release-notes.md has no 0.1.6 entry for this change. Please add a short note about empty-secret validation and atomic wallet initialization, linking to upgrading.md#upgrading-to-config-version-016, as required by AGENTS.md. The detailed recovery steps can stay in the upgrade guide.

Local validation on x86_64-linux:

  • Module configuration and test-runner checks passed, including the real replication SSH-key generator cases.
  • ./test/shellcheck.sh passed.
  • The full setup-secrets VM scenario passed, including missing, directory, empty, and explicitly allowed-empty supplied secrets.
  • In the default KVM driver, secrets-no-argv, lnd-wallet-init, and setup-secrets passed. These cover TLS certificate repair/key preservation, backup passphrase rejection, wallet-init failure followed by retry with the same seed, and setup permissions.

Existing CI is green. I did not rerun the complete VM matrix locally.

@github-actions github-actions Bot removed the status: rebase needed Merge conflicts need to be resolved label Nov 13, 2026
@ostermayer

Copy link
Copy Markdown
Collaborator Author

Added the release note in 5cf3f0e. It links to the 0.1.6 upgrade text and leaves the recovery steps there.

An empty lnd seed file already stopped lnd before this PR, because
lndinit rejects a seed that doesn't have 24 words. The PR only adds an
error that names the file. Stopping on a symlink to a missing file is
new. Say so in the release note, the upgrade text and the versioning
message.

The allowEmpty description said that no service gets an empty
credential, but setup only rejects a zero-byte file.

Assisted-by: Claude Code (Claude Opus 5.5)
@ostermayer

Copy link
Copy Markdown
Collaborator Author

I pushed a docs fix. An empty lnd seed file already stopped lnd before this PR, because lndinit rejects a seed that doesn't have 24 words. The release note, the upgrade text and the versioning message now say that only the error message is new there. What's new is that lnd stops when its seed file or wallet.db is a symlink to a missing file, or wallet.db isn't a regular file. The allowEmpty description no longer promises that no service gets an empty credential, because setup only rejects a zero-byte file.

On the KVM host, nix eval .#ciTestInfo passes.

@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 b8e6bf6. No actionable correctness findings in the changed code.

Checked secret validation and allowEmpty, temporary-file permissions and sync/rename ordering, preservation of identity keys, derived certificate/public-key repair, replication identities that cannot be decrypted during setup, and lnd wallet creation failure/retry behavior. The config-version notice and upgrade instructions cover the intentional behavior changes. The release note requested in the previous review is now present; the revised seed documentation correctly distinguishes the existing empty-seed failure from the new dangling-symlink refusal.

Validation on the current commit:

  • Local x86_64-linux module-config and test-runner flake checks passed.
  • Local ./test/shellcheck.sh passed.
  • Current GitHub CI is green, including default, netns, netnsRegtest, wireguard-lndconnect, setup-secrets, and the docs build. I did not rerun VM integration tests locally for this review.

Reviewed with Codex / GPT-6 Astra.

@prusnak
prusnak enabled auto-merge November 13, 2026 16:48
prusnak
prusnak previously approved these changes Nov 13, 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

@github-actions github-actions Bot added the status: rebase needed Merge conflicts need to be resolved label Nov 13, 2026
@github-actions github-actions Bot removed the status: rebase needed Merge conflicts need to be resolved label Nov 13, 2026
@prusnak
prusnak merged commit 01d7554 into bitcoinix:master Nov 13, 2026
21 checks passed
unbeholdendev added a commit to unbeholdendev/infra that referenced this pull request Nov 17, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [bitcoinix/bitcoinix](https://github.com/bitcoinix/bitcoinix) | patch | `v0.1.5` → `v0.1.6` |

---

### Release Notes

<details>
<summary>bitcoinix/bitcoinix</summary>

### [`v0.1.6`](https://github.com/bitcoinix/bitcoinix/releases/tag/v0.1.6): bitcoinix 0.1.6

[Compare Source](bitcoinix/bitcoinix@v0.1.5...v0.1.6)

**Security release with breaking changes.** Narrows Tor enforcement to local addresses, closes a netns-isolation bypass, hardens RTL and the custom lnd macaroons, and updates lnd to 0.21.8-beta. All users should upgrade. Evaluation fails with a message for each breaking change that affects your config; act on it, then set `nix-bitcoin.configVersion = "0.1.6";`. Deploying restarts every netns-isolated service and each RTL backend once.

#### Security

- **Tor enforcement allowed more than Tor.** Services with `tor.enforce` and charge-lnd could reach every link-local address `169.254.0.0/16`, including a cloud provider's metadata service, and could resolve names through the host's resolver sockets. They now reach only localhost and, with netns-isolation, the namespace subnet, and can't use the nscd, systemd-resolved, D-Bus and Avahi sockets ([#&#8203;264](bitcoinix/bitcoinix#264), [GHSA-cgh8-4w2p-8fr8](GHSA-cgh8-4w2p-8fr8)).
- **netns-isolation:** with `br_netfilter` loaded, which Docker does, a service without `tor.enforce` could reach the listeners of namespaces it isn't connected to. Traffic between namespaces is no longer masqueraded ([#&#8203;239](bitcoinix/bitcoinix#239)).
- **RTL verifies its backends.** RTL sent the lnd admin macaroon and the clightning admin rune to any server on a backend's port. It now requires the backend's pinned TLS certificate ([#&#8203;258](bitcoinix/bitcoinix#258)) and stops when lnd or clightning stops, instead of polling a port that another local user could take over ([#&#8203;250](bitcoinix/bitcoinix#250)).
- **RTL two-factor authentication survives restarts.** Before, each restart turned 2FA off without a warning. `RTL-Config.json`, which holds the 2FA secret, is now readable only by RTL's user ([#&#8203;254](bitcoinix/bitcoinix#254)).
- **Custom lnd macaroons** (`services.lnd.macaroons`, used by BTCPay Server and charge-lnd) are now readable only by their `user`. Before, the user's primary group could read them, which for `operator` is `users`, so other normal users could. If other users log in to your node, [revoke all macaroons](https://docs.bitcoinix.net/services.html#revoke-all-macaroons) ([#&#8203;255](bitcoinix/bitcoinix#255)). Each custom macaroon now has its own root key, so one can be revoked without the others ([#&#8203;236](bitcoinix/bitcoinix#236)).
- **Root scripts no longer load config files from a service user's home.** The lnd user could make root's `curl` and `jq` load `~/.curlrc` and `~/.jq` from lnd's data dir ([#&#8203;241](bitcoinix/bitcoinix#241), [GHSA-cwmc-wjvh-3qp6](GHSA-cwmc-wjvh-3qp6)).
- **Backups fail when a database dump fails.** Before, duplicity succeeded without the database. With `services.postgresqlBackup.compression` set to `"zstd"` or `"none"`, backups left out the BTCPay and NBXplorer databases; they are now included, so run `systemctl start duplicity` after upgrading if you use one of these ([#&#8203;225](bitcoinix/bitcoinix#225)).
- **Multipath TCP:** service namespaces now copy the host's `net.mptcp.enabled`, so the setting of `hardened-extended` reaches netns-isolated services ([#&#8203;206](bitcoinix/bitcoinix#206)).
- **Secrets:** `setup-secrets` rejects empty secret files, and secret generation no longer replaces an empty TLS, WireGuard or replication SSH key ([#&#8203;244](bitcoinix/bitcoinix#244)).
- **WireGuard preset:** evaluation fails for firewall setups in which the preset's rules can't run or don't stay loaded ([#&#8203;188](bitcoinix/bitcoinix#188)).
- **lnd [0.21.8-beta](https://github.com/lightningnetwork/lnd/blob/master/docs/release-notes/release-notes-0.21.8.md)** fixes correctness bugs in channel state persistence, gossip validation, the sweeper and HTLC recovery ([#&#8203;263](bitcoinix/bitcoinix#263)).

#### Breaking changes

- **Tor enforcement:** a service with `tor.enforce` that connects to a non-local address or by host name needs a change. netns-isolation rejects `addressblock` 169 and 170 ([#&#8203;264](bitcoinix/bitcoinix#264)).
- **Onion address access:** `lndconnect.onion` and `clnrest.lnconnect.onion` give the operator user access only when `nix-bitcoin.operator.enable` is set. `nix-bitcoin.onionAddresses.access` accepts only users that are defined and enabled in `users.users` ([#&#8203;170](bitcoinix/bitcoinix#170)).
- **Secrets:** an empty or non-regular secret file now fails `setup-secrets`, and then no service can read its secrets. Check before deploying: `find /etc/nix-bitcoin-secrets -maxdepth 1 -type f -empty`. Set `nix-bitcoin.secrets.<name>.allowEmpty = true` for a secret that may be empty ([#&#8203;244](bitcoinix/bitcoinix#244)).
- **lnd wallet:** lnd stops when `wallet.db` isn't a regular file, or when its seed file is a symlink to a missing file while it has no wallet ([#&#8203;244](bitcoinix/bitcoinix#244)).
- **lnd macaroons:** bitcoinix deletes unused root keys with IDs `0x6e62000000000000` to `0x6e62ffffffffffff` on each lnd start; check `lncli listmacaroonids` before deploying. lnd's `no-macaroons` option isn't supported. Restart services that read a custom macaroon only at startup ([#&#8203;236](bitcoinix/bitcoinix#236)). A program that read a custom macaroon through the group needs its own macaroon ([#&#8203;255](bitcoinix/bitcoinix#255)).
- **RTL:** with both backends enabled, stopping one stops RTL for both ([#&#8203;250](bitcoinix/bitcoinix#250)). `LN_SERVER_URL`/`LND_SERVER_URL`, another `Settings.lnServerUrl`, a proxy without `no_proxy` for the backend, and servers with a self-signed certificate no longer work as before ([#&#8203;258](bitcoinix/bitcoinix#258)).
- **WireGuard preset:** fails evaluation with the nftables firewall package without iptables, with `networking.nftables.flushRuleset`, and with an `ip` or `ip6` table named `filter` in `networking.nftables.tables` ([#&#8203;188](bitcoinix/bitcoinix#188)).
- **extra-container [1.0.1](https://github.com/extra-container/extra-container/releases/tag/v1.0.1):** containers can no longer reach the host's Nix daemon socket, so `nix build`, `nix run`, `nix develop` and `nix-shell` fail inside them. `extra.hostNixDaemon = true;` restores the old behavior; read the security section of the extra-container README first ([#&#8203;211](bitcoinix/bitcoinix#211)).
- **Packages:** `rtl` and `trustedcoin` moved to `legacyPackages.<system>.pinned`. Trezor is `nix-bitcoin.pkgs.nbPython3Packages.trezor`. `nbPython3Packages` uses the Python interpreter of nixpkgs-unstable, so build custom Python environments with `nbPython3Packages.python` ([#&#8203;245](bitcoinix/bitcoinix#245)).
- **nodeinfo:** every bitcoinix update now produces a new system generation, because the revision is part of the script. Set `nix-bitcoin.revision = null;` to opt out ([#&#8203;243](bitcoinix/bitcoinix#243)).

See [Upgrading to config version 0.1.6](https://docs.bitcoinix.net/upgrading.html#upgrading-to-config-version-016).

#### New

- **[Unbeholden Wallet](https://docs.bitcoinix.net/services.html#connect-to-unbeholden-wallet):** a watch-only wallet that runs in the browser and hands transactions to an air-gapped signer over QR codes. Enable it with `services.unbeholden-wallet.enable = true;` ([#&#8203;230](bitcoinix/bitcoinix#230)).
- **nodeinfo** shows the bitcoinix revision and the package version of each service. `nodeinfo --version` prints only the revision, `nodeinfo NAME ...` only the given entries ([#&#8203;243](bitcoinix/bitcoinix#243)).

#### Fixes

- lnd announces its onion address with the port Tor forwards. With a `services.lnd.port` other than 9735, peers couldn't reach the node over Tor ([#&#8203;228](bitcoinix/bitcoinix#228)).
- clnrest replaces an empty or `null` admin rune on start. Generate connection URLs from `lnconnect-clnrest` again if they were created with such a rune ([#&#8203;217](bitcoinix/bitcoinix#217)).
- btcpayserver with the clightning backend joins `services.clightning.group`, so a custom group works ([#&#8203;238](bitcoinix/bitcoinix#238)).
- The lnd seed and electrs index migration steps keep the data when an earlier step fails ([#&#8203;242](bitcoinix/bitcoinix#242)).

#### Updates

| Package                       | 0.1.5       | 0.1.6                                                                            |
| ----------------------------- | ----------- | -------------------------------------------------------------------------------- |
| lnd                           | 0.21.6-beta | [0.21.8-beta](https://github.com/lightningnetwork/lnd/releases/tag/v0.21.8-beta) |
| RTL                           | 0.15.16     | [0.15.17](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.15.17)       |
| extra-container (flake input) | 0.17        | [1.0.1](https://github.com/extra-container/extra-container/releases/tag/v1.0.1)  |
| Unbeholden Wallet             | –           | [0.4.0](https://github.com/unbeholdendev/unbeholden-wallet/releases/tag/v0.4.0)  |

Also: mempool builds with Node.js 24 ([#&#8203;246](bitcoinix/bitcoinix#246)); the docs say what netns-isolation doesn't isolate ([#&#8203;237](bitcoinix/bitcoinix#237)) and how to close public SSH without losing access ([#&#8203;234](bitcoinix/bitcoinix#234)).

Contributors: [@&#8203;msgilligan](https://github.com/msgilligan), [@&#8203;ostermayer](https://github.com/ostermayer), [@&#8203;prusnak](https://github.com/prusnak), [@&#8203;seberm](https://github.com/seberm), [@&#8203;unbeholdendev](https://github.com/unbeholdendev), [@&#8203;viberaven](https://github.com/viberaven).

Full changes: <bitcoinix/bitcoinix@v0.1.5...v0.1.6>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNDEuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjI0MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: agent <[email protected]>
Reviewed-on: https://git.home.unbeholden.dev/unbeholden/infra/pulls/140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci .github/, test/, dev/ area: docs docs/, README, examples/, SECURITY.md, book.toml, assets area: modules modules/ and pkgs/lib.nix breaking Changes existing user config; needs a versioning.nix entry type: bug Behaviour is wrong vs. documented or intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lnd: a failed init-wallet leaves a wallet.db that blocks wallet creation on later starts

4 participants