Compiling and Installing Bitcoin Core on Debian/Ubuntu

There are many events in which you have to run your Bitcoin node. Last time we were developing an application where the client had to accept Bitcoin payments without relying on a third-party API provider, so in that case, usage of Bitcoin Core was essential.

While it’s not totally necessary to use Bitcoin Core, there are other projects which offer the same functionality such as Bitcore and Electrum. In this tutorial, we’re going to cover the installation of Bitcoin Core.

Installing Dependencies

Before you install these dependencies, it would be wise to run the following commands and then the command to install the dependencies.

apt-get update;
apt-get upgrade;
apt-get install git pkg-config libevent-dev build-essential autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev libtool libdb5.3++-dev libdb5.3-dev -y;

Fetching Bitcoin Core Files

Now, we’ll get the latest release (currently: 0.15) from official Bitcoin GitHub account.

cd /root;
git clone -b 0.15;
cd bitcoin;

Configuring to Compile Bitcoin Core

We are now configuring the compilation process for the Bitcoin Core.

./configure --without-gui --with-incompatible-bdb;

Compiling & Installing

Now, this is the last major step and it will require a considerable amount of time, so don’t worry and let it continue without any interruptions.

make install;

After you’re done with all the stuff above, Bitcoin Core should be available at your server. You can launch it using the following command: bitcoind and access the JSON-RPC functions using bitcoin-cli, for example: bitcoin-cli listaccounts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.