Blog / Mining

Mining Monero at home: RandomX, P2Pool, and whether it is worth it

Monero is deliberately designed so that ordinary computers can mine it competitively. That makes it unusually accessible — and it does not make it a way to get rich. Here is the real picture.

·10 min read
MiningRandomXP2PoolXMRig

Almost every other proof-of-work coin has been captured by specialised hardware. If you want to mine Bitcoin you buy an ASIC, or you do not participate. Monero went the other way on purpose, and the result is the one major chain where the computer you already own is a legitimate mining device.

That is genuinely interesting. It is also routinely oversold. This covers how it works, how to do it properly, and the arithmetic that determines whether you should bother.

Why a CPU, and only a CPU

Monero's proof-of-work algorithm is RandomX, adopted in late 2019 after several deliberate algorithm changes designed to break the ASICs that kept appearing.

RandomX works by generating random programs and executing them. Verifying a hash means actually running that code. This is a workload built around exactly what general-purpose CPUs are optimised for — branch prediction, large caches, fast random memory access, complex instruction scheduling — and exactly what fixed-function hardware is bad at.

The design goal was that a purpose-built ASIC could not beat a CPU by enough to make building one worthwhile. In practice it has held: RandomX is CPU-dominant, GPUs are substantially worse at it than CPUs, and the specialised-hardware takeover that hit every other major chain has not happened here.

The consequence that matters: mining Monero is not a hardware arms race. It is roughly proportional to how much ordinary computing power exists, which is distributed among ordinary people. That is unusual and it is the entire point.

Cache is the bottleneck, not clock speed. RandomX is heavily dependent on L3 cache and memory bandwidth. A CPU with lots of L3 cache per core will outperform a higher-clocked chip with less. This is why some mid-range processors punch far above their price, and why raw core count alone is a poor predictor of hashrate.

What you need

A CPU with decent L3 cache. Modern desktop processors from either vendor do well. RandomX ideally wants around 2 MB of L3 cache per mining thread — if you have less, you will get better results running fewer threads than you have cores. Counterintuitive but true, and worth testing.

Enough RAM. RandomX has a fast mode that allocates roughly 2 GB and is significantly quicker than the light mode. You want that mode. 4 GB total is a floor; 8 GB or more is sensible.

Large pages enabled. This is not optional if you care about performance — it is typically a 20–50% difference. On Linux it means configuring hugepages; on Windows it means granting the "Lock pages in memory" privilege and running the miner as administrator. Every guide mentions this and many people skip it, then conclude their CPU is slow.

Adequate cooling. Mining is a sustained 100% load, indefinitely. This is a different thermal regime from anything most machines normally do.

Cheap electricity. This is the actual deciding factor. See below.

The honest profitability arithmetic

Do this calculation before anything else. It takes two minutes and it is the whole decision.

Step 1 — measure your power draw. Not the CPU's rated TDP. Measure at the wall with a plug meter while mining, because the real figure includes everything else in the machine. A desktop mining flat out is commonly somewhere in the region of 100–250 W depending on the CPU.

Step 2 — work out your daily cost. Watts ÷ 1000 × 24 × your electricity rate per kWh. At 150 W and £0.25/kWh, that is 0.15 × 24 × 0.25 = £0.90 per day, about £27 a month.

Step 3 — find your expected revenue. Get your hashrate from the miner itself after it warms up, then put that number into any current Monero mining calculator. Do not use a number you read in an article, including this one — hashrate and price both move, and any figure I give you here will be wrong by the time you read it.

Step 4 — subtract. If revenue is below cost, you are converting electricity into a smaller amount of Monero. That is a legitimate choice — it is one way to acquire XMR without an exchange, and some people value that — but be clear that is what you are doing.

Set expectations honestly: a typical desktop CPU produces a modest fraction of a XMR per year, not a meaningful income. In most developed countries with normal electricity prices, home CPU mining is roughly break-even at best. Anyone presenting it as passive income is selling you something. Mine because you want to support the network, because you want XMR without a KYC exchange, or because you find it interesting — not because you expect returns.

There is one scenario where the arithmetic changes completely: if your electricity is already being spent. If you heat with electricity in winter, a mining CPU is a space heater that also produces Monero, and the marginal cost of the mining is close to zero. Free or included electricity flips the entire calculation.

Pool, P2Pool, or solo

Three ways to mine, and the middle one is the interesting one.

Solo mining means you keep the entire block reward when you find a block, and nothing at all otherwise. With a single desktop CPU against the whole network, the expected time between blocks is measured in many years. It is a lottery ticket. Some people enjoy that; it is not a plan.

A centralised pool combines your work with everyone else's and pays you steadily in proportion to your contribution. Simple and predictable. The costs are a fee, typically 0–2%, and the fact that you are handing block construction to a pool operator. Large pools are a genuine centralisation concern for any proof-of-work chain — if one accumulates too much of the network hashrate, the chain's security assumptions weaken.

