nheqminer Docker Image
Bitcoin mining using the NiceHash equihash mining algorithm. Built using docker to standardize the many dependencies.
Table of Contents
Background
This project was built on an older System76 desktop running Ubuntu 20.04 repurposed for Bitcoin mining. This approach is definitely not the best. Current mining technology such as ASIC miners are far more profitable and efficient.
Prerequisites
- Operational knowledge of Docker
- Operational knowledge of the NiceHash Equihash Miner
- Operational knowledge of NiceHash stratum servers
Technical Requirements
- Docker is installed and running
- NiceHash account with mining address
- nvidia-docker installed and configured if CUDA is leveraged for GPU acceleration
- cpu only Dockerfile is provided for CPU-only operation (no GPU support)
Build nheqminer Docker Image
The following instructions provide steps to build the Docker image.
-
Install Docker and ensure it is running during this process.
-
Clone this project to get necessary Dockerfile. Start from a local working directory where code is managed for development purposes such as a parent development directory
~/dev/
.
Clone this repo:
git clone https://github.com/Steve0verton/docker-nheqminer-cuda.git
Move to the project directory:
cd docker-nheqminer-cuda
- Build Docker image. Ensure this command is run from the directory containing the appropriate Dockerfile.
Build nheqminer Docker image with both CPU and GPU support (CUDA enabled):
docker build -t nheqminer .
Build nheqminer Docker image without GPU acceleration:
# Switch to specific directory with CPU only Dockerfile
cd cpu
# Build docker image
docker build -t nheqminer_cpu .
Start Mining Process
Run the appropriate Docker container using one of the following commands. This executes the Docker container and tails the output. Starting the Docker container automatically starts the mining process.
CPU-only (no GPU acceleration):
nvidia-docker run --gpus all -ti --rm nheqminer -l equihash.usa.nicehash.com:3357 -u BTC_WALLET_ADDRESS_HERE.worker1
- Replace BTC_WALLET_ADDRESS_HERE with your NiceHash mining address.
- Name your mining rig by replacing
worker1
with an appropriate name.
CPU and GPU acceleration:
nvidia-docker run --gpus all -ti --rm nheqminer -l equihash.usa.nicehash.com:3357 -u BTC_WALLET_ADDRESS_HERE.worker1 -t 6 -cd 0 1
- Adjust the numeric parameter after
t
to reflect the number of threads executed - Adjust the
0 1
parameter to reflect the number of GPU cores available
See NiceHash nheqminer README for additional information on command parameters.
Reference
The following links provide helpful information related to this project.
- NVIDA CUDA on Ubuntu Server
- Index of /compute/cuda/repos/ubuntu1604/x86_64
- How do I install NVIDIA and CUDA drivers into Ubuntu?