Sunday, October 10, 2021

How to mine Monero on Microsoft Windows

If you are interested in trying to try out mining a cryptocurrency, this guide can be used by most people - even those with low internet bandwidth and a weak or old computer. You will learn the mechanics of how to mine a cryptocurrency through a pool, though don't expect to make much money.

Bitcoin was the original cryptocurrency, with the proof of work software released in January 2009. Proof of work means the cryptocurrency mining software performs calculations using the CPU to determine which miner will put the next block of transactions onto the blockchain. The Bitcoin software can still be run on CPUs, though the majority of the miners use specialized hardware which is optimized to specifically run the Bitcoin mining algorithm. 

The other well-known mining algorithm is proof of stake. In general, this requires a person to "stake" tokens or coins as collateral. Based on shares or round-robin or other methodology, a staker is chosen to submit the next block of transactions. If an invalid block is submitted, others can slash the staked tokens as a penalty.

Ethereum is a proof of work cryptocurrency which is undergoing changes which will allow the network to move to proof of stake. Some people consider proof of stake to have advantages over proof of work, including using a small fraction of the electricity consumed by proof of work blockchains.

Monero is a proof of work blockchain which is specifically designed to be mined only on computer CPUs. This makes mining on video graphics cards or specialized hardware difficult and not cost effective. By allowing anyone to run the mining code on a CPU and to be competitive, Monero aims to create a larger and more distributed group of miners.


This post focuses on running Monero mining software on Microsoft Windows through a mining pool. The mining pool reduces network and storage costs by relieving the client machine from hosting the full node software to route and store transactions. While this allows a person to more easily mine, it does reduce the usefulness of the mining node to submit and validate transactions. Nonetheless, mining Monero through a pool is a good way to gain mining experience.


The basic tasks for running a Monero mining node is to download and install the software, create a wallet, and then run and monitor the mining code.

The cryptocurrency wallet creates and stores a private key / public key pair. The wallet can typically view balances and send and receive coins.

For now, let's focus on mining using Microsoft Windows, a wallet, and the xmrig software. Download the xmrig software from github. Look for the win64 version. Use Windows File Explorer to uncompress the zipped folder. Go into the folder structure (currently it looks like "xmrig-6.15.1-msvc-win64\xmrig-6.15.1"). Create a file named something like startminer.cmd as a txt file. This is a Windows Command Script file which will contain your settings and run the miner.

Edit startminer.cmd and add these three lines:
@echo off
xmrig.exe -o pool.supportxmr.com:443 -u 44YkNzrdJnmAqwoTRMPV2e4fihv3AfZ5vMmrtaWCGQaxKuXp5eiZeRREzhPi9tVqGuA3VBRriNwKa2QxmZmRGmHVTkUSTMc -k --tls -p runDemoA
pause

Open a command prompt by pressing Windows Start Button, type cmd, and click on the Command Prompt app. Go to the location of the startminer.cmd file. Type: startminer.cmd 
Depending on your internet filtering and DNS settings, you may see some warnings. Also, Microsoft Windows security may flag the miner as being a cryptocurrency miner trojan. Since you want to be mining, disable this specific security warning.

After the miner is running, you may use a web browser to monitor your miner. Please note the mining pool at SupportXMR receives at least a 1% fee for their services, and any mining rewards will go to the address in the command script which starts with "44...".

The Command Prompt window will continue to show output from the miner. In the following picture, the first two orange circles show that Microsoft Windows has "core isolation" memory integrity turned on and that it uses a Virtual Machine. If your operating system is running with the VM on (probably a good thing for most people), ignore these apparent errors in the first two orange circles. The third orange circle shows the current mining work output. This picture is from an older machine which shows how a CPU which is several years old can be used to mine transactions via a mining pool.

To monitor the miner in the mining pool, go to SupportXMR.com and enter the public key from the Command Script file: 44YkNzrdJnmAqwoTRMPV2e4fihv3AfZ5vMmrtaWCGQaxKuXp5eiZeRREzhPi9tVqGuA3VBRriNwKa2QxmZmRGmHVTkUSTMc

You will be able to see information including the custom name in the startminer.cmd file, along with your hash rate.


It is typically good to lower the operating system priority of the mining process to reduce interference with other processes on the machine. You certainly want to lower the priority if you are also using the machine for regular play and work. Right-click on the Windows Start Button and click on Task Manager. In task manager click on the Details tab. Click on the CPU column so the highest CPU consumer will appear at the top. This will typically be the xmrig.exe mining software. Right-click on the xmrig.exe line, and set the Priority to Below Normal.

Download the wallet software and install the program. Create a new wallet, and write down the recovery words. Learn more by reading the wallet README.


Copy the wallet primary account address and the public key from the GUI wallet. You can put that address into your Command Script file and restart the miner to allow any rewards to go to your wallet.



No comments:

Post a Comment