Compiling the Litecoin daemon from source on Debian: Difference between revisions

From lurkmore wiki
Jump to navigationJump to search
No edit summary
m (9 revisions imported)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
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]].
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 ===
=== Update and install dependencies ===
Line 21: Line 21:
mkdir /home/litecoin/bin
mkdir /home/litecoin/bin
cp ~/litecoin/src/litecoind /home/litecoin/bin/litecoind
cp ~/litecoin/src/litecoind /home/litecoin/bin/litecoind
chown -R /home/litecoin/bin litecoin:users
chown -R litecoin:users /home/litecoin/bin
cd .. && rm -rf litecoin
cd && rm -rf litecoin
</pre>
</pre>


== Run the daemon ==
== Run the daemon ==
<pre>su litecoin
<pre>su litecoin
litecoind</pre>
cd && bin/litecoind</pre>


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.
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.


<pre>nano ~/.litecoin/litecoin.conf && chmod 0600 ~/.litecoin/litecoin.conf</pre>
<pre>nano ~/.litecoin/litecoin.conf && chmod 0600 ~/.litecoin/litecoin.conf</pre>

Latest revision as of 00:16, 1 April 2022

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