Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@ LIGHTNING_LNBITS_API_KEY=
LIGHTNING_LNBITS_LNURLP_URL=
LIGHTNING_LND_API_URL=
LIGHTNING_LND_ADMIN_MACAROON=
# Path to the live LND TLS cert file on disk (mounted into the container)
# Path to the live LND TLS cert file on disk (mounted into the container).
# If unset, LIGHTNING_API_CERTIFICATE is used instead (hosts without the LND volume).
LIGHTNING_API_CERTIFICATE_PATH=
LIGHTNING_API_CERTIFICATE=

MONERO_WALLET_ADDRESS=
MONERO_NODE_URL=
Expand Down
4 changes: 3 additions & 1 deletion src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,9 @@ export class Configuration {

function readCert(): string | undefined {
const path = process.env.LIGHTNING_API_CERTIFICATE_PATH;
if (!path) return undefined;

// No path (e.g. prod hosted without the LND volume): use the certificate env var.
if (!path) return process.env.LIGHTNING_API_CERTIFICATE?.split('<br>').join('\n');

// Path is set: read the live LND cert from disk and let a missing/unreadable file throw,
// so a broken mount surfaces immediately instead of being masked by a stale fallback.
Expand Down