How to run a Lightning Network node on Windows

This article will go through the steps needed to setup a Lightning Network (LN) node on Bitcoin mainnet using a Windows computer. We will be using ACINQ’S eclair implementation.

Requirements:

– A computer capable of running a Bitcoin full node

– A small amount of bitcoin that could potentially be lost (ideally at least $5 worth)

I will also assume you have a general idea of what the LN is (article explaining Lightning Network here: https://medium.com/@johnny_pham/lightning-network-how-does-it-work-ceeeda8ad21e). This guide is based on the one found on eclair’s github (https://github.com/ACINQ/eclair and https://github.com/ACINQ/eclair/wiki/Configure) and has been modified to be more beginner-friendly.

Why should you run a LN node?

1. Harness the full power of the LN

2. Support the development of both the Bitcoin network and LN

3. Learn about a new technology

4. Be part of a digital network that may change the world

WARNING: eclair and other LN implementations are still in beta and any funds committed to your LN node could be permanently lost. Use only amounts you are comfortable with losing.

Ok, let’s get started!

What is eclair?

Eclair is simply one implementation of the LN; in other words, it is one of many available programs that allows users to interact with the LN, other popular examples being c-lightning and lnd. This is similar to how Bitcoin Core is only one way of running a Bitcoin full node. Bitcoin Core itself is not Bitcoin, just like eclair itself is not the LN.

Step 1. Download eclair at https://github.com/ACINQ/eclair/releases. The first link contains the executable installer. Install eclair on your Windows computer.

Step 2. Ensure your Bitcoin full node meets the following specifications.

a. It must be version 0.16 or higher. The current version is 0.16.1. Download the latest version if needed.

b. It must be non-pruning; that is, it must contain a complete copy of the Bitcoin blockchain. Download the blockchain if needed.

c. It must be a transaction indexing node. This is done by modifying your bitcoin.conf file, which you will have to create if you don’t have one yet:

Go to C:\ > Users > your_username > AppData > Roaming > Bitcoin

If you cannot find the AppData folder, do the following:

Search your computer for “File Explorer Options”. Go to the “View” tab. Select “Show hidden files, folders, and drives”.

In your Bitcoin folder, create a new text document called “bitcoin.txt”. Edit the properties of the file and rename the “.txt” extension to “.conf” (or if your file explorer is set up to view extensions, simply change the extension by renaming the file). Now open up bitcoin.conf with a text editor and add the following:

testnet=0
server=1
rpcuser=your-rpc-user-here
rpcpassword=your-rpc-password-here
txindex=1
zmqpubrawblock=tcp://127.0.0.1:29000
zmqpubrawtx=tcp://127.0.0.1:29000
addresstype=p2sh-segwit

If your version of Bitcoin Core is 0.17 or higher, add the following to bitcoin.conf:

deprecatedrpc=signrawtransaction

Your rpcuser and rpcpassword can be set to anything. Leave everything else as it is. Your bitcoin.conf should look something like this:

Contents of bitcoin.conf

Save your updated bitcoin.conf file.

You will now have to restart Bitcoin Core for the changes to take effect. When it starts up again, it will begin indexing the entire blockchain. This can take up to a few days depending on how fast your computer is. Be patient; after this, there’s not much more to go before your LN node is up and running!

The estimated time is not accurate

You can continue to step 3 while waiting for your full node to index.

Step 3. We will now edit eclair’s configuration in a similar manner. Create an “eclair.conf” file in C:\Users\your_username\.eclair:

Add the following to eclair.conf:

eclair.chain=mainnet
eclair.bitcoind.rpcport=8332
eclair.bitcoind.rpcuser=yourusername
eclair.bitcoind.rpcpassword=yourpassword
eclair
eclair

Set “yourusername” and “yourpassword” to the username and password you specified in bitcoin.conf.

You can give your LN node any name by setting eclair.node-alias.

Eclair.node-color is the color your node will have on LN explorers such as https://lnmainnet.gaben.win/. The color is specified in hexadecimal format.

Your eclair.conf should look something like this:

Contents of eclair.conf

Save your changes to eclair.conf.

Step 4. Once your Bitcoin full node is indexed and synced, start up eclair with your Bitcoin node running in the background. If you get an error message from eclair saying that a Bitcoin full node could not be found, your full node is not properly configured. Go through step 2 again.

Step 5. To establish your first LN payment channel, you will need to fund your Bitcoin Core wallet. Eclair will use any funds it finds in your Bitcoin Core wallet. Any returned bitcoin from closing a channel is also sent back to your wallet.

Send some bitcoin to your Bitcoin Core wallet. Again, since eclair is still in beta, any funds used to open a LN payment channel can be permanently lost. Use amounts you don’t mind losing. Some nodes will require payment channels to be above a certain value to connect to them, so I recommend at least 60,000 satoshis (0.0006 BTC, about $5 worth at the time of writing).

Step 6. Once your wallet is funded, open a channel in eclair:

You will need to find a target node URI. If you don’t already have one in mind, you can find one at https://lnmainnet.gaben.win/ or https://1ml.com/. Click on a node and look for the URI of the node.

Choose how much bitcoin you want to fund your channel with. Do not send all of your bitcoin or you may get an error. The fee rate is the fee with which your bitcoin transaction will be sent. The push amount is optional. Double check everything and then click connect. Your channel’s status will be updated:

Once your transaction confirms on the Bitcoin network, your LN payment channel has been established:

That’s it! You now have an operational Bitcoin full node and Lightning Network node.

You can check for your node at https://lnmainnet.gaben.win/. It usually takes no more than 30 mins for a node to appear.

Attribution–This article was originally published on Coinmonks publication by Johnny Pham

1 comment

  1. Hola espero que esté a la altura de cumplir con el trabajo que me vais a encontrar os prometo que no voy a fallar gracias un saludo

Write your comment