Btcpayserver: LND connection string needs admin macaroon

Created on 13 Aug 2020  路  3Comments  路  Source: btcpayserver/btcpayserver

Describe the bug
Perhaps this is not a bug and just needs some clarification. I want to use external LND.
When I supply connection string btcpayserver says Error while connecting to the API (The HTTP status code of the response was not expected (500).). If I change the connection string to use admin.macaroon everything works.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Stores / Settings / Lightning nodes (Experimental)
  2. Try adding url like type=lnd-rest;server=https://...:8080/;macaroonfilepath=../invoice.macaroon;certthumbprint=...
  3. Press Test Connection

Expected behavior
My assumption was that invoice.macaroon would be enough.

Your BTCPay Environment (please complete the following information):
v1.0.5.4 and LND 0.10.3-beta on remote machine with TCP port 8080 open

Most helpful comment

Thanks for explanation.

If anyone else stumbles upon this. I did lncli bakemacaroon address:read address:write info:read invoices:read invoices:write onchain:read now and use the generated macaroon as macaroon= (instead of macaroonfilepath=).

But I suppose you could also use --save_to option of bakemacaroon and then reference the (local) file.

All 3 comments

@fiksn we use GetInfo which is not allowed for the invoice macaroon.
We need GetInfo because we should check whether the lightning node is fully sync before creating an invoice, as well as for fetching the node URI to display in the QR Code.

Thanks for explanation.

If anyone else stumbles upon this. I did lncli bakemacaroon address:read address:write info:read invoices:read invoices:write onchain:read now and use the generated macaroon as macaroon= (instead of macaroonfilepath=).

But I suppose you could also use --save_to option of bakemacaroon and then reference the (local) file.

Maybe we should add the essence of the last two comments into an FAQ item of the docs. Great info here 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Eskyee picture Eskyee  路  3Comments

ottosuess picture ottosuess  路  3Comments

pavlenex picture pavlenex  路  3Comments

astupidmoose picture astupidmoose  路  3Comments

astupidmoose picture astupidmoose  路  3Comments