Bitcoin Lightning Network Node Easy Setup Tutorial for Windows Desktop Users — A how to guide (updated 2/11/2019)
I’ve noticed recently plenty of excitement for layer 2 scaling solutions, like Lightning Network (LN), but a lack of simple documentation for setting things up. While it may seem that using LN on the testnet is for programmers and Linux users only, it’s actually not that difficult. Getting setup with the current LN desktop clients for Windows is actually not too hard, and can be accomplished in about 30 minutes. I was pleasantly surprised.
— UPDATE 2/11/2019: Getting setup on testnet is still quite easy and quick. Continue reading for that; however, if you want MAINNET Lightning Network today, Pierre Rochard has an excellent guide: https://medium.com/lightning-power-users/windows-macos-lightning-network-284bd5034340
If you want to begin experimenting on Windows with testnet ASAP, read on!
What these desktop clients are doing are creating an easy GUI for you to interact with the LND daemon, similar to how Bitcoin Core and Bitcoin Knots help you to interact with bitcoind, the bitcoin daemon. You’ll see later on that both Zap and Lightning-App will display the exact same information albeit with different interfaces.
The goals of this tutorial are:
- Installation of Lightning-App or Zap Desktop (leading desktop LN applications)
- Open a payment channel
- Buy a virtual coffee from Starblocks (starblocks.acinq.co)
- Receive a lightning payment
For this tutorial, I will be using a Windows 7 desktop. If you’ve ever sent or received a Bitcoin transaction, you have all the pre-requisite knowledge required to walk through the tutorial.
Part 1a: Installing Lightning-App for Desktop (5–10 minutes!)
Edit: 2/11/2019 — Setting up Lightning-App for desktop is now as easy as downloading the win32 .exe from GitHub, and launching the installer! https://github.com/lightninglabs/lightning-app/releases
Feel free to follow Part 1B for Zap-Desktop! They’re just different layouts.
After installation and upon launch, you should see the following. Syncing can take 5–10 minutes:
Part 1a: Installing the Zap-Desktop App (optional)
Installing the Zap-Desktop app is just as simple as the Lightning-App. Personally, I enjoy the Zap interface more than the Lightning-App.
So just like before, go ahead and visit https://github.com/LN-Zap/zap-desktop/releases and download the win32 .exe.
After installation, we are ready to launch the application! Just double-click the shortcut created, and walk through your wallet setup. Remember, syncing can take some 5–10 minutes:
Part 2: Opening a payment channel (~30 minutes, easy)
The rest of this tutorial is just playing inside the applications. Much less technical knowledge is needed; however, this is where you will likely experience the minor hiccups that the beta software still has.
First thing, we need some free testnet Bitcoins! Pull up your wallet’s address, as seen below:
Now go to https://coinfaucet.eu/en/btc-testnet/ and send yourself some free testnet BTC. Once they have 3 confirmations, you will be able to use the testnet BTC to open a payment channel.
For this example, we will open a payment channel with Lnd.fun, as they have been fairly reliant for me. If you are using Zap, first click on the “Add channel” button, and select “Connect Manually”:
Then paste in “firstname.lastname@example.org:9735” for the pubkey@host, and select a small amount of tBTC to open the channel with.
For the Lightning-App, click the icon on the top left of the interface, then click “+Add” on the top right
Just paste email@example.com:9735 after visiting the “channels” tab and pressing “create channel”:
After 3 confirmations on the blockchain, the channel will be open (some 30 minutes). I also have noticed the channels are sometimes active, and sometimes inactive. The other node must be online when trying to make a payment. If you are having connectivity issues, make sure you don’t have any firewalls blocking lnd.exe, and also try forwarding port 9735. I had to do both before I established connectivity. You’ll see a balance available in your off-chain balance:
Part 3: Pay for a virtual coffee
Go to https://starblocks.acinq.co/#/, add one of the coffees to your cart, and hit checkout. Copy the highlighted portion:
Then go to your LN app and paste the payment request in:
Then hit pay! Now at this point, payment routing is pretty bad. You will likely receive a “routing failed” error. If so, try to connect to more channels. Alternatively, try checking out some faux-mobile minutes at BitRefill.com! If you have a direct payment channel with BitRefill, you will be able to complete your payment without a hitch: https://blog.bitrefill.com/lightning-payments-on-testnet-for-bitrefill-b3edac845654
When it works, it works instantly, and is quite awesome to see!
Part 4: Get paid!
Finally, try testing out receiving funds. Create a payment request in one of the apps:
Now to practice receiving funds, go and open up a LN web-wallet at htlc.me and try sending funds to yourself, or download the eclair testnet wallet on your Android phone, and try sending yourself a payment. Another fun exercise is opening a payment channel with yourself from your eclair wallet to your desktop node.
Lightning Network, while certainly not ready for the spotlight, is at a point where one can very clearly see the final product vision, and the potential it holds. There are more than just technical challenges as well; it is yet to be seen how much friction is caused by opening/closing channels on-chain (since it will require fees), how efficient routing will become, how centralized nodes will be, and what types of malicious activity could occur. I’m optimistic however. We’ll see very soon :)
Join the discussion! And as always, I appreciate any feedback and/or corrections.
edit: Also have seen some questions asking if you need to download the full Bitcoin blockchain to use Lightning Network. The short answer is no.
The longer answer is that this guide is to setup a light client, as opposed to a full node. From an end-user perspective, and in terms of functionality, there is no difference. From an underlying architecture standpoint, the difference is that you are connecting to another client running a Bitcoin full node. So you are making a trade-off between convenience and security. The same trade-off you make when deciding between running an SPV wallet, like Electrum, and running a Bitcoin full node. For 99% of users, it doesn’t matter, and you may as well just do the light client. But if you’re generous and want to support the network, run a full node ;)
Also currently for mainnet, until Neutrino support is complete, you will need to download the full BTC blockchain.
A great Zap YouTube video by the founder: https://www.youtube.com/watch?time_continue=11&v=dhpg_8D2FPI
Lightning App Slack:
More Lightning Apps and Wallets: