Home

What is the --stratum option in P2Pool?

The --stratum option tells P2Pool which network address and port to use for connections from your mining software. It sets up the local mining connection: P2Pool sends work to your miner, and your miner sends results back through it.

What the setting means

Stratum is a communication protocol—a set of rules that mining software uses to talk to a pool. P2Pool is a decentralized mining pool, meaning you share mining rewards without relying on one central pool operator.

You supply the option when you start P2Pool:

p2pool --stratum 127.0.0.1:3333

There are two parts to that value:

  • 127.0.0.1 is the address P2Pool listens on. This special address means “this computer only.”
  • 3333 is the port, a numbered connection point that your miner connects to.

You can choose another available port. Your mining software must then use that same port.

This setting does not choose your wallet, change Monero’s mining difficulty, or make P2Pool run a miner automatically.

How your miner connects

If P2Pool and XMRig, a common Monero mining program, run on the same computer, you can use:

p2pool --stratum 127.0.0.1:3333

Then point XMRig at that address:

xmrig -o 127.0.0.1:3333

These examples show only the connection settings. Your full P2Pool command also needs the appropriate wallet and Monero node settings. A Monero node is software that checks and shares the blockchain, the network’s record of transactions.

Think of the two commands as opposite ends of one connection: P2Pool listens, and XMRig connects.

The Stratum port is separate from the connections P2Pool uses to communicate with your Monero node or other P2Pool participants.

Connecting another computer you own

If your miner runs on another computer on your home network, listening only on 127.0.0.1 will not work. That address cannot accept connections from other computers.

You can make P2Pool listen on all available IPv4 network interfaces with:

p2pool --stratum 0.0.0.0:3333

On your mining computer, connect to the P2Pool computer’s actual home-network address, for example:

xmrig -o 192.168.1.50:3333

Replace 192.168.1.50 with your P2Pool computer’s address. Do not enter 0.0.0.0 as the miner’s destination. It means “listen on all interfaces,” not “connect here.”

Your firewall may also need to allow connections to that port from your mining computers.

Keep this connection private

For a same-computer setup, explicitly using 127.0.0.1 keeps the listener local. For a home-network setup, restrict access to trusted devices with your firewall.

You generally do not need to forward the Stratum port through your router. That would expose the mining connection to the internet. Plain Stratum does not itself provide an encrypted, private connection.

Also, this option does not turn P2Pool into a browser-mining service. A browser miner needs a compatible connection method or supporting software; a Stratum address alone is not enough.

The bottom line

Use --stratum to control where your miners connect to P2Pool. For one computer, 127.0.0.1:3333 is a straightforward choice. For separate computers, use a reachable local address and limit access to your own trusted miners.

All 1,000 questions

MyAiMiner.com

MyAiMiner.com — Monero mining blog. 1,000 questions. Clear answers.

Monero (XMR) Mining BLOG

Hashes0
Blocks accepted0
Blocks rejected0
Runtime00:00:00