This article will go through the steps needed to set up a Lightning Network (LN) node on Bitcoin mainnet using a Windows computer. We will be using ACINQ’S eclair implementation.
- 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.
If you want to run your node hassle-free, check these Lightning network and Bitcoin node providers
Why should you run an 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 allow 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. 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:
If your version of Bitcoin Core is 0.17 or higher, add the following to bitcoin.conf:
Your rpcuser and rpcpassword can be set to anything. Leave everything else as it is. Your bitcoin.conf should look something like this:
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!
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=mainneteclair.bitcoind.rpcport=8332eclair.bitcoind.rpcuser=yourusernameeclair.bitcoind.rpcpassword=yourpasswordeclair.node-alias=”your alias here (must be in double quotes)”eclair.node-color=ff9900
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:
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:
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.