How to Set Up a Bitcoin Lightning Network Node (4 Easy Steps)

Andrew Griffiths
HackerNoon.com
2 min readApr 4, 2018

--

This guide will take you through setting up a machine running ubuntu/debian as a lightning network node.

1. Install Bitcoind

2. Install C-Lightning

c-lightning is blockstream’s lightning network daemon.

3. Configure Bitcoind and C-Lightning

Create a file at ~/.lightning/config with the following contents.

Create a file at ~/.bitcoin/bitcoin.conf with the following contents.

4. Sync with the blockchain

This step will take 1–4 hours depending upon the speed of your internet connection.

Run the bitcoin daemon.

In another terminal window run the lightning daemon.

Check everything is running correctly.

Check the blockheight of your target blockchain using an explorer to discover how far through the syncing process you are.

Conclusion

You’ll want to be running your node on machine that is permanently switched on and connected to the internet. Restarting the daemons even after they’ve downloaded the blockchain takes a long time as they have to reindex transactions in memory. Furthermore, you’ll want your node constantly available so it can accept and route payments, earning you BTC.

Personally I’ve used an old laptop which I leave switched on and connected to my router 24/7. For convenience I’ve set up ssh access to it so I can make payments using it. Check out my guide on how to make lightning payments to learn how to do this.

Originally published at andrewgriffithsonline.com.

--

--

Andrew Griffiths
HackerNoon.com

Technology consultant helping companies build and scale using serverless technology https://andrewgriffithsonline.com/