You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lndconnect and lnconnect add an onion-address entry for the operator user even when the operator is disabled, and that breaks every onion address #166
modules/lndconnect.nix gives the operator user access to the onion address of the REST endpoint whenever the onion variant is on:
nix-bitcoin.onionAddresses.access={${lnd.user}=["lnd-rest"];${operatorName}=["lnd-rest"];# line 174, and line 207 for clnrest};
operatorName is nix-bitcoin.operator.name, but the user only exists when nix-bitcoin.operator.enable is true, and that defaults to false. The secure-node preset enables it, so the recommended deployment is fine. A node that enables services.lnd.lndconnect.onion or services.clightning.plugins.clnrest.lnconnect.onion without the preset gets an access.operator entry for a user that isn't there.
onion-addresses then fails at boot. Its script builds every user's directory in a staging area and runs chown '<user>' on it before anything is published. The chown for the missing user fails, the script runs with set -e, and it exits before the staging directory is moved into place. So not one onion address is written, not only the operator's. With nix-bitcoin.onionServices.bitcoind.public = true, bitcoind's preStart reads an empty services/bitcoind file and writes externalip=, and bitcoind refuses to start. clightning's announce-addr ends up as :9735 and lightningd refuses too. The lnconnect helper for clnrest reads the operator directory as well (line 187), so it has nothing to read even if the publish step survived.
Fix in two parts:
Add the operator entries only when config.nix-bitcoin.operator.enable is true, in both places, and point the clnrest helper at a directory that exists in that case.
In onion-addresses, don't let one bad owner stop every address. Check that each access user exists before the staging run, or assert at evaluation time that every key of nix-bitcoin.onionAddresses.access is a defined user. An eval-time assertion is the clean fix, since the names are all static.
Found by DeepSeek V4.1 Flash 1017 (max) in the review of the tree at e28a7e5. Codex (GPT-6 Astra, xhigh) confirmed it and rated it medium, and added the point about the clnrest helper. I checked the modules and the onion-addresses script.
Activity
lndconnect: give the operator onion access only when the operator rol…
lndconnect: give the operator onion access only when the operator rol…
lndconnect: give the operator onion access only when the operator rol…
lndconnect: give the operator onion access only when the operator rol…
lndconnect: give the operator onion access only when the operator rol…