How to Set Up a Bitcoin Lightning Network Node

Lightning network.

The Lightning Network is by far the most promising scaling solution for bitcoin. Lightning proponents promise to boost bitcoin’s network speed from 7 TPS (transactions per second) to several millions per second. 

Now that’s an astronomical rise in scalability, and it will likely take several years or a decade before we reach to that level. We can, however, set up our own lightning network node today and enjoy the perks of being an early adopter.

This article is a step-by-step guide on how to install and deploy your very own lightning node. But before we dive into it, let’s dig deeper into why we should do so in the first place.

The bitcoin network is prone to high fees and slow transaction confirmations, whenever a large volume of users utilize it for payments. We had witnessed this at the height of market exuberance in December 2017, where one transaction could take days and/or cost $50 in fees. Apparently, this is a concerning hindrance to mass adoption.

Here’s why you should set up your own lightning network node:

  • You can help the bitcoin and lightning network become more decentralized, which you should if you have a vested interest in the success of bitcoin (most of us do).
  • You can send and receive micropayments (or large payments) almost instantly and with ultra low fees.
  • You can earn a small income from the transactions that pass through your payment channels.

How To Set Up a Lightning Network Node

There are a few implementations of the lightning network but this guide will only cover Eclair as it seems to have the most user-friendly setup.

Download and Set Up the Bitcoin Blockchain

First of all, you need to download Bitcoin Core and launch the software.

Welcome to the Bitcoin Core (64-bit) Setup Wizard

The bitcoin blockchain is currently over 200GB so be sure you have enough storage space. While it is being downloaded, you should take your time to edit the configuration file with the appropriate settings.

Open the bitcoin.conf file in the application by choosing Settings →Options → “Open Configuration File”. An alternative would be to check it at your file system at C:\Users\[user]\AppData\Roaming\Bitcoin

Open configuration file.

If you can’t find the file in the Bitcoin folder, you’re gonna need to create it. If that’s the case, create a .txt file (use notepad) and paste the following characters:

testnet=0

server=1

rpcuser=username

rpcpassword=password

txindex=1

rpcport=8332

zmqpubrawblock=tcp://127.0.0.1:29000

zmqpubrawtx=tcp://127.0.0.1:29000

addresstype=p2sh-segwit

deprecatedrpc=signrawtransaction

Replace “username” and “password” with your chosen credentials. Close your TEXT file and save it as “bitcoin.conf”. Make sure it becomes a CONF file and not a TXT file. Now all that’s left to do is wait for the entire blockchain to synchronize. This may take hours or days depending on your internet speed. Once that’s done, restart the program.

Download and Set Up Eclair

First you must download the Eclair node. Then, open the clair.conf file at C:\Users\[user]\eclair. Make sure to check “View Hidden Files” in your file explorer options under “View” tab. Input the following:

eclair.chain=mainnet

eclair.node-alias=”node-alias”

eclair.bitcoind.rpcport=8332

eclair.bitcoind.rpcuser=username

eclair.bitcoind.rpcpassword=password

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

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

eclair.node-color=”ffffff”

This step is necessary to connect the program to the Bitcoin Core mainnet (main network). The rpc “user and password” should match exactly what you input in bitcoin.conf.

Eclair and Bitcoin Core needs to be running simultaneously for this to work. If everything is working fine, Eclair should open with a normal graphic interface and not an error message. The bottom row of the application will show you your personal lightning public key. You can confirm if you are connected to the mainnet in lower-right corner.

Open a Channel

Now’s the time to finally open some channels and begin sending/receive lightning network transactions. We recommend you check 1ML as it is a goldmine for searching lightning nodes and exploring the network. 1ML also provides important statistics that give you a snapshot of the overall progress (or decline) of the entire network.

Now once you find a node that you want to link to, click Channels →Open Channel then copy the node address and paste it in “Target Node URI”. Make sure your “Capacity” is within the available balance of your bitcoin wallet.

Fee rate is the amount you charge for allowing payments to pass through your node so input your whatever you think is fair.  Don’t charge too high otherwise no one would want to pass through your node. We recommend you stick with Eclair’s default rate.

Screen shot Bitcoin core.

“Public Channel” needs to be checked if you want other users in the network to find your node.

Once you’re done, click “Connect” to create your first channel. The “State” section will say WAITING_FOR_FUNDING _CONFIRMED until the transaction is fully confirmed on the blockchain. Afterwards, it will switch to NORMAL.

At first, your node can only send payments in the lightning network. Therefore, you will need to send a payment to yourself from another lightning wallet, or have a friend pay you from their wallet, so you can open a receiving channel. Once you have everything sorted out, you should be able to send and receive lightning payments easily.

Be warned that although lightning allows you to enjoy near instant payments with negligible fees, it is still in beta phase, which means it is not fully developed. Don’t store your investment funds in your lightning wallet and above all, don’t send huge payments on lightning. There’s still a possibility that you’ll lose them, albeit a small one, but you can’t be too careful with your money.

If you want to send more than $200 worth of bitcoins, you’re better of using the on-chain network. All things considered, you should play with lightning payments for a bit just to get a “feel” of it. There are probably hundreds of online stores that accept lightning. You can check AcceptLightning for a start.

Conclusion

The lightning network setup process is a bit taxing but can be quite rewarding once you get to use the software. The speed and cost of payments on lightning are incomparably lower than on bitcoin. By the time the digital currency space becomes crowded again, we probably won’t be dealing with slow and costly transactions anymore.

Related Articles

Subscribe to Bitcoin Market Journal newsletter for more step-by-step guides and tips pertaining to the digital currency space.

Comments are closed.