BTC and LTC Full Node Installation Guide on Ubuntu

12-23-2019    Jaya Sai    Views 7845



What is the full node?

A full node accepts the transactions and blocks after validating. The full node relays the accepted transactions to other full nodes in the network. Full nodes are light weighted and allow the transmitting of the transactions to the network and notify when there is an effect (change ) on the wallet. 

 

Let’s start setting up the BTC full node on the ubuntu:

 

The minimum resource requirements for ubuntu: 

For Live Net :

Hard disk: 500 Gigabytes,

Ram: 8 Gigabytes (Preferable),

Platform: Ubuntu latest (18.04 is preferable )

 

For Test Net :

Hard disk: 50 Gigabytes,

Ram: 8 Gigabytes (Preferable),

Platform: Ubuntu latest (18.04 is preferable )

 

Note: The node should run continuously so that the transactions & blocks get updated from day to day and time.

 

You have to add Bitcoin personal Package Archive (PPA) 

sudo apt-add-repository ppa:bitcoin/bitcoin

 

Note: Personal Package Archive (PPA) are software repositories designed for Ubuntu users. PPA is like a play store for Android users. All the software that are verified and allowed to install is available in PPA.

 

Adding the repository needs user authentication, so you might be asked to provide a password to authenticate the request. You will be prompted on the terminal to press enter, just press enter.

 

Use the below command to get the updates to the Bitcoin repository just added.

sudo apt-get update

 

You can install BTC full node with the combination of GUl ( Graphical user interface ) or terminal or both. 

sudo apt-get install bitcoin-qt → Use this for the full node with only GUI 

sudo apt-get install bitcoind → Use this for the full node with only Terminal 

sudo apt-get install bitcoin-qt bitcoind → Use this for the full node with both GUI & Terminal  
 

Please use the installation with the terminal option to follow the rest of the article as I have used terminal commands for illustration throughout this article. 

After the successful installation, you will see all the bitcoin files on the lib directory. 

Running the Bitcoin node:  Use bitcoind to run the Bitcoin node. 

To check available options type bitcoind --help on the terminal.

 

It is advised to add the config file in the path  ~/.bitcoin/bitcoin.conf

Testnet sample code for the config file is

#server=1  // enable this for main net and commant testnet

testnet=1   // un commant this to run the node on test net and commant server

deamon=1 // this is used to run the node in background

#rpcbind=0.0.0.0:18332 

rpcuser=username

rpcpassword=Password

rpcallowip=0.0.0.0/0

rpcallowip=custom ip address

#rpcport=54543

walletnotify=/home/transaction.sh %s 

 

You should specify configuration params in a config file, like the node is a test/main net, setting the password and username, IP to access the wallet, etc

walletnotify option is used to receive the information when there is a change in the wallet, like a new deposit to the wallet. It returns the transaction in key %s. 

 

transaction.sh file is a custom file which written to save the Id’s, as below 

#!/bin/sh

echo $1 >> ~/tran.txt

 

tran.txt will have the transaction Id’s affected the wallet. 

 

You have to synchronize your node with all the transactions and blocks before starting to use it. This might take days depending on the size of data to be synchronized.

After the full synchronization, you are ready for the actual process of node wallet i.e validating the blocks, depositing and withdrawal process. 

 

Read the article with nodejs sample code to deposit and withdraw cryptocurrency built using bitcoin framework. 

 

You can access the wallet within the server itself using the bitcoin-cli. You can use this option for quick verification of successful node installation.

 

For example, to get the balance type bitcoin-cli getbalance it returns the balance of the wallet. 

 

You can use bitcoin-cli commands to get a list of transactions, transaction etc on the Bitcoin node. 

 

Links to testnet faucet and explorers for BTC. 

Link to blockchain main net explorer

 

Let’s get started with the Litecoin installation:

 

Below command is for what?

apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils

 

You might be prompted for the confirmation to install the packages, enter Y to continue. 

Use the below commands to install LTC and dependency packages. 

apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev

apt-get install libminiupnpc-dev

 

 

To run the Litecoin node:  Use litecoind  

To check available options type litecoind --help on the terminal.

 

It is advised to add the config file in the path  ~/.litecoin/litecoin.conf 

Testnet sample code for the config file 

#server=1

testnet=1

deamon=1

#rpcbind=0.0.0.0:18332

rpcuser=usernam

rpcpassword=Password

rpcallowip=0.0.0.0/0

rpcallowip=custom ip address

#rpcport=54543

walletnotify=/home/transaction.sh %s

 

Follow the same instructions as you did for the BTC set up in this article for the configuration after locating the litecoin.conf

 

litecoind will initiate the transactions and blocks synchronization similar to BTC, it will take days similar to BTC. After the full synchronization, you are ready node wallet validating the blocks, depositing and withdrawals. 

 

You can access the wallet within the server itself using the litecoin-cli

For example, to get the balance type litecoin-cli getbalance it returns the balance of the wallet. 

 

Read my previous article to learn more about the nodejs implementation for wallet connections.


Links to testnet faucet and explorers for BTC. 

Link to Litecoin main net explorer





Subscribe to Email Updates

Subscribe


Add Comments

Submit Comments

More Blogs


What is Trade Finance Transaction?

Blockchain Technology In Trade Finance Transactions

Hari Kondlapudi        Views 3044
block-chain-transform-your-business

Blockchain to transform your business

Hari Kondlapudi        Views 2448
block-chain-transform-your-business

Localization with React

Hari Kondlapudi        Views 1600

Contact Us

US Address:

Do Systems Inc,
433 Plaza Real, Suite 275
Boca Raton, FL 33432 


India Address:

Jayeesha Software Pvt Ltd
Hitech City Rd, VIP Hills,
Silicon Valley, Madhapur,
Hyderabad, TS 500081


Email: sales@dosystemsinc.com
 

Navigation

Copyright © 2023 Do Systems Inc. All rights reserved. Privacy Policy