After reading this guide, you should be able to mine Monero as a solo node using your own computer, either with the default daemon or with dedicated mining software like XMRig. You will learn how to participate in a free, decentralized mining pool which pays out XMR cryptocurrency to your wallet continouously. Monero is widely considered the most elegant cryptocurrency. The IRS is offering a bounty between $625k and $1.25m to anyone who can crack its privacy-conserving algorithm. Monero is effectively a digitial implementation of cash. If Alice gives Bob cash in her own home, nobody in the world knows about it. Monero — for now — conserves this property. Bitcoin, contrary to popular belief, is not digital cash. If Alice sends Bob some Bitcoin, the entire world knows about it — a wet dream for the IRS.
These instructions are for Windows but the steps are similar for Unix.
Here, we'll download and start mining on the newest version of Monero. The commands in question here are primarily monerod
and monero-wallet-cli
.
Mining with
monerod
is not recommended and is more for learning.
- If upgrading, rename old
monero
folder tomonero$OLD_VERSION
. - Install the latest tar from Monero's site.
- Extract into new, empty folder called
monero
. - If upgrading, move
$YOUR_WALLET
and$YOUR_WALLET.keys
into the newmonero
folder.- If you don't have wallet files, the CLI (
monero-wallet-cli
) will direct you to create them when you run it. - To keep your files co-located, move your wallet files into your
monero
folder.
- If you don't have wallet files, the CLI (
- Run monero wallet in an administrator terminal.
cd ~/monero
./monero-wallet-cli.exe --wallet-file=$YOUR_WALLET
- Run monero daemon in an administrator terminal.
cd ~/monero
- Run
./monerod.exe
. You may need to disable your firewall or open up certain ports to be able to sync and mine.
- Start mining in the monero wallet once the daemon is fully synced.
- If background mining was automatically started, run
stop_mining
first. - Run
start_mining 16
to use all 16 threads. This will depend on your rig.
- If background mining was automatically started, run
This section mostly repeats what's in the official instructions, which can be found here for Windows. For other platforms, look at this page. Don't follow the CUDA instructions if you're using an AMD GPU. CUDA only applies for Nvidia GPU users. AMD GPU support is baked into the main xmrig
repo.
We are installing this the hard way because we need to edit the source code. The author of this package coded in a clever automatic-donation mechanism where 1% of your mining rewards go to him. We will be disabling this. Donate to XMRig here:
48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD
- Create folder
C:\xmrig-deps
. - Download the most recent version of prebuilt dependencies by using the green Code button and Download ZIP.
- Extract
gcc
andmsvc2019
folders toC:\xmrig-deps
. - Very the final folder structure for
xmrig-deps
:C:\xmrig-deps ├─gcc │ ├─x64 │ │ ├─include │ │ └─lib │ └─x86 │ ├─include │ └─lib └─msvc2019 └─x64 ├─include └─lib
git clone https://github.com/xmrig/xmrig.git
mkdir xmrig\build
cd xmrig\build
- Open
xmrig/src/donate.h
file so we can disable automatic donations. - Modify the donation constants to both be
0
and save the file:-constexpr const int kDefaultDonateLevel = 1; -constexpr const int kMinimumDonateLevel = 1; +constexpr const int kDefaultDonateLevel = 0; +constexpr const int kMinimumDonateLevel = 0;
cmake .. -G "Visual Studio 16 2019" -A x64 -DXMRIG_DEPS=C:\xmrig-deps\msvc2019\x64
cmake --build . --config Release
git clone https://github.com/xmrig/xmrig-cuda.git
mkdir xmrig-cuda\build
cd xmrig-cuda\build
cmake .. -G "Visual Studio 16 2019" -A x64 -DCUDA_TOOLKIT_ROOT_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8"
- If you are using a slightly different version of CUDA, don't forget to edit
DCUDA_TOOLKIT_ROOT_DIR
here.
- If you are using a slightly different version of CUDA, don't forget to edit
cmake --build . --config Release
- Move all of the
.dll
files from the resultingRelease
folder intoxmrig/build/Release
.
Add a config file to ~/.xmrig.json
. You can generate one here. When you run xmrig
, it will automatically hydrate the config file with more options. Be sure to "Add new daemon for Solo mining" in the daemon step if you are using the config generator. If using the generator, enter your details here. The only thing that needs to change is the wallet address:
Your config file should look like this to start. The object in pools
for now is configured to your local monerod
instance:
{
"autosave": true,
"donate-level": 0,
"cpu": true,
"opencl": false,
"cuda": false,
"pools": [
{
"coin": "monero",
"url": "127.0.0.1:18081",
"user": "$YOUR_WALLET_ADDRESS",
"daemon": true
}
]
}
Do not forget to set donate-level
to 0
. For now, keep cuda
set to false
.
./monero/monerod.exe
to start the daemon../xmrig/build/Release/xmrig.exe
to run the miner.
If the miner spits out errors related to your config, then your config is either missing or is not configured correctly. Don't forget to specify a pool/daemon in the config.
To enable GPU mining, simply set cuda
or opencl
to true
in your XMRig config. Enabling GPU mining on an integrated graphics chip won't really improve your hashrate. GPU mining in general is not very effective at mining RandomX algorithm, since this algorithm was designed to be ASIC/GPU resistant. This might explains why Monero's hashrate is so low compared to Bitcoin's.
This section is based on the official P2Pool instructions.
P2Pool is unlike other Monero mining pools. P2Pool is a decentralized mining pool where no single user controls the pool. There are no fees with P2Pool. Unlike with solo mining, P2Pool mining distributes rewards continuously. This makes P2Pool a more attractive option for solo miners.
- Install the latest P2Pool release.
- Extract the zip into a new
p2pool
folder.
./monero/monerod.exe --zmq-pub tcp://127.0.0.1:18083 --disable-dns-checkpoints --enable-dns-blocklist
- Wait for your daemon to be fully synced.
./p2pool/p2pool.exe --host 127.0.0.1 --wallet $YOUR_WALLET_ADDRESS --mini
- The
--mini
flag is optional if you want to get more frequent (but smaller) rewards.
- The
- Wait for P2Pool to be fully synced.
./xmrig/build/Release/xmrig.exe -o 127.0.0.1:3333
- Start up the daemon on your main machine with these modified arguments:
./monero/monerod.exe --confirm-external-bind --zmq-pub tcp://0.0.0.0:18083 --disable-dns-checkpoints --enable-dns-blocklist
- Wait for your daemon to be fully synced.
- Run P2Pool normally on this same machine:
./p2pool/p2pool.exe --host 127.0.0.1 --wallet $YOUR_WALLET_ADDRESS --mini
- Wait for P2Pool to be fully synced.
- Run XMRig on this same machine as usual:
./xmrig/build/Release/xmrig.exe -o 127.0.0.1:3333
- You can now also run XMRig on other machines against this P2Pool daemon:
./xmrig/build/Release/xmrig.exe -o 192.168.X.Y:3333 -u x+150000
- This example uses the local IPv4 of your other machine. You can also replace this with a public address.
To verify that you set up your pool miner correctly, you can check the PPLNS window which is a public list of addresses that are going to be paid out when a mainnet block is found by the pool. If you see your address on this page, it means you are mining in the decentralized network correctly. For example, when I checked my computer in the morning I saw my address and hashrate in the window:
To see how many shares you have, just run status
in the p2pool
daemon window. You can also verify that these payouts were successful by checking your wallet. You should see an increased balance:
You should now be able to set up any number of machines in your own mining subnet, which participates in a larger decentralized mining network called P2Pool. The hashrates of each machine will be reflected in the master P2Pool node's total hashrate. One node runs monerod
and p2pool
(and optionally xmrig
). The others only run xmrig
and point to the master node. For example, if you have an AMD Ryzen 9 6900HX that gives you 5.7kH/s, and an Apple M1 Max that gives you 3.3kH/s. In total, the master node will submit an effective total hash rate of 9.0kH/s. The hashrates appear inaccurate at first because the pool needs data from your nodes on their hashrates (they submit calculations at certain difficulties to establish their hashrate). It is normal for this to be slightly off for several minutes to an hour.
- Monero is a more accurate implementation of digital cash than Bitcoin.
- Exchanges are afraid to list it because of the big bad government 🤡.
- Monero remains more decentralized than Bitcoin because of the RandomX algorithm.
- You dont need fancy GPUs/ASICs to mine Monero because they aren't so much more overpowered than CPUs for Monero mining.
- Connecting to a decentralized pool allows you to mine without fees and with continuous payouts.
- You can see real payouts to your Monero wallet within a few hours or overnight, even with a low hashrate like 5kH/s.
- Setting up and running miner software like XMRig against your main node only takes a few minutes.
- Mining Monero with a few old laptops is mostly for fun.
- The few dollars you get per week probably won't pay for the cost of a mining rig.