Bitcoin Lightning Network (LND) setup in Whonix

page created:

Improve the Documentation / Edit the Whonix ™ Wiki

1 Like

THNX a lot for the efforts. Noob question: the ip of my bitcoin core in my vm is 10.152.152.11:8333 right? not 127.01.01.1 right?

Nope. I recommend you to do some more research into the matter as this forum is for help offered by volunteers and help with every little detail is impossible.

Take a look at the comments here: onion-grater/usr/share/doc/onion-grater-merger/examples/40_bitcoind.yml at master · Whonix/onion-grater · GitHub

The default is that bitcoind listens to clearnet connections on port 8333. When bitcoind is setup to use Tor, it will instead be listening for connections on port 8334.

That is, when bitcoind sets up an onion service, the onion service will be accepting connections at port 8333 and the Whonix Gateway will direct those connections at port 8334 of the Workstation running bitcoind.

You will need to have bind=0.0.0.0:8334=onion in your bitcoin.conf.

1 Like

thanks dude. that ip (0.0.0.0) came out of nowhere for me XD. using LND proves way more complicated now :slight_smile: But I think its worth it

Yes. Please be mindful about the resources you’re taking. If others feel exhausted they usually just ignore you.

It certainly took some research to get it working. Even now I still have some things to look into to ensure everything is functioning properly. Mainly due to Whonix complicating things a bit.

True but I still enjoy helping so it’s mainly not a problem. Whonix-specific information can be a bit hard to find especially for LND. So yeah, it’s still okay to ask especially if you end up in a dead end.

1 Like

I’ve done some research and bind=10.152.152.11:8334=onion would be most appropriate but it does not work with the bitcoind onion-grater that is shipped by default. For now use what I suggested earlier.

I will be posting here when I make a pull request regarding it:

http://forums.dds6qkxpwdeubwucdiaord2xgbbeyds25rbsgr73tbfpqpt4a6vjwsyd.onion/t/bitcoin-core-onion-grater-profile/6216

1 Like

thanks for sticking with me. Look can you in a simple way explain why I have to use onion-grater? I dont understand because I dont even know what onion grater is?

So, Whonix Gateway routes everything through Tor. Tor is being controlled by Tor Control port on the gateway. From perspective of Workstation Tor control works as if Tor was running locally and Tor can be controlled on 127.0.0.1:9050 like regularly. However, for security reasons, onion-grater acts as a proxy between Whonix Workstation and the actual Tor Controller running on the Gateway. It limits how Workstation can control Tor.

Now, LND, when setup with Tor, requires that it needs to be able to create Onion services for full functionality. It needs to be able to add and delete onion services. onion-grater profiles enable that functionality on Whonix Gateway. For clarity, onion-grater runs and is configured on the Gateway.

The reason I recommended doing some research is because you need to understand these things to be able to wrap your head around more complex things. It took me quite a bit of time to get LND up and running properly. I can, of course, help with configuration details but you really need to get a good understanding of basics by reading the forum and searching on the internet on your own.

1 Like

alright, thanks… but lnd needs onion services if its gonna be public no? I am gonna use lnd to just pay a merchant, than my node connects to their node, correct? any good resources besides docs.lightning.engineering?

In that case you might be fine without setting up LND to allow incoming connections. I mostly used that as a resource. Not sure of anything that would be better to be honest.

Okay I am right now reading the docs on onion grater (onion-grater, a Tor Control Port Filter Proxy). So I dont need all of this? I can just install lnd without needing onion grater? But lnd will need some incoming connections, no? the receiver of me payment has to make a connection with my node right?

I believe that when you are making payments that you initiate the connection. In that case, the receiver does not need to initiate a connection with you again.

I think you will not need onion-grater if you do not specifically enable incoming connections.

2 Likes

that would be really awesome… so you set it up because you wanted to offer a router to the lightning network to support it I presume?

Btw its funny that exact is not reachable now for me (Onion site disconnected)

Yes, exactly.

1 Like

Very nice of you :slight_smile: that is some genuine kindness.

I am installing lnd now, Ill play around with the btc core setup now (trying to run neutrino mode, cause my btc is pruned as hell)

Merged, thanks!

@Patrick

So, I’ve made a GitHub repository dedicated to LND on Whonix.

I have not had a chance to update the Wiki yet but have not forgotten about it. A link to the GitHub repository could be added for the time being until I have time to port it. Testers are needed also incase I’ve forgotten some steps.