Lightning Node behind TOR, Can connect to BTCPAY?

question

#1

Can I connect my Lightning Node(TOR) to self hosted BTCPay server?

Connection string:
type=lnd-rest;server=https://025529e9ad2095687827fb443e88a28e7a42e28b9bd7a3ae9b65176b7ec145f377@5vpk3dpwf3ifoyye.onion:9735/;macaroonfilepath=/.lnd/data/chain/bitcoin/mainnet/admin.macaroon;allowinsecure=true

Thank you.


#2

Good question, unfortunately I don’t know if someone managed to get it working.


#3

You definitely can’t connect it like that because macaroonfilepath is pointing to macaroon file… and you are not able to access macaroon file on your local filesystem with that path.

Rather use macaroon= variable and enter hex of macaroon file.
Also, you need to expose REST port of LND (likely 8080), not P2P (9735).
Finally, if you are using HTTPS you’ll need to either go with allowinsecure=true or use certthumbprint= and the hex of TLS file.

I think if you did all this you should be able to connect BTCPayServer to LND on TOR. I have no experience with TOR so I could be wrong, depending on how ports are handled. If you get it working, ping us back with results.


#4

Thanks!
Yes, I was looking into the macaroons. The pic I attached above says the macaroon file path “does exist”. Should it be “does not exist” because btcpay cant reach the file? Or does btcpay see the file but can’t read it?


#5

It’s typo… I’ve just fixed it, credited you and pushed pull request.

When you use macaroonfilepath that means that BTCPayServer is able to access filesystem of your LND node and read macaroon file. If your LND instance is behind onion address and on different server then it’s unlikely direct access to filesystem will be shared.

So that’s why you need to use macaroon variable where you’ll paste hex of macaroon yourself. And again because you are connecting over HTTPS make sure that you either set allowinsecure=true (all certificates accepted) or certthumbprint=... (better option).


#6

You Rock! Thanks for the cred!