Linux guide

From Gridcoin
Jump to: navigation, search

Note: These instructions are for Debian based systems, please see instructions on Github for other systems.

Pre-compiled binaries

If you prefer to use a repository rather than compile yourself, jump to Linux Downloads (pre-compiled)


All Installations:

sudo apt-get install git libdb-dev libdb++-dev build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libminiupnpc-dev software-properties-common libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev libqt5charts5-dev

Sync to Gridcoin Repository

New Build

For if you do not have an existing ~/Gridcoin-Research folder from a previous build.

cd ~

git clone

cd ~/Gridcoin-Research

git fetch --all

git reset --hard origin/master


Upgrade Existing Build

For if you have previously built the client and have an existing ~/Gridcoin-Research folder.

cd ~/Gridcoin-Research

git fetch --all

git reset --hard origin/master


If you have trouble updating source from git try configuring git to not use ssl:

git config --global http.sslverify false

Build using Autotools


cd ~/Gridcoin-Research


./configure --with-incompatible-bdb

For Systems with low RAM (e.g. <1GB RAM) such as Raspberry Pi's use the following configure command in place of the one above.

./configure --with-incompatible-bdb CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768"



make install

Creating config file

Once Gridcoin is installed you will need to create and set-up the configuration (conf) file.

From command line:

mkdir ~/.GridcoinResearch

chmod 700 ~/.GridcoinResearch

Within this folder create a file containing the information from the page Gridcoinresearch_config_file

Blockchain snapshot (optional)

If this is a clean installation, you can improve the time it takes to get into sync with the chain by downloading a snapshot. The snapshot is never perfectly up to date, but it will get you most of the way there. Save this file in your ~/.GridcoinResearch folder:

Extract the snapshot, making sure the folder and the blk001.dat file are in the ~/.GridcoinResearch folder, not a snapshot sub-folder.

Finally Restart the client

SSL (optional)

You really only need SSL if you are controlling Gridcoin directly from another host over a public network/internet using RPC.

This does not apply to most people, even if you are using ssh from another computer.

First, add this line to gridcoinresearch.conf


Then, run these commands in your shell:

cd ~/.GridcoinResearch

openssl genrsa -out server.pem 2048

openssl req -new -x509 -nodes -sha1 -days 3650 -key server.pem > server.cert


Wait for the server to start and then type:

gridcoinresearchd getmininginfo

This should return the current difficulty and other network settings.

Known Issues

There are occasionally issues with the permission of the ~/.GridcoinResearch folder, depending on which user first built/installed/ran the binary, such as root.

Simply change the ownership of the file to your user using this command

chown $USER -R ~/.GridcoinResearch