Would you like to learn how to do a Litecoin Lightning node installation? In this tutorial, we are going to show you how to install a Litecoin Lightning node using a computer running Ubuntu Linux.

Hardware List:

The following section presents the list of equipment used to create this Litecoin tutorial.

Every piece of hardware listed above can be found at Amazon website.

Litecoin Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Litecoin.

Tutorial – Litecoin Node Installation

First, you need to install a regular Litecoin Node.

On the Ubuntu Linux console, use the following commands to install the BerkleyDB package:

# add-apt-repository ppa:bitcoin/bitcoin
# apt-get update
# apt-get install libdb4.8-dev libdb4.8++-dev

You must use BerkleyDB version 4.8 for everything to work.

Use the following commands to install the required libraries and the required packages:

# apt-get install libboost-all-dev libzmq3-dev libminiupnpc-dev
# apt-get install curl git build-essential libtool autotools-dev
# apt-get install automake pkg-config bsdmainutils python3
# apt-get install software-properties-common libssl-dev libevent-dev

Create a directory to the node software and download the Litecoin package.

# mkdir /downloads
# cd /downloads
# git clone https://github.com/litecoin-project/litecoin.git

Compile and install the Litecoin node software.

# cd litecoin
# ./autogen.sh
# ./configure
# make
# make install

Create a Litecoin configuration file and choose a username and a password.

# mkdir ~/.litecoin
# vi $HOME/.litecoin/litecoin.conf

Here is the content of the litecoin.conf file:

The only thing that you need to change is the username and password from the last two lines.

txindex=1
server=1
daemon=1
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28332
rpcuser=virtualcoin2018
rpcpassword=kamisama123

In our example, we choose the username virtualcoin2018 and the password kamisama123.

Start the Litecoin node daemon using the following command:

# litecoind -daemon

Wait for the synchronization of the blockchain to end.

The blockchain synchronization might take days or weeks.

Use the following command to verify the status of the blockchain synchronization:

# tail -f ~/.litecoin/debug.log

Tutorial – Lightning Node Installation

Use the following commands to install the GO software:

# mkdir /downloads/go -p
# cd /downloads/go
# wget https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz
# tar -C /usr/local -zxvf go1.10.1.linux-amd64.tar.gz

In our example, the Go software was installed under the /usr/local folder.

In order to work properly, the Go software expect the system to have a set of environment variables.

Let’s create a file to automate the required environment variables configuration.

# vi /etc/profile.d/go.sh

Here is the go.sh file content.

#/bin/bash
export GOROOT=/usr/local/go
export GOPATH=$GOROOT/work
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

Now, let’s reboot the computer.

Don’t forget to restart the Litecoin service daemon.

# reboot
# litecoind -daemon

Use the following command to install DEP.

# go get -u github.com/golang/dep/cmd/dep

Use the following commands to install LND.

# go get -d github.com/lightningnetwork/lnd
# cd $GOPATH/src/github.com/lightningnetwork/lnd
# make
# make install

Now, let’s try to update LND to the last version.

# git pull
# make
# make install

Use the following command to test your LND installation.

# make check

Use the following command to start your lightning node.

You need to change the litecoind.rpcuser to your bitcoin username.

You need to change the litecoind.rpcpass to your bitcoin password.

You need to change the externalip to your node external IP address.

# lnd –litecoin.active –litecoin.mainnet –debuglevel=debug –litecoin.node=litecoind –litecoind.rpcuser=virtualcoin2018 –litecoind.rpcpass=kamisama123 –litecoind.zmqpath=tcp://127.0.0.1:28332 –externalip=54.202.30.165 –noencryptwallet

You may wish to create an LND configuration to make things easier.

# vi /root/.lnd/lnd.conf

Here is the content of the lnd.conf file:

The only thing that you need to change is the Litecoin username, password, and external IP address.

[Application Options]

debuglevel=debug
debughtlc=true
maxpendingchannels=10
noencryptwallet=true
externalip=54.244.145.182  #CHANGE HERE

[Litecoin]

litecoin.mainnet=true
litecoin.active=1
litecoin.node=litecoind

[Litecoind]

litecoind.rpchost=localhost
litecoind.rpcuser=virtualcoin2018 #CHANGE HERE
litecoind.rpcpass=kamisama123 #CHANGE HERE
litecoind.zmqpath=tcp://127.0.0.1:28332

If you created the lnd.conf file, use the following command to start the Lightning network node.

# lnd

Wait for the LND synchronization of the blockchain to end.

The LND blockchain synchronization might take hours or days.

Here is a list of useful commands:

# lncli getinfo
# lncli getnetworkinfo
# lncli describegraph
# lncli newaddress np2wkh
# lncli walletbalance