Skip to content

Support for LND@BTCPay Server #321

@petzsch

Description

@petzsch

While trying to help a BTCPay Server user run rebalance-lnd on their instance, we came across the following issue:

Here you expect a very specific path for the admin.macaroon, however it also loads the tls.cert from the lnd_dir :

with open(f"{lnd_dir}/data/chain/bitcoin/{network}/admin.macaroon", "rb") as f:

Here is the folder contents for btcpayserver's generated_lnd_bitcion_datadir volume:

root@cryptonode:/var/lib/docker/volumes/generated_lnd_bitcoin_datadir/_data# ls
admin.macaroon  invoice.macaroon  lnd.conf  readonly.macaroon  tls.key
data            letsencrypt       logs      tls.cert

if you try to find the admin.macaroon in data/chain/bitcoin/{network}/ you'll find the following:

root@cryptonode:/var/lib/docker/volumes/generated_lnd_bitcoin_datadir/_data/data/chain/bitcoin/mainnet# ls -al
total 1484
drwx------ 2 root root    4096 Aug 30 17:39 .
drwx------ 3 root root    4096 Apr 16 10:07 ..
-rw-r--r-- 1 root root      83 Apr 16 10:08 chainnotifier.macaroon
-rw-r--r-- 1 root root      45 Aug 30 17:39 channel.backup
-rw-r--r-- 1 root root      91 Apr 16 10:08 invoices.macaroon
-rw------- 1 root root   20480 Aug 30 17:38 macaroons.db
-rw-r--r-- 1 root root      91 Apr 16 10:08 router.macaroon
-rw-r--r-- 1 root root      92 Apr 16 10:08 signer.macaroon
-rw------- 1 root root 1458176 Sep  3 15:45 wallet.db
-rw-r--r-- 1 root root     114 Apr 16 10:08 walletkit.macaroon
-rw-r--r-- 1 root root     274 Apr 16 10:07 walletunlock.json

To solve this, we would need a seperate config option to specifiy the admin.macroon file path, so that the rest still works.

Hope there is a simple solution to this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions