Skip to main content
Software

GPU Mining Guide

GPU Mining Guide

There are basically two ways to mine Hathor: either you compile our ccminer or you use our Docker images.

ALERT: the mainnet difficulty is too high to mine with GPUs, if you want HTR rewards you most likely want merged-mining.

Docker

Running the Docker image for cpuminer is the easiest way for any operating system. Just run the following command and it is done.

docker run -it hathornetwork/ccminer -a sha256d --coinbase-addr <YOUR_ADDRESS> -o stratum+tcp://<YOUR_NODE_IP>:8081

Remember to replace <YOUR_ADDRESS> by your actual address. You can generate an address using one of our Hathor Wallets, and it starts with H for mainnet (or W for testnet).

libcuda.so.1: cannot open shared object file

If you get the error message: ccminer: error while loading shared libraries: libcuda.so.1: cannot open shared object file: No such file or directory, you need to install nvidia-docker package [1]. Then, you will run nvidia-docker instead of docker only.

Unfortunately, nvidia-docker is not available for Windows [2]. Using Linux Containers for Windows does not work as well because DirectX is the only API that can be accelerated with a GPU today [3].

Build your binary

The repository is available here: https://github.com/HathorNetwork/ccminer/).

The building instructions are in the Dockerfile. After you've built it, run:

./ccminer -a sha256d --coinbase-addr <YOUR_ADDRESS> -o stratum+tcp://<YOUR_NODE_IP>:8081

Remember to replace <YOUR_ADDRESS> by your actual address. You can generate an address using one of our Hathor Wallets, and it starts with H for mainnet (or W for testnet).

Mining on Windows

We have ccminer binaries for Windows here.

Mining on Ubuntu

sudo apt get update
sudo apt install wget gcc build-essential cmake -y
sudo wget http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run && sudo sh cuda_10.1.243_418.87.00_linux.run
sudo export PATH=$PATH:/usr/local/cuda/bin
sudo export PATH=$PATH:/usr/local/cuda-10.1/lib64
source ~/.bashrc

Install dependencies and Hathor's ccminer:

sudo apt-get update 
sudo apt-get install -y git nano automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make software-properties-common libuv-dev build-essential autotools-dev libtool libboost-all-dev bsdmainutils libminiupnpc-dev libevent-dev zip unzip screen cmake
sudo git clone https://github.com/HathorNetwork/ccminer 
cd ccminer 
sudo ./build.sh 
sudo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/targets/x86_64-linux/lib/stubs/ 
sudo echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/targets/x86_64-linux/lib/stubs/" >> ~/.bashrc
source ~/.bashrc

Run the miner:

./ccminer -a sha256d --coinbase-addr <YOUR_ADDRESS> -o stratum+tcp://<YOUR_NODE_IP>:8081

Tested on Ubuntu 16.04 and 18.04. Credits to Discord user nakashu.

Links