Compiling the Litecoin daemon from source on Debian

From lurkmore wiki
Revision as of 02:28, 11 January 2014 by Kyrio (talk)
Jump to navigationJump to search

The process for compiling the Litecoin daemon, litecoind, from the source code is pretty simple. This guide is using Debian Linux, though it should not need many modifications for any distros which are forked from Debian, such as Ubuntu and Xubuntu.

Update and install dependencies

apt-get update && apt-get upgrade
apt-get install ntp git build-essential libssl-dev libdb-dev libdb++-dev libboost-all-dev libqrencode-dev

wget http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.8.tar.gz && tar -zxf download.php\?file\=miniupnpc-1.8.tar.gz && cd miniupnpc-1.8/
make && make install && cd .. && rm -rf miniupnpc-1.8 download.php\?file\=miniupnpc-1.8.tar.gz

Compile the daemon

Download the source code

git clone https://github.com/litecoin-project/litecoin

Compile litecoind

cd litecoin/src
make -f makefile.unix USE_UPNP=1 USE_QRCODE=1 USE_IPV6=1
strip litecoind

Add a user and move litecoind

adduser litecoin && usermod -g users litecoin && delgroup litecoin && chmod 0701 /home/litecoin
mkdir /home/litecoin/bin
cp ~/litecoin/src/litecoind /home/litecoin/bin/litecoind
chown -R litecoin:users /home/litecoin/bin
cd && rm -rf litecoin

Run the daemon

su litecoin
cd && bin/litecoind

On the first run, litecoind will return an error and tell you to make a configuration file, named litecoin.conf, in order to add a username and password to the file.

nano ~/.litecoin/litecoin.conf && chmod 0600 ~/.litecoin/litecoin.conf

Add the following to your config file, changing the username and password to something secure:

daemon=1
rpcuser=<username>
rpcpassword=<secure password>

You can just copy the username and password provided by the error message when you first ran litecoind.

Run litecoind once more to start the daemon!

Using litecoind

litecoind help

The above command will list all available functions of the Litecoin daemon. To safely stop the daemon, execute litecoind stop.

Related articles