How do I configure XMRig to mine on a P2Pool node?
To mine through your P2Pool node, point XMRig at the node’s Stratum address, usually 127.0.0.1:3333 when both programs run on the same computer. Your Monero payout address belongs in the P2Pool configuration, not in XMRig’s wallet field.
Get your P2Pool node ready
P2Pool is a mining pool without a central operator holding your earnings. XMRig does the mining work; your P2Pool node supplies jobs and handles participation in the pool.
Before starting XMRig, make sure:
- Your Monero node is fully synchronized with the blockchain, the shared record of transactions.
- P2Pool is connected to that Monero node and synchronized with its own sidechain, the record used to track miners’ contributions.
- P2Pool was started with your primary Monero wallet address using its
--walletsetting. Use a primary address, not a subaddress. - P2Pool’s Stratum listener is running. Stratum is the connection through which XMRig receives mining jobs and submits results.
The usual Stratum port is 3333, but check your P2Pool startup settings or log. Do not point XMRig at the Monero node’s RPC port: that is a different interface.
Connect XMRig on the same computer
For a quick test, open a terminal in your XMRig folder and run:
./xmrig -o 127.0.0.1:3333 -u x -p x --coin monero
On Windows, use xmrig.exe instead of ./xmrig.
Here is what those settings mean:
-osets your P2Pool node’s address and Stratum port.127.0.0.1means “this computer.”-u xand-p xprovide placeholder username and password values. Standard P2Pool does not use these to choose your payout wallet.--coin monerotells XMRig to mine Monero using RandomX, Monero’s CPU-focused mining algorithm.
For a saved configuration, put this entry in the pools array of XMRig’s config.json:
"pools": [
{
"coin": "monero",
"url": "127.0.0.1:3333",
"user": "x",
"pass": "x",
"enabled": true,
"tls": false
}
]
This is a configuration fragment, not a complete file. Replace any existing pool entries you do not want XMRig to use, and preserve valid JSON punctuation.
Connect from another computer
If XMRig runs on another computer you own, replace 127.0.0.1 with your P2Pool computer’s local network address, for example:
./xmrig -o 192.168.1.50:3333 -u x -p x --coin monero
P2Pool must listen on that network interface, not only on its loopback address. Your firewall must also allow the connection.
Keep access restricted to trusted devices. For connections across the internet, prefer a private VPN rather than exposing an unprotected Stratum port. Leave tls off for a standard P2Pool listener unless you have explicitly configured an encrypted endpoint.
Check that mining and payouts work
XMRig should show a connection, new jobs, and accepted results. If you see “connection refused,” check P2Pool’s listener, the port, and your firewall.
An accepted XMRig result does not necessarily mean you found a payout-qualifying P2Pool share. Check P2Pool’s logs for those shares. Payouts depend on qualifying shares in the payout window when your P2Pool sidechain finds a Monero block.
For a smaller mining setup, consider P2Pool mini. You select the sidechain in P2Pool, not XMRig.
The bottom line
Connect XMRig to P2Pool’s Stratum port, and set your wallet in P2Pool. Verify both accepted work and qualifying shares before expecting payouts; newly mined payouts remain locked for 60 blocks.
