-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugUnintended code behaviourUnintended code behaviourneeds triageneutrinoLightweight neutrino backend-typeLightweight neutrino backend-type
Milestone
Description
Pre-Submission Checklist
- I have searched the existing issues and believe this is a new bug.
- I am not asking a question about how to use lnd, but reporting a bug (otherwise open a discussion).
LND Version
lnd version 0.20.0-beta commit=v0.20.0-beta
LND Configuration
Irrelevant
Backend Version
Neutrino
Backend Configuration
OS/Distribution
Ubuntu 22.04
Bug Details & Steps to Reproduce
- Start a docker container
docker run --rm -it --entrypoint bash lightninglabs/lnd:v0.20.0-beta - Create a dummy config file (optional):
touch ~/.lnd/lnd.conf - Start lnd with the command
lnd --bitcoin.regtest --bitcoin.node=neutrino - Terminate lnd
- Start lnd with the command
lnd --bitcoin.regtest --bitcoin.node=neutrino --tlscertpath=/tmp/tls.cert
Output:
2025-11-25 19:15:51.523 [INF] LTND: Version Info rev=b9ea70 version=0.20.0-beta commit=v0.20.0-beta debuglevel=production logging=info
2025-11-25 19:15:51.523 [INF] LTND: Network Info rev=b9ea70 active_chain=Bitcoin network=regtest
2025-11-25 19:15:51.523 [ERR] LTND: Shutting down due to error in main method rev=b9ea70 err="unable to generate or renew TLS certificate: open /tmp/tls.cert: no such file or directory"
2025-11-25 19:15:51.523 [INF] LTND: Shutdown complete
error setting cert before unlock: unable to generate or renew TLS certificate: open /tmp/tls.cert: no such file or directory
Expected Behavior
LND creates a new pair of tls.key and tls.cert
OR
LND crashes with a message that says "TLS key found at but certificate does not exist at "
Debug Information
The condition in https://github.com/lightningnetwork/lnd/blob/master/tls_manager.go#L212-L213 could be changed to &&, and then the certificate would be generated. I think it is a valid solution, considering that lnd regenerates the certificates if they expired, so why not if one of the files is missing.
Environment
No response
Metadata
Metadata
Assignees
Labels
bugUnintended code behaviourUnintended code behaviourneeds triageneutrinoLightweight neutrino backend-typeLightweight neutrino backend-type