How to run a Lightning Network node on Windows

Johnny
Johnny
Jun 24, 2018 · 6 min read

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.

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.

This guide is based on the one found on eclair’s GitHub and wiki and has been modified to be more beginner-friendly.

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:

Image for post
Image for post

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=0server=1rpcuser=your-rpc-user-hererpcpassword=your-rpc-password-heretxindex=1zmqpubrawblock=tcp://127.0.0.1:29000zmqpubrawtx=tcp://127.0.0.1:29000addresstype=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:

Image for post
Image for post

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!

Image for post
Image for post

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:

Image for post
Image for post

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:

Image for post
Image for post

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:

Image for post
Image for post

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.

Image for post
Image for post

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:

Image for post
Image for post

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

Image for post
Image for post

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.

Image for post
Image for post
Image for post
Image for post

Coinmonks

Coinmonks is a non-profit Crypto educational publication.

Sign up for Coinmonks

By Coinmonks

A newsletter that brings you week's best crypto and blockchain stories and trending news directly in your inbox, by CoinCodeCap.com Take a look

Check your inbox
Medium sent you an email at to complete your subscription.

Johnny

Written by

Johnny

posts on bitcoin, cryptocurrency and blockchain. bc1qf0atrumvq46gs5r4clazmxyl038zdcmtku553y

Coinmonks

Coinmonks

Coinmonks is a non-profit Crypto educational publication. Follow us on Twitter @coinmonks Our other project — https://coincodecap.com

Johnny

Written by

Johnny

posts on bitcoin, cryptocurrency and blockchain. bc1qf0atrumvq46gs5r4clazmxyl038zdcmtku553y

Coinmonks

Coinmonks

Coinmonks is a non-profit Crypto educational publication. Follow us on Twitter @coinmonks Our other project — https://coincodecap.com

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store