Skip to content

feat: split Lightning into official LND/RTL services with verified TLS - #26

Open
sembrestels wants to merge 1 commit into
dappnode:masterfrom
sembrestels:fix/split-lnd-rtl-services
Open

sembrestels wants to merge 1 commit into
dappnode:masterfrom
sembrestels:fix/split-lnd-rtl-services

Conversation

@sembrestels

Copy link
Copy Markdown

The existing package runs old LND/RTL components together in one container. Adopt the two-service, official-image approach proposed in #24 while retaining the prepared security versions: LND 0.21.4-beta, RTL 0.15.15 and Node 22.23.4. Pin both official images by digest and refresh their system CA bundles. Retain RTL's official frontend and production dependencies; compile the reviewed verified-TLS backend patch against the pinned matching RTL source.

Run LND and RTL as separate services. Keep the wallet database and TLS private key exclusively in LND's data volume. Share only the public certificates and admin macaroon with RTL through a read-only volume, and retain the dedicated RTL backup volume. LND generates certificates for lnd.lightning-network.dappnode; RTL verifies that hostname, certificate chain and expiry before sending credentials. Retain the TLS patch's exact-origin binding, redirect blocking, per-request trust reload, encrypted-key temporary/permanent certificate handling, backup preservation and server-owned trust settings.

Add a service-aware installation form: the UI password goes only to RTL, and the node alias goes to LND. Remove the obsolete combined-image/supervisor sources and Travis configuration. Update backup metadata, UI/API links and the regression workflow for the two services.

Use provisional package version 0.5.0 because service names, configuration destinations and mounts change. Retain the legacy wallet migration guard and document the tested 0.14.1 → 0.15.5 → 0.21.4 route. Preserve the existing logical wallet/backup volume names, but require operators to review custom mounts and move old service environment settings to lnd or rtl explicitly. TLS certificate relocation may renew the transport certificate; external clients that pinned it need a controlled trust update. See MIGRATION.md.

Validation on amd64: both images and the Dappnode SDK 0.3.55 package build pass; manifest/Compose/setup-wizard checks pass. All 397 backend tests pass as a non-root user using the official frontend. Packaged UI/password/CSRF/WebSocket tests pass, including default-password and legacy-migration refusal, wrong/untrusted certificates rejected before node HTTP requests, read-only credential sharing, private-state isolation, certificate renewal and backup preservation. Real unfunded regtests pass for wallet creation through RTL, encrypted TLS temporary-to-permanent creation/unlock, staged legacy migration, and independent LND/RTL restarts. Node identity is preserved, all wallet balances remain zero, and no production state or external peers are used.

Limits: no funded-channel or historical payment/watchtower database migration, production recovery, ARM64 build or Angular browser suite is certified. Actual Dappnode installation with customized mounts/settings remains an operator acceptance step. The separate upstream CLN WebSocket transport is outside this LND package's scope. No production service was installed and no release or IPFS package was published during validation.

Use digest-pinned LND 0.21.4 and RTL 0.15.15 images with Node 22.23.4. Retain the verified TLS patch, read-only credential sharing, staged wallet migration guard and service-aware setup wizard. Validate both images, 397 backend tests, SDK package build and isolated unfunded fresh/encrypted/staged regtests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant