Monero Wallet Guide Best Monero wallets

How to mine Monero with XMRig and P2Pool

Monero uses the RandomX algorithm, which is designed for ordinary CPUs. The most decentralised setup is your own Monero node, P2Pool (0% fee, paid straight to your wallet) and the XMRig miner pointed at P2Pool; small miners should use the P2Pool mini or nano chain.

Quick steps

  1. Estimate profitability. Enter your CPU hashrate and electricity price in a mining calculator to see whether mining makes sense for you.
  2. Create a mining wallet. Create a separate Monero wallet and copy its primary address starting with 4. P2Pool does not pay to subaddresses.
  3. Run and sync a Monero node. Start monerod, pruned is fine, with zmq-pub set to tcp://127.0.0.1:18083 and wait for a full sync.
  4. Start P2Pool. Run p2pool with your node as host and your primary address, adding the mini or nano option if your hashrate is small.
  5. Start XMRig. Download XMRig from its official source and point it at 127.0.0.1:3333, the local P2Pool port.
  6. Monitor shares and payouts. Check your address on the P2Pool observer for your chain, and tune huge pages and threads for better hashrate.

Before you start: is it worth it?

Mining turns electricity into XMR. Whether you profit depends on your CPU's hashrate, your power price and the XMR price. On 24 October 2026 the network ran at about 6.7 GH/s, with a block reward of 0.6 XMR plus fees every two minutes. A desktop CPU is a tiny fraction of that, so expect small, irregular amounts.

Plug your numbers into our Monero mining calculator first. Many people mine to support decentralisation or to get XMR without buying it, not for profit.

Only mine on hardware you own or are allowed to use. Running a miner on work, school or other people's computers without permission is illegal in many countries and is a common form of malware.

Pool, P2Pool or solo?

OptionHow you are paidFeeTrade-off
Centralised poolPool pays you once you reach a thresholdUsually around 1%, variesEasy, but the pool holds your earnings and controls a share of the hashrate
P2PoolDirectly in the Monero block reward, no custodian0% pool fee, 0 payout feeYou must run a Monero node
SoloWhole block reward when you find oneNoneA single CPU may wait years

In August and September 2025, the Qubic project claimed a majority of Monero's hashrate, and the network suffered a 6-block and then, on 14 September 2025, an 18-block reorganisation (The Block, Sep 2025). Concentrated pools make that kind of attack easier. P2Pool spreads block production across thousands of independent miners, which is why many in the community favour it.

P2Pool main, mini and nano

P2Pool runs its own small chain of shares. Miners whose shares are in the last 2160 share blocks (about six hours) split every Monero block P2Pool finds, in proportion to their work. There are three separate chains:

  • Main: the default, for larger miners.
  • Mini (--mini): lower share difficulty, for smaller miners.
  • Nano (--nano): lower again, for very small miners.

P2Pool's own guidance: use the share-time calculator on the P2Pool observer site, and if your expected time to find a share is more than one day, switch to mini or nano. The minimum payout is about 0.00027 XMR (the block reward divided by 2160).

Setup step by step

1. A wallet for mining

Create a separate wallet and use its primary address, which starts with 4. P2Pool does not pay to subaddresses. See how to create a Monero wallet. Mining payouts are public to other P2Pool participants, which is one reason to keep a dedicated wallet.

2. Your own Monero node

Run monerod, pruned is fine, with --zmq-pub tcp://127.0.0.1:18083, and wait until it is fully synced. Details in how to run a Monero node.

3. Start P2Pool

p2pool --host 127.0.0.1 --wallet YOUR_PRIMARY_ADDRESS --mini

Use --nano instead of --mini for a very small setup, or neither for the main chain. You cannot use both flags. The latest stable P2Pool release was v4.18.1 at the time of writing; a v5.0 beta exists but its own notes warn not to use it with the regular chains.

4. Start XMRig

xmrig -o 127.0.0.1:3333

XMRig is the standard open-source RandomX miner. The latest release was v6.26.0 on 28 March 2026. By default it donates 1% of hashing time to its developers (--donate-level).

5. Check your progress

Enter your address on the P2Pool observer site for your chain (main, mini or nano). Stats appear once you have found at least one share.

Getting more hashrate

  • Huge pages. RandomX runs much faster with them. XMRig tries to enable them; on Linux it also supports 1 GB pages with --randomx-1gb-pages.
  • Run as administrator or root once so XMRig can apply its memory and MSR tweaks.
  • Threads. Leave a core free if you use the computer at the same time (-t sets threads).
  • Cooling. Sustained full load raises temperatures. Check yours.
  • Download XMRig only from its official site or GitHub. Antivirus tools often flag miners because criminals abuse them, so be sure your copy is genuine.

Merge mining Tari

P2Pool can merge-mine Tari at the same time, using the same work. You need a Tari node and wallet; the README says this does not change your P2Pool payouts.

Tax and law

Mining rewards are taxable income in many countries, and a few countries restrict mining or crypto overall. Check Monero taxes and is Monero legal.

Frequently asked questions

Can I still mine Monero with a normal computer?

Yes. Monero's RandomX algorithm is designed for general-purpose CPUs. Earnings are small for a single PC, so compare your hashrate with your electricity cost first.

What is the difference between P2Pool mini and nano?

They are separate P2Pool chains with lower share difficulty than the main chain, so smaller miners find shares more often. Nano is for the smallest miners. Switch if your expected share time on the main chain is more than a day.

Does P2Pool charge fees?

No. P2Pool has a 0% pool fee and no payout fee. Payouts arrive directly in the Monero block reward. XMRig itself donates 1% of hashing time by default.

Can I mine to a subaddress?

Not with P2Pool. It requires a primary address that starts with 4. Use a separate wallet dedicated to mining.

Can I mine Monero with a GPU?

It works, but RandomX is optimised for CPUs, so GPUs are usually much less efficient for Monero than a modern CPU.