Social media


How to mine Ethereum on GPU for beginners - a step-by-step guide

Author: LB 2021-01-03 1615

The price of both BTC and Ethereum are soaring, albeit with extreme volatility. This is no surprise, as they are cryptocurrencies and there is almost no regulation that could at least in some way bridle their uncontrolled behaviour. Therefore, whenever the demand grows for these assets, their price skyrockets and the same is true for the opposite direction. When prices are up, mining Ethereum can be very profitable and many, in possession of a GPU turn their PCs into mining machines. In the following guide, I am going to show you how to do that. Let's get started!


As I do not own a video card, I initialized a virtual machine in the cloud and I tried out cryptocurrency mining in this virtual environment. Everything went well, and eventually I was able to mine Ethereum with a stable hashrate. So first of all, I allocated 15 GB of memory and a NVIDIA Tesla P4 GPU.


How do you mine Ethereum in 2021?


Once the system was ready, I installed a Debian OS and I had to download CUDA from the official Nvidia site. This was fairly easy, I just had to execute the following commands:


$ wget https://developer.download.nvidia.com/compute/cuda/11.2.0/local_installers/cuda_11.2.0_460.27.04_linux.run


$ sudo sh cuda_11.2.0_460.27.04_linux.run



Once the CUDA package installs itself you have to link the executables to your path and you also have to tell the linker where the CUDA headers are located. I usually place this setting in my .bashrc file in the following way:


$ vim $HOME/.bashrc

And I just insert this code into the file:


if [ -d "/usr/local/cuda-11.2/bin/" ]; then
  export PATH=/usr/local/cuda-11.2/bin${PATH:+:${PATH}}
  export LD_LIBRARY_PATH=/usr/local/cuda-11.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
fi


In the next step, I am going to show you how to install the nanominer software. Let's download the precompiled binaries from Github.


$ wget https://github.com/nanopool/nanominer/releases/download/v3.1.4/nanominer-linux-3.1.4-cuda11.tar.gz


You have to untar the archive and create your own configuration file. This file will contain your Ethereum wallet's address and some pool server addresses:


wallet=[YOUR WALLET]
algorithm=Ethash
coin=ETH
rigName=RIG1
email=[YOUR EMAIL]
restarts=0
pool1 = eth-eu1.nanopool.org:9999
pool2 = eth-eu2.nanopool.org:9999
pool3 = eth-us-east1.nanopool.org:9999
pool4 = eth-us-west1.nanopool.org:9999
pool5 = eth-asia1.nanopool.org:9999


If you are done with this, you are ready to launch the miner in your command line:


$ ./nanominer


This is how the output of the miner looks. You can check my hashrate and the temperature of the GPU on the following image:



In a few minutes I was already able to check my Ethereum balance on nanopool:



Whether mining Ethereum is profitable or not you can check by visiting the following link:


https://www.cryptocompare.com/mining/calculator/eth?HashingPower=17&HashingUnit=MH%2Fs&PowerConsumption=58&CostPerkWh=0.11&MiningPoolFee=1


The profitability of Ethereum mining depends on the price of electricity in your area. Contact your electric power provider and consult with them about their fees.


If you followed the above steps, everything must be given to you to launch your Ethereum mining rig. With this simple setup, I was able to start mining Ethereum and my hashrate stabilized in a few minutes. The above images shows you the profitability using this NVIDIA Tesla P4 GPU considering today's Ethereum market price and the electricity price in my area. This card, with 17 MH/s would mine me $28.81 of Ethereum every month. When the miner is ready, you hardly have to touch it, but make sure it does not get overheated. This sounds like a good source of passive income, as long as the market price of Ethereum stays pretty much the same.


Good luck in the Ethereum ecosystem!


Interesting entries


01.12.2021

Experiences with Bitcoin ATMs in Edinburgh

26.11.2021

Looking at cryptocurrency mining in 2022

21.11.2021

How to create your own Ethereum testnet?

05.11.2021

What is the DAG size in the ravencoin network?

05.11.2021

The CMP 170HX chip is producing world record hashrates in Russia