Lightning Network Install (Eng)

I am going to be very fast and quick setup process.

-This system need to be always online and you do not have any chance to change later so be careful to chose your system specs-

System Requirements

1- Static IP

2- Linux Ubuntu 16.10

3-300GB Min HDD area -at date 20.04.2018 with size of blockchain file is 180GB-

4-Min 4GB RAM and 1 core CPU (more is better because of blockchain size bigger when date is apporoach today)

or if you do not have this and have any electricity problem you may buy to vps

5- Optimum VPS Contabo 7 Euro/month

If you have other (static ip and hardware) you may install for free


Forward step by step. When you do CTRL+C after that click mouse right button to paste in linux. When you doing to one process please be patient to finish task. Some process may longer. Do not go forward when the process still continues.

First you need to Root permission

sudo -s

Now we are going to install Docker

— Docker —

sudo apt-get update
wget -qO- | sh

Now we are download blockchain for synchronize. This process up to 24+ hours


git clone
cd lightning-node
docker build . -t dougvk/bitcoind
mkdir -p /scratch/bitcoin/mainnet/bitcoind
docker run --name bitcoind_mainnet -d -v /scratch/bitcoin/mainnet/bitcoind:/data -p 8333:8333 -p 9735:9735 dougvk/bitcoind:latest

You can see with this two command how much space is used to for process and you can see which date syncing.

— check—

du -h /scratch

— log—

docker logs bitcoind_mainnet --tail "10"

When the synchronize reach to 180GB+ (as of today) you can forward to next process.

nano /usr/local/bin/bitcoin-cli (#this is notepad. Copy and paste 2nd and 3rd line)
#!/usr/bin/env bash
docker run --rm --network container:bitcoind_mainnet -v /scratch/bitcoin/mainnet/bitcoind:/data dougvk/bitcoind:latest bitcoin-cli "$@"
(#Now do ctrl+x and press "Y" then enter)

chmod +x /usr/local/bin/bitcoin-cli
bitcoin-cli getblockchaininfo

Bitcoin-cli getblockchaininfo provide to you results like “blocks”: 5xx…..,”. Compare to the block numbers with at website first block number. If it is +/-1 congratulations. You are doing well..

Now do not copy paste directly this command. We need to change our server address and alias such as name. Change to ‘— alias=NAMEWHATYOUPUTFOR — ipaddr=SERVERIP’ If you want you can change to your Alias color in line of code RGB. You need to search on internet hex code of colors then change it too.

mkdir -p /scratch/bitcoin/mainnet/clightning
docker run --rm --name lightning --network container:bitcoind_mainnet -v /scratch/bitcoin/mainnet/bitcoind:/root/.bitcoin -v /scratch/bitcoin/mainnet/clightning:/root/.lightning --entrypoint /usr/bin/lightningd cdecker/lightningd:latest --network=bitcoin --rgb=0066cc --alias=NAMEWHATYOUPUTFOR --ipaddr=SERVERIP--log-level=debug

This process will longer. Open another SSH connection

nano /usr/local/bin/lightning-cli   (#this is notepad. Just copy paste.)

#!/usr/bin/env bash
docker run --rm -v /scratch/bitcoin/mainnet/clightning:/root/.lightning --entrypoint /usr/bin/lightning-cli cdecker/lightningd:latest "$@"
(#press ctrl+x after that press ‘’y’’ then enter)

chmod +x /usr/local/bin/lightning-cli

Now you need to create new wallet address for BTC transfer. We need to do this for connect to other nodes fee. Do not worry this is down payment. You can take it back when you close channel. It is enough to send 0.004~0.0005 amount of BTC for the begining.

lightning-cli newaddr

Write and wait. Output is your Bitcoin Deposit address. Keep and store it.

lightning-cli listfunds

You can check with this command to receive payment.
After you receive payment you need to connect Lightning Network node. You do not need to connect with a high fee. Some channel can give a fund error. Try again with raise to fund amount.
You may not connect some channel. Do not worry. Try another.

lightning-cli connect 03b98a38e37d9f8ecec1568b7bc3090ff6fa2b18c6946eb631c72a300d55e76586@
lightning-cli fundchannel 03b98a38e37d9f8ecec1568b7bc3090ff6fa2b18c6946eb631c72a300d55e76586 20000
lightning-cli listpeers

After that you need to wait output to change CHANNELED_Normal. This is usually happen within 20~60 minutes.

Settings up your node fee

bitcoin-cli settxfee 0.002

You may look with this two command what you can do in system. Some command can change after update. This guide is update.

lightning-cli help
bitcoin-cli help

If everything is ok you can search your alias name with this website lnmainnet.gaben if you can not see your alias, wait 12 hours. Site needs to be update.

You may see one or two different color in line. Double color means to connection each other both ways. This is my LN address. After you connect write it to our Twitter address in under pinned tweet and provide your public information then everyone connect each other 🙂

If you any question please write to me.

PubKey  03b98a38e37d9f8ecec1568b7bc3090ff6fa2b18c6946eb631c72a300d55e76586
Alias   bithumb
URI	03b98a38e37d9f8ecec1568b7bc3090ff6fa2b18c6946eb631c72a300d55e76586@