How to mine Monero, in short: get a Monero wallet address, choose how to mine (solo, a pool, or P2Pool, the decentralised pool), install XMRig, point it at your choice, and let your CPU work. Monero uses RandomX, a proof-of-work algorithm designed for ordinary processors, so a desktop or server CPU is the right tool, not a graphics card. Blocks arrive roughly every two minutes, about 720 a day, and each pays the tail emission of 0.6 XMR plus the fees of the transactions in it. What you earn is your share of the network's hashrate times that reward, minus what you pay for electricity, and for most home machines it is small. Before you start, put your own hashrate, power draw and electricity price into our mining calculator, which uses the live network hashrate measured from our own node and a live XMR price. This guide promises no profit, and neither should anyone else.
Below: what you need, the three ways to mine and how they differ, step-by-step setup for P2Pool with XMRig (the route most of the Monero community recommends), solo mining, pool mining, tuning, how to read your results, costs and risks, and what is changing.
What you need
| Item | Why | Notes |
|---|---|---|
| A Monero wallet and its primary address | Rewards are paid to an address you control | See our wallet guide; the subaddress guide explains address types |
| A CPU | RandomX is designed for general-purpose processors | Modern desktop and server CPUs with large L3 caches do best |
| RAM | RandomX's fast mode uses a dataset of a little over 2 GB, shared by all mining threads | Plus memory for the operating system and, for P2Pool, for the node |
| Disk space (for P2Pool or solo) | You run your own Monero node | A pruned node stores much less than a full one |
| Mining software | XMRig is the standard open-source RandomX miner | Download only from its official releases and verify the hash |
| Electricity | The real cost of mining | Know your price per kWh before you start |
You do not need a graphics card. GPUs can run RandomX but are inefficient at it compared with CPUs, which is deliberate: RandomX was built so that general-purpose hardware stays competitive. Claims of RandomX ASICs have circulated; treat them with caution and look for independent benchmarks rather than vendor material.
Why Monero is mined with CPUs: RandomX in brief
Monero switched to RandomX in its upgrade of 30 November 2019. Instead of a fixed hashing function that a specialised chip can implement efficiently, RandomX generates random programs and runs them in a virtual machine that uses the features a modern CPU is good at: integer and floating-point arithmetic, branch prediction, and fast access to caches and memory. Building a chip that does all of that much better than a CPU amounts to building a CPU.
Two practical consequences:
- Cache matters. RandomX uses a scratchpad that wants to stay in the CPU's cache; processors with more L3 cache per core tend to mine better. The algorithm's own documentation and benchmarks are in its repository (RandomX on GitHub).
- Memory configuration matters. Enabling large pages (huge pages) can make a noticeable difference; see tuning below.
The three ways to mine
| Solo mining | Pool mining | P2Pool | |
|---|---|---|---|
| Who finds blocks | You alone | The pool's miners together | All P2Pool miners together, on a sidechain |
| How rewards are paid | The whole block reward to you, when you find a block | By the pool, from its wallet, after a payout threshold | Directly in the Monero block's coinbase transaction, to your address |
| Custody | None | The pool holds your earnings until payout | None |
| Fees | None | Pool fee, set by the pool | None |
| Regularity of income | Very irregular for a small miner | Regular | Regular, with a sidechain suited to your hashrate |
| Needs your own node | Yes | No | Yes |
| Effect on decentralisation | Positive | Concentrates block template control in the pool | Positive: every miner builds its own block templates |
For most home miners, P2Pool is the best fit: no fees, no custody, regular payouts on the mini or nano sidechain, and it helps keep Monero's hashrate spread out. Solo mining makes sense only with a lot of hashrate or a lot of patience. Pools are the simplest to start but put trust and influence in one operator.
How to mine Monero with P2Pool and XMRig, step by step
The official Monero documentation has a guide for this exact setup (docs.getmonero.org: P2Pool with XMRig), and P2Pool's README is the reference for its options (P2Pool on GitHub). The steps below follow them; check both for changes before you start.
Step 1: get your wallet address
Open your Monero wallet and copy your primary address (it starts with 4). P2Pool pays rewards straight into the block's coinbase output for each miner's address, so the address must be one you control. Check P2Pool's README for which address types its current version accepts; historically it required a primary address rather than a subaddress.
Step 2: run a Monero node with ZMQ enabled
P2Pool needs its own connection to a local monerod that publishes new block information over ZMQ.
- Download the Monero CLI from getmonero.org and verify the hash.
- Start the node with ZMQ publishing turned on, for example:
./monerod --zmq-pub tcp://127.0.0.1:18083
Add --prune-blockchain if you want a pruned node, which stores far less data and still validates everything.
- Wait for it to sync fully. Compare its height with the height on our network page. The first sync can take a long time; an SSD helps.
Step 3: start P2Pool
Download P2Pool from its official releases and verify it. Then start it with your address and the sidechain that fits your hashrate:
./p2pool --host 127.0.0.1 --wallet YOUR_PRIMARY_ADDRESS --mini
- No flag: main sidechain, for larger miners.
--mini: the mini sidechain, for smaller miners.--nano: the nano sidechain, for the smallest miners.
--mini and --nano cannot be combined. Each sidechain uses its own peer-to-peer port: the documentation lists 37889 for main, 37888 for mini and 37890 for nano, which you may want to open in your firewall so other P2Pool nodes can connect to you. P2Pool listens for your miners on a local stratum port, 3333 by default.
Replace YOUR_PRIMARY_ADDRESS with your own address. Double-check it: rewards go to whatever you type.
Step 4: install and start XMRig
- Download XMRig from its official releases (XMRig on GitHub) and verify the hash. Antivirus software often flags miners as "potentially unwanted" because criminals use them in malware; that is why downloading from the official source and verifying matters.
- Start it pointing at P2Pool's local port:
./xmrig -o 127.0.0.1:3333
This is the command the Monero documentation gives for Linux and macOS; on Windows the executable is xmrig.exe. You can also put the settings in XMRig's config.json.
- Watch the output. XMRig prints its hashrate and accepted shares. P2Pool's console shows your shares on the sidechain.
Step 5: check that it is working
- P2Pool's
statuscommand shows your hashrate as P2Pool sees it, your shares in the current window and an estimate of payouts. - Public P2Pool observer sites let you look up your address to see shares and payouts on the sidechain.
- Your wallet shows payouts when a Monero block found by P2Pool includes your share. Coinbase outputs are spendable after 60 blocks, about two hours, which is longer than the 10 blocks for normal outputs.
Step 6: leave it running, and watch the costs
Mining rewards accrue over time. Keep the node, P2Pool and XMRig running, and check your electricity use against what you are earning with the calculator.
A simpler way to run P2Pool
If running three programs in three terminals is not for you, community tools bundle them. Gupax, for example, is an open-source GUI that manages P2Pool and XMRig together (Gupax on GitHub). Recent versions of the official Monero GUI also offer mining from its Mining page. Check each tool's documentation for what it runs and which versions of P2Pool and XMRig it ships.
Solo mining
Solo mining means your node builds block templates and your hashrate tries to find a block on its own. If it does, you receive the whole block reward. If it does not, you receive nothing. For a single home computer, the expected time between blocks can be very long; the mining calculator shows your share of the network, from which you can estimate it.
Ways to solo mine:
- From the node: in a running
monerod, thestart_mining <address> <threads>command mines with the node's built-in miner. It is simple and slower than XMRig. - XMRig against your own node: XMRig can mine directly against
monerodin "daemon" mode, using the node's RPC. See XMRig's documentation for the daemon option. - The Monero GUI: its Mining page can solo mine using the local node.
Solo mining has the same decentralisation benefit as P2Pool, without the regular income. Most people who start solo and want steadier payouts move to P2Pool.
Pool mining
A traditional pool combines many miners' hashrate, builds the block templates itself, and pays miners according to their shares, minus a fee. To use one you point XMRig at the pool's address and use your wallet address as the login, as the pool's instructions describe.
Things to check before choosing a pool:
- Fee and payout scheme. The pool publishes both. Fees reduce your income directly; payout schemes change how variance is shared.
- Payout threshold. Your earnings sit in the pool's wallet until they reach it. That is custody: if the pool disappears, so do unpaid earnings.
- Pool size. A very large pool controls the templates for a large share of blocks. Monero's community has repeatedly asked miners to spread out for the network's sake.
- Transparency. A pool that publishes the blocks it found and its payouts is easier to trust.
The Qubic episode of 2025, below, is a reminder of why concentration matters.
Tuning XMRig
Small configuration changes can make a large difference to hashrate per watt.
- Huge pages. RandomX benefits from large memory pages. XMRig tries to enable them automatically when it has the necessary permissions (administrator on Windows, root or a configured
vm.nr_hugepageson Linux) and tells you in its startup output whether it succeeded. On Linux, 1 GB pages for the RandomX dataset can add more. Follow XMRig's own documentation for your operating system. - Threads. XMRig chooses a thread count based on your CPU's cache. More threads than the cache can serve usually lowers hashrate. Start with the default.
- MSR settings. On some CPUs, XMRig can adjust model-specific registers to improve RandomX performance; it needs administrator rights and is documented by XMRig.
- Power and temperature. A CPU that throttles from heat mines slowly. Good cooling and a sensible power limit often improve hashrate per watt.
- Background load. Other heavy programs compete for cache and lower hashrate.
- Donation level. XMRig has a developer donation setting described in its configuration documentation; read it and decide.
Measure before and after each change. Hashrate settles after a few minutes; compare like with like.
How earnings work, and how to estimate yours
The arithmetic is the one our calculator uses: your share of the network hashrate × about 720 blocks a day × 0.6 XMR per block. Transaction fees add a little on top; the calculator leaves them out, so real earnings are slightly higher.
What the formula means in practice:
- Your share is tiny and moves. Network hashrate changes daily. Our network page shows the hashrate and difficulty our node measures; the calculator reads it live.
- The reward is in XMR, the cost in money. Electricity is paid in your local currency; the XMR you earn is worth whatever the market says at the time you count it. Our converter shows a live price. We do not quote one, because it would be out of date by the time you read this.
- Variance. Solo mining pays in rare large lumps; P2Pool pays smaller amounts more often, more so on mini and nano; traditional pools smooth payouts further at the cost of a fee and custody.
- The emission is fixed. Since the tail emission began, every block pays 0.6 XMR plus fees, regardless of how many people mine. More miners means each gets a smaller share, not that more XMR is created. Our emission page explains the schedule.
To decide whether mining is worth it for you, put your measured hashrate, your machine's power draw at the wall, and your electricity price into the calculator. If the result is negative or close to zero, mining is something you would be doing for the network, for learning or for fun, not for income. That is a legitimate reason, and a common one.
Mining for the network rather than for income
Many Monero miners know their numbers are close to zero after electricity and mine anyway. Their reasons are worth understanding, because they explain why the network looks the way it does.
- Decentralisation. Every independent P2Pool or solo miner builds its own block templates. The more templates come from many small miners, the harder it is for any single operator to decide which transactions get into blocks, or to reorganise the chain.
- Running a node. P2Pool and solo mining require a full or pruned node, which also serves other users and wallets. Mining gives people a reason to keep one running.
- Heat that is used anyway. In a cold room in winter, a computer's heat is not entirely wasted. This does not make mining free; it changes the comparison with an electric heater.
- Learning. Setting up a node, P2Pool and XMRig teaches a lot about how Monero works, from block templates to coinbase outputs.
- Acquiring XMR without a counterparty. Mined coins come from the protocol itself. For people in places where buying XMR is difficult, mining is a way to obtain some, at the cost of electricity (see our buying guide for the other routes).
If any of these are your reasons, P2Pool on the mini or nano sidechain, on a machine you already own, with the CPU limited to an efficient power level, is the setup that gets the most out of them.
Costs and risks
- Electricity. The main cost, and the one people underestimate. Measure the machine's draw at the wall with a meter rather than relying on the CPU's rated power.
- Hardware wear. Running a CPU at full load continuously means heat. With good cooling, modern CPUs handle it; fans and power supplies wear faster.
- Noise and heat in the room. A mining desktop is warm and audible.
- Price risk. What you earn is in XMR. Its value can fall as well as rise. Nothing here is a prediction or advice.
- Software risk. Download only from official sources and verify hashes. Fake "optimised" miners that send your hashrate to someone else are common.
- Cryptojacking. Mining on computers you do not own, or on your employer's or university's machines, without permission, is unlawful in many places and against almost every acceptable-use policy. Only mine on hardware you own or are explicitly allowed to use.
- Taxes and rules. In many countries, mined coins are income when received. Keep records of what you receive and when, and check the rules where you live.
The Qubic episode and why decentralised mining matters
In August 2025, the Qubic project directed a large amount of hashrate at Monero and ran what researchers later analysed as a selfish mining campaign: withholding blocks and releasing them strategically. It caused a reorganisation of several blocks and wide claims of a "51% attack". A peer-reviewed measurement study found that Qubic's hashrate share rose to between roughly a quarter and a third during its active periods, that it never sustained majority control, that its strategy was inconsistent, and that it did not earn more than honest mining would have, while it did increase orphaned blocks and reorganisation depth (Lee and Kim, "Inside Qubic's Selfish Mining Campaign on Monero", arXiv 2512.01437).
For miners, the lessons are practical:
- Spread hashrate across many independent template builders. P2Pool and solo mining do this by design, because each miner's node builds its own templates.
- Run your own node. It is what lets P2Pool and solo miners verify the chain they are building on.
- For anyone receiving payments, wait for more confirmations on large amounts during unusual network conditions. Our network page is a quick way to see if something is off.
Choosing hardware for RandomX
If you are deciding whether a machine you already own is worth mining on, or comparing two, these are the properties that matter. (Buying hardware only to mine is a financial decision that this guide does not recommend for or against; run the calculator first.)
- L3 cache per thread. Each RandomX mining thread works on a scratchpad of 2 MiB, which wants to sit in the CPU's L3 cache. A processor's useful thread count for mining is therefore often limited by its L3 cache divided by 2 MiB, not by its core count. XMRig picks the thread count with this in mind.
- Memory. Fast mode needs the RandomX dataset in RAM, a little over 2 GB, shared by all threads. Dual-channel (or more) memory helps, and some CPUs with several memory domains benefit from one dataset per domain, which XMRig handles.
- Efficiency, not peak speed. What decides your result is hashes per watt at the wall, combined with your electricity price. A slower, efficient CPU can beat a faster, power-hungry one.
- Cooling. Sustained full load exposes weak cooling. A CPU that runs at its thermal limit throttles and wastes power.
- The rest of the machine. A desktop with a large graphics card, several drives and an inefficient power supply draws power that does not mine. Measure the whole machine.
- Old hardware. Older CPUs often have less cache and worse efficiency. They can still be fine for learning, or for running a node and P2Pool for the network.
Two settings in RandomX explain why memory matters. Fast mode uses the full dataset and is what miners use. Light mode uses only a 256 MB cache and computes the dataset on the fly; it is much slower and is what nodes use to verify blocks. If XMRig reports that it fell back to light mode, it could not allocate the dataset, usually because of insufficient free memory.
Reading XMRig's output
XMRig prints a lot when it starts and while it runs. The lines worth reading:
- Huge pages. At startup XMRig reports whether huge pages were allocated, often as a percentage. If it says they were not, fix that first; it is the single most common reason for low hashrate.
- RandomX dataset. It reports initialising the dataset and which mode it is in. "Fast" is what you want.
- CPU and threads. It lists the CPU it detected, its cache, and the number of threads it chose.
- Speed. A recurring line gives hashrate averaged over short, medium and long windows (10 seconds, 60 seconds and 15 minutes). Use the longest window for comparisons.
- Accepted and rejected shares. Each accepted share means your work was counted by P2Pool or the pool. A steady rate of rejected shares points to a connection problem or a stale template.
- Difficulty. The share difficulty your miner is working at, set by P2Pool's sidechain or by the pool.
P2Pool's own console complements this. Its status output shows the sidechain, your hashrate as P2Pool estimates it from your shares, the shares in the current payout window, and the connection to your node. If XMRig shows accepted shares and P2Pool shows shares in the window, the setup is working.
Running a node, P2Pool and a miner on one home server
Many people end up with a small always-on machine that runs the node and P2Pool, while one or more desktops run XMRig and point at it over the home network. That works well, with a few points:
- Start P2Pool on the server with its stratum port reachable from your network, as P2Pool's README describes for listening addresses, and keep the node and P2Pool on the same machine.
- On each miner, point XMRig at the server's local IP address and port 3333 instead of
127.0.0.1. - Do not expose the stratum port to the internet. It is meant for your own miners.
- Open the P2Pool peer-to-peer port for the sidechain you use, if you want other P2Pool nodes to be able to connect to you, which helps the sidechain.
- Keep the server updated, including the operating system. It is running network-facing software around the clock.
The node on that server is useful even when you are not mining: point your wallets at it, and you no longer depend on remote nodes, which improves your privacy as described in our wallet guide.
Updating for network upgrades
Monero changes its consensus rules only at scheduled upgrades, announced on getmonero.org with a block height. When one is scheduled, miners must update monerod, P2Pool and, if the proof-of-work changes, XMRig, before the fork height. A miner on old software after a fork mines on a chain nobody else follows and earns nothing.
The next major upgrade, FCMP++, changes how transactions prove ownership (it replaces ring signatures); it is not expected to change RandomX. As of 12 November 2026 it has no mainnet date (getmonero.org). Background is in our FCMP++ explainer.
Troubleshooting
| Problem | Likely cause | What to do |
|---|---|---|
| XMRig cannot connect to 127.0.0.1:3333 | P2Pool is not running, or is still syncing its sidechain | Start P2Pool first and wait until it reports it is synchronised |
| P2Pool cannot reach the node | monerod not running, not synced, or ZMQ not enabled | Start monerod with --zmq-pub tcp://127.0.0.1:18083 and wait for full sync |
| Hashrate much lower than expected | Huge pages not enabled, CPU throttling, other programs using the CPU | Check XMRig's startup lines for huge pages; check temperatures; close heavy programs |
| Antivirus deletes XMRig | Miners are commonly flagged | Download from the official source, verify the hash, and add an exception only for that verified file |
| No shares on P2Pool for a long time | Sidechain too difficult for your hashrate | Switch from main to mini, or from mini to nano |
| Payout shows in P2Pool but not in wallet | Wallet not synced, or coinbase output not yet spendable | Sync the wallet; coinbase outputs unlock after 60 blocks |
| Node sync is very slow | Spinning disk, or limited bandwidth | Use an SSD; consider a pruned node |
A checklist before you start
- Wallet created, seed backed up, primary address copied.
- Electricity price known; machine's power draw at the wall measured.
- Result from the mining calculator understood, including that it moves daily.
monerod, P2Pool and XMRig downloaded from official sources and verified.- Node synced and started with ZMQ.
- P2Pool started with your address and the right sidechain.
- XMRig pointed at P2Pool, huge pages working.
- Records kept of payouts received, for tax purposes where required.
Our recommendation
For mining and network news:
- cryptoresearch@cryptoresearchOPEN@cryptoresearch: research and explainers
- Crypto_MarketWatcher@Crypto_MarketWatcherOPEN@Crypto_MarketWatcher: market updates
- BitcoinInsightsDaily@BitcoinInsightsDailyOPEN@BitcoinInsightsDaily: mining and infrastructure notes across networks
FAQ
Is mining Monero profitable?
It depends on your hardware, your electricity price, the network hashrate and the XMR price, and the last two change every day. For many home computers it earns little after electricity. Use our mining calculator with your own numbers; nobody can promise a profit.
Can I mine Monero on a laptop?
Technically yes, but laptops have limited cooling and their CPUs throttle under sustained load, so hashrate per watt is usually poor and the machine runs hot. A desktop with good cooling is a better choice.
Can I mine Monero with a GPU?
GPUs can run RandomX, but they are inefficient at it compared with CPUs, by design. For Monero, a CPU is the right hardware.
What is the difference between P2Pool main, mini and nano?
They are separate sidechains with different share difficulty. Main suits larger miners; mini and nano suit smaller ones, so they find shares more often and get paid more regularly. You choose with the --mini or --nano flag.
Do I need a full node to mine Monero?
For P2Pool and solo mining, you need your own node, which can be pruned. For a traditional pool, you do not, because the pool runs the node.
How long until I get paid with P2Pool?
It depends on your share of the sidechain's hashrate and how often P2Pool finds Monero blocks. Once a payout is in a block, the coinbase output in your wallet is spendable after 60 blocks, about two hours.