P2Pool is Monero's answer, and it is genuinely clever. It is a decentralised pool implemented as a peer-to-peer sidechain. You get steady payouts like a pool, but:

  • There is no operator. No one to trust, no one to shut down, no one accumulating hashrate.
  • There are no fees.
  • Payouts go directly to you in the coinbase transaction of the block that is found. Not from an operator's wallet — straight from the block reward.
  • There is no minimum payout and no balance held on your behalf, because nobody is holding anything.

The requirement is that you run your own Monero node alongside it. That is more setup than pointing a miner at a pool URL, and it is the right thing to do for the health of the network. For lower-hashrate miners there are smaller P2Pool sidechains (commonly called the mini and nano chains) with lower difficulty, so payouts arrive more regularly.

Recommendation: if you are mining seriously, run P2Pool. If you are trying it out for an afternoon, a pool is fine. Solo only if you understand it is a lottery.

Setting it up

The standard miner is XMRig, open source and by far the most used.

Download it only from the official GitHub repository, and verify the hashes. Mining software is one of the most heavily impersonated categories of software that exists, precisely because the people downloading it have hardware worth hijacking and often disable antivirus to make it run. Search results and third-party download sites are full of malicious builds. This is not a theoretical risk.

The rough path:

  1. Enable large pages. Linux: configure hugepages. Windows: grant "Lock pages in memory" to your user, log out and back in, and run XMRig as administrator. Do this first — it is the single biggest performance factor.
  2. Get a wallet address. You need somewhere for the rewards to go. Any Monero wallet works, including ours. For P2Pool this must be a primary address, not a subaddress.
  3. Configure the miner with your pool address, or point it at your local P2Pool instance.
  4. Tune the thread count. Start with the default, then try fewer threads. Because of the cache constraint, fewer threads frequently produces a higher total hashrate — and leaves your machine usable.
  5. Watch temperatures for the first hour. If you are approaching thermal limits, reduce threads or improve cooling. Sustained thermal throttling is bad for the hardware and bad for your hashrate.

For P2Pool specifically, you also run monerod with ZMQ enabled and the P2Pool daemon between it and XMRig. If you are already running a node — which you might be, if you followed our self-hosting guide — most of that work is already done.

Practical cautions

Do not mine on hardware you do not own. Mining on an employer's machines, a university's computers, a rented server that forbids it, or anyone else's device without explicit permission is unauthorised use of their resources. Depending on where you are, it is also a crime. This is the single most common way people get themselves into serious trouble with Monero mining, and the fact that it is easy does not make it acceptable.

Do not mine on a laptop. Laptop cooling is designed for bursts, not for permanent full load. You will cook the battery, degrade the thermal paste, and run the fans at maximum for months to earn pennies.

Expect your machine to be noisier and hotter. Permanently, until you stop.

Be aware of the environmental cost. Proof-of-work consumes energy by design. RandomX at least means that energy runs on general-purpose hardware that has other uses, rather than on single-purpose machines that become e-waste — but it is still consumption, and it is worth being honest with yourself about it.

Antivirus will probably complain. XMRig is legitimately detected as a potentially unwanted program because it is the tool of choice for cryptojacking malware. That warning is doing its job. Verify what you downloaded before you decide the alert is a false positive.

Is it worth it?

As a business, almost never. If home CPU mining were reliably profitable at scale, it would be industrialised, and the difficulty would rise until it was not.

As a way to acquire Monero without an exchange, sometimes. Mining produces XMR that never passed through a KYC checkpoint, paid directly to your address by the network. Given how many exchanges have delisted Monero, that has real value to some people — and it is a reason to mine that survives a negative profitability calculation.

As support for the network, yes. Monero's security depends on hashrate being widely distributed among individuals rather than concentrated in a few facilities. Every home miner on P2Pool makes the chain more robust, and unlike most cryptocurrencies, Monero is actually designed so that your participation counts.

As a hobby, absolutely. It is one of the few remaining ways to touch the mechanics of a blockchain directly with equipment you already have.

The short version

  • RandomX makes CPUs competitive and keeps ASICs out. Cache matters more than core count.
  • Enable large pages before concluding anything about your hashrate.
  • Do the electricity arithmetic first. Measure at the wall, use a current calculator, subtract.
  • Use P2Pool if you are serious — no operator, no fees, direct coinbase payouts, better for the network.
  • Only download XMRig from the official repository and verify it.
  • Never mine on hardware that is not yours.
  • Expect a hobby and a contribution, not an income.

Whatever you mine to, the rewards land in a normal Monero wallet — and if you want to check on them from any device without installing anything, ours runs in the browser with your keys never leaving it.

Open your Monero wallet in the browser

Free, open source, non-custodial. BIP-39, MyMonero 13-word, Polyseed and 25-word seeds. Nothing to install.

Open Wallet →