Lightning Node behind TOR, Can connect to BTCPAY?



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

Connection string:

Thank you.


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


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.


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?


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).


You Rock! Thanks for the cred!