Having troubles setting up lightning network node on Mac, trust me its easy peezy.

Step:1 Go to bitcoin.org and download the official Bitcoin Core wallet, lets make task easy for you guys, follow the URL for downloads page:

Once you download the wallet, Remeber by default the core wallet has configurations to run against production mainnet so try not to sync the whole production chain, as we are doing this for testnet only. So once download of wallet is complete run it once, this will ask for directory creations, dont change it keep it default, and then close the wallet.

Step:2 Once the wallet download is complete, you need to traverse to the application support directory, remember its the same directory which the first run of core wallet asked for. once traversed to the Bitcoin application directory open up editor of you choice and create the following file bitcoin.conf

now since i already have the file created, so we will talk about a little bit here about parameters:

testnet=1, tells the core wallet to run on testnet instead of production.

server=1 tells the bitcoin QT to accept JSON-RPC commands.

rpcuser=xyz you can choose anything you like, but in simple words its your username for JSON-RPC connections.

rpcpassword=xyz password for your rpcuser.

txindex=1 allow manual pruning ( this deletes older blocks to manage storage, since we are running testnet, its OK to save some disk space ).

zmqpubrawblock=tcp://127.0.0.1:29000 this will publish the raw blocks on you local at port 29000

zmqpubrawtx=tcp://127.0.0.1:29000 similar way for publishing raw tx.

So all set up with bitcoin.conf ? if so we are halfway done and you have successfully configured your core wallet to run on testnet, lets test Core wallet on testnet.

Step3: Lets fire up Bitcoin core wallet again, and notice few things which would confirm that you are infact running the Bitcoin-Qt on test net.

once on testnet the core wallet shows the splash screen in green with testnet mentioned, compare it with picture below. notice [testnet] on top right corner and the Bitcoin icon turned green, dont you worry you are not running any thing related to bcash :).

now let it sit there for may be an hour or two and let it download the whole testnet chain. you can confirm this by using Help>Debug Window. look for the last block time, is it in around 10 mins difference from current time, if so you are all set.

Step 4: Alright, so we have now chain fully downloaded and now we can proceed to the next step. Look at the last picture, remember Help>Debug Window ? open that again and this time move on to Console Tab.

This step is important!

type the command getnewaddress to generate new address. Then copy the newly generated address, now type the command addwitnessaddress “paste address you generated earlier” , this inturn will generate a segwit address for you, now make a note of the address ( the one which starts with 2 ) which you just generated by addwitnessaddress command.

now go to https://testnet.manu.backend.hamburg/faucet and send some test bitcoins to the address which starts with 2, in other words send it to segwit address. we converted a legacy address to segwit address by using the command addwitnessaddress. once done let it settle down on the blockchain.

Step 5: We are done establishing the base now, lets build tower on it. Lets start by installing JDK first, just in case if you dont have yet.

lets start by installing homebrew, its a pacakage manager which can help you to get out of the woods not just now but in future as well. fire up the following on terminal

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install JDK by firing up following:

brew cask install java

Verify by following

brew cask info java

download the eclair gui from here you can use command line if you are comfortable with it, but lets go with gui.

once download is complete, try running it from downloads folder ( or the location where you have kept it ). Damn errors. Stay with me, its fine, but did we created the configuration for eclair to tell it what to do. hell no lets create one.

Traverse to the ./eclair and create a file eclair.conf with your choice of text editor.

following are the parameters which would you need to create the bare minimum setup. remember rpcuser and rpcpassword needs to be the exact same which you created in bitcoin.conf in step2. public-ips parameter is required if you want to announce the node on the ACINQ network. This is public ip and can be obtained from here

eclair.server.port=9735

eclair.node-alias=”anything”

eclair.node-color=”49daaa”

eclair.bitcoind.rpcuser=”xyz”

eclair.bitcoind.rpcpassword=”xyz”

eclair.bitcoind.zmq=”tcp://127.0.0.1:29000"

eclair.server.public-ips=[“xx.xx.xx.xx”]

save the file and exit, fire up the eclair gui which we downloaded from github again, do you see something like below except you wont be having channels open.

use the channel drop down, and commit some test bitcoins to the channels. use the acinq explorer to find out nodes and click those tiny colored dots to get the node information, once you click the node, node information appears on top right corner, use the Copy URI link to get node address.