Someone on Matrix thought it would be useful for me to post my p2pool setup for people to see annd use if they wanted. So here it is.

  1. node configuration: in my monerod node folder I have a file called “start.sh” with 755 permissions. the file contains

./monerod --config-file=./persist/monero.conf

the monero.conf file in “./persist/monero.conf” contains

##### Add Priority Nodes (suggested by P2Pool) #####

#

add-priority-node=p2pmd.xmrvsbeast.com:18080

add-priority-node=nodes.hashvault.pro:18080

#

##### DNS Settings (suggested by P2Pool) #####

#

disable-dns-checkpoints=1

enable-dns-blocklist=1

#

##### RPC Setup #####

#

#restricted RPC

rpc-use-ipv6=1

rpc-restricted-bind-ip=0.0.0.0

rpc-restricted-bind-ipv6-address=::

rpc-restricted-bind-port=18089

rpc-ssl=autodetect

rpc-ssl-certificate=./persist/MoneroCert

rpc-ssl-private-key=./persist/MoneroCertPrivateKey

#Make rpc public

confirm-external-bind=1

public-node=1

#

##### ZMQ (for P2Pool) #####

#

zmq-pub=tcp://127.0.0.1:18083

#

##### Peers and rate limits #####

#

#node connects to peers

out-peers=8

#

#connections to node from other peers

in-peers=8

#

#limit uplink speed to ~8mbps

limit-rate-up=1024

#

#limit downlink to ~24mbps

limit-rate-down=3072

the cert files mentioned were created using ./extras/monero-gen-ssl-cert

  1. p2pool configs

Again i use a file called “start.sh” with 755 permissions for this because i am lazy

./p2pool --host 127.0.0.1 --mini \ --wallet 459hQmByGGyZaSSV51vygKdfBkAoyVHhjTq65bUipJADN915JXZxq6fNxjbBUVzGvPMm8iXQT6TxmiZVBn5pCkhi1EiXA5p

That part is pretty simple. Now for a little deviation. I use xmrig-proxy for this but you could just point regular xmrig directly to p2pool. my xmrig-proxy also has a “start.sh” with 755 which looks like this.

pool="127.0.0.1"

port="3333"

host=$(hostname)

#

./xmrig-proxy --algo=randomx --donate-level=0 \ -b 0.0.0.0:3331 \ -o $pool:$port -u x+170000

the “-u x+170000” is the total difficulty i want but could most likely be left out.

  1. miner config

Again I have a “start.sh” with 755 permission

pool="ip of xmrig proxy or p2pool"

port="port xmrig proxy or p2pool is listening on"

host=$(hostname)

TotalThreads=$(grep -c ^processor /proc/cpuinfo)

MinerThreads=$(echo "$TotalThreads/2" | bc)

#

sudo ./xmrig -o $pool:$port --donate-level=0 --algo=randomx \

-u +20000 \

--rig-id $host --huge-pages-jit --randomx-1gb-pages -t $MinerThreads \

--cpu-no-yield --cpu-memory-pool -1 --cpu-max-threads-hint 90

the reason i mentioned deviation above is because if you have all your miners and the p2pool/monerod on the same network you COULD just point each xmrig directly at the p2pool instead of doing it through xmrig-proxy like i have done here. I was using it to keep from duplicating work when i used centralized mining pools and it was lowering my total hashrate. However, if you had miners on multiple different networks say at home and at a friends house or vacation home, etc you could put up an xmrig-proxy and have that connect to your p2pool and have all miners on that network connect to that xmig-proxy in order to limit the requests to your p2pool from multiple clients on the same network. So instead of 10 requests from 10 miners on your vacation house network there would only be one request from the proxy and then those 10 miners would talk to the proxy locally

Edit: i like to run everything in screens, so

screen -S monero

cd directory/of/monerod

./start.sh

CTRL+A D

screen -S p2pool

cd directory/of/p2pool

./start.sh

cTRL+A D

screen -S proxy

cd directory/of/xmrig-proxy

./start.sh

CTRL+A D

screen -S miner

cd directory/of/xmrig

./start.sh

CTRL+A D