mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-17 00:07:47 +00:00
2.3 KiB
2.3 KiB
Monero P2Pool Docker Compose
Run your own Monero Node + P2Pool + XMRig in Docker
Instructions
Install docker and docker-compose
Install Docker
Install Docker Compose
Note: The docker compose plugin uses the command "docker compose" while the pip installed command is "docker-compose".
Clone the P2Pool project
git clone --recursive https://github.com/SChernykh/p2pool
Configure your Monero address for mining rewards
cd p2pool/docker-compose
./configure
Make sure to set your own monero Wallet Address. The default is to donate mining to P2Pool development.
Build the docker containers
docker compose build
Run the node, pool, and CPU miner (or updated configuration)
docker compose up
Optional
- Open ports 18080 (Monero p2p port) and 37889 (P2Pool p2p port) or 37888 (P2Pool-mini p2p port) in your firewall to ensure better connectivity. If you're mining from a computer behind NAT (like a router) you could consider forwarding the ports to your local machine
- An XMRig CPU miner is included by default, but you can connect additional miners to this same p2pool node using port 3333
- Configure your kernel for maximum mining performance: XMRig RandomX Optimization Guide
- Small miners can mine on p2pool-mini by editing the .env file
Other usefull commands
- You can run everything in the background by adding the "-d" argument to the "docker compose up" command:
docker compose up -d
- You can stop everything with CTRL-C or
docker compose down
- You can see logs when running in the background for with the "docker logs" command:
docker logs -f p2pool-xmrig
ordocker logs -f p2pool-p2pool
ordocker logs -f p2pool-monero
- You can pause mining with:
docker compose pause xmrig
and resume mining with:docker compose unpause xmrig
- You can disable mining with:
docker compose stop xmrig
and re-enable mining with:docker compose start xmrig
Uninstall
Change to p2pool/docker-compose directory
Stop and remove all containers: docker compose down
Remove the p2pool data: docker volume rm p2pool
Remove the monero data: docker volume rm monero