Run A Lightning Node

Nodes are a fundamental building block of any blockchain infrastructure that has the intent of becoming decentralised. The more nodes running on your network, the more copies of the ledger are live, and the more eyes watch the bitcoin network for any issues. Nodes are where the blocks of data that make up the blockchain are stored and validated with consensus rules.

As the bitcoin network expands, nodes have taken on more roles and provide more utility than the full nodes we started using in the early days. As bitcoin scales in layers, it requires nodes to validate both the primary and secondary layers living on top of it.

The primary goal of nodes with layer two access is to ensure that the rules of the second layer are running correctly and to verify settlement between layers. Running a lightning node helps provide additional connections between the two layers and gives you access to the broader bitcoin ecosystem.

running a lightning node

A bitcoin node and a lightning node differ in a few key ways. The biggest difference is that a bitcoin node must verify every transaction on the bitcoin network. In contrast, A Lightning Network node must check the validity of transactions that it is directly interacting with through established payment channels.

For the lightning network to scale, it requires more nodes locking in bitcoin and making it available on the lightning network. The more nodes running, the more payment channels are created, the more payment channels, the easier it becomes to route payments. The lightning nodes essentially create a more robust mesh network of payment connections to ensure that funds can find the cheapest and fastest route to their destination.

A lightning bitcoin node is any computer that runs any of the lightning bitcoin implementations. There are currently three different implementations of lightning namely:

  1. ACINQ — Eclair
  2. Lightning Labs — lnd
  3. Blockstream — lightning

 

A Lightning node can be run as software or use a stand-alone hardware device that connects and interacts with the main blockchain network and within the Lightning Network itself.

The main blockchain here refers to any blockchain network on which LN is applicable, such as Bitcoin.

Nodes in the Lightning Network differ from those in the Bitcoin network, mainly on how they verify transactions. Nodes in the Bitcoin network must verify every transaction on the blockchain. In contrast, the Lightning nodes only verify the transaction interacting directly with the node and the various channels connected to that node.

Unlike a bitcoin full node, a lightning node can also be used as a method of income for node runners. Creating channels and providing liquidity will see you earn fees through the lightning network for facilitating transactions. This provides an added incentive for users who run bitcoin full nodes also to run bitcoin lightning nodes.

Since the lightning network is a different environment that uses the bitcoin base chain as its final settlement layer, therefore lightning requires a different set of rules and software to govern it. The lightning network doesn’t have a native token or a blockchain but is a peer to peer exchange of funds using payment channels.

Running a Lightning Network node is essential for two reasons.

  1. Monitor the underlying blockchain (bitcoin)
  2. Interact with other Lightning Network nodes to transact money

Monitoring the network

Every Lightning Network node must monitor the blockchain or blockchains that it holds tokens on. When talking about the Lightning Network, most people talk about it running on bitcoin. This is true, but lightning is blockchain agnostic and can run on any chain. While lightning currently runs mainly on the bitcoin blockchain, it could also run on sidechains like the liquid network, state chains and the RGB network too. 

Due to the way the game theory is played within the Lightning Network, it is imperative that a Lightning Network node monitors the underlying blockchain it holds tokens with. If the Lightning Network node does not do this properly, funds can be stolen from you.

A Lightning Network node also interacts with other nodes on the peer-to-peer network. When talking about Lightning, you need to remember there are two separate networks we are interacting with.

  1. The blockchain’s (bitcoin) peer-to-peer network
  2. The Lightning peer-to-peer network

Keeping track of balances on the network

The Lightning p2p network is where money is transacted on the Lightning network. It is a Lightning Network node’s responsibility to exchange money with other Lightning nodes. 

Each Lightning network node is responsible for keeping track of who has what in the channel. The lightning node is essentially like a bar tab, and the node is the bartender; you can make as many transactions as you like, given the underlying funds are available. When you want to leave the bar, the bartender swipes your card, and you pay one transaction for all the drinks you had that night. 

The same is true with lightning, you’ve prepaid your lightning node, and you can earn or spend in lightning. When you want to leave a lightning network channel, you can close it and release the funds back to a wallet on the bitcoin blockchain.

You can run a lightning node on almost any desktop or laptop computer but note that lightning network nodes must be online at all times. Since you’re providing active liquidity to the network for transactions, your channels need to be online to be used, and if your node is down, your channels are down. 

It’s not always practical to have a computer running all the time, which is why specialised lightning node devices have become so popular. Running your node on a dedicated device will also minimise the attack surface of the software environment. Attack surfaces can be digital and physical; therefore, a computer that is also used to navigate the internet will be more vulnerable to a digital attack.

If you choose to run a stand-alone device as your lightning node, it will require some initial investment in hardware. There are quite a few options available, but one of the more popular and most user-friendly is a Raspberry Pi. 

Your hardware shopping list will look something like this:

  • Raspberry Pi Power Supply
  • Raspberry Pi 4
  • 16GB+ Micro SD card  
  • One terabyte SSD hard drive for data storage
  • LCD screen 3.5″ RPi Display, GPIO connection, XPT2046 Touch Controller
  • 5FT Ethernet cable
  • Power source 
  • SSD Enclosure
  • Case
  • Card Reader

Run lightning network software

Now that your device is up and running, it’s time to get the software to run the network; you can use software by:

  • RaspiBliz lightning node implementation
  • MyNode lightning node implementation
  • Umbrel lightning node implementation

For RaspiBliz

  • Navigate to this website and download the operating system. 
  • Then download the flasher from here
  • Next, flash the OS file onto your microSD card and insert this into your node.
  • This GitHub repository has more details on the RaspiBlitz Lightning implementation.

For my node

  • Find the guide here

For Umbrel

  • Download and install Umbrel OS.
  • Download and install Balena Etcher. This is done to flash the Umbrel OS file that we have downloaded in the previous step onto the microSD card.

The lightning network is open to support from the general public, and users or businesses can participate. Anyone can run a lightning node to facilitate transactions on the network.

If you want to start running a lightning node, here are two detailed guides.

 

Share with a friend

If you thought this information was helpful why not share it on your favourite social media network and encourage others to learn more about Bitcoin

The latest news from our blog

Cookie policy
We use our own and third party cookies to allow us to understand how the site is used and to support our marketing campaigns.