dracocephalum
New member
I have decided to setup my own p2pool node simply because the latency from NZ to anywhere in the world is a bit crazy. I felt it would be easier for me to get it running on Linux than trying to get it working on Windows So I tried setting it up on Ubuntu - it is a bit tough for me, not only because I am a Windows habitant but also there are quite a lot of small bits and pieces that I need to research for. Fortunately all info is publicly available so it is kind of straight forward.
So for the sake of easing the next person who needs to setup p2pool node, I have put together a script (see attached) to kind of "automate" the process a bit. It is not yet reaching the "installer for idiots" extent but should save you some time and effort.
Prerequisites:
1. The script is for *new deployment* only - it will only work on a newly installed Ubuntu 17.10 server. If you already have dash wallet installed etc. the result is unknown.
2. I only used it with Ubuntu 17.10. It may work with other distros tho...
Before Start:
1. Make sure you have your Ubuntu server configured properly, e.g. you have chosen the user account to run the p2pool instance, and have static IP address configured etc.
2. Obtain your public IP address
3. Configure port forwarding rules if you are behind a router etc. You will at least need port 8999 (UDP?/TCP) forwarded to your server. If you want to make your p2pool node public, port 7903 should be forwarded as well. (not sure if the instance would work without this forwarded though...experts to confirm.)
4. If you have firewall, make sure the above ports are allowed
5. Make sure you Ubuntu server can access the Internet...
Steps:
1. Download the attached .zip file. It contains only one file - the bash script to install p2pool node. Extract the .zip and open the script with your favorite text editor. If you are on Windows, use Notepad++ because you want to *preserve Unix line endings*. Modify at least the below variables to match with your setup:
PUBLIC_IP=<your public IP address>
EMAIL=<your email address>
PAYOUT_ADDRESS=<your DASH wallet address to receive fees>
USER_NAME=<Ubuntu user name to run p2pool>
RPCUSER=<your random rpc user name, like fhdjkasfh7gfs63hg8sa>
RPCPASSWORD=<your random rpc password, like f6d8ahgh39gf9ggh>
2. Save the script
3. Logon to your Ubuntu server with the user account to run p2pool, and transfer the script to user home folder. For me it is easy, the Ubuntu is on a Guest VM inside Hyper-V so I can simply use Powershell to do that. If you have a physical Ubuntu server, you can use USB drive.
4. Run the script like:
bash ~/p2pool.deploy.sh
It should prompt for password (for root access). Then it will continue to run.
5. Wait until the installation finishes. Monitor any error happens - if you do see an error, sorry you will have to modify the script yourself to make it work
6. Once installation is completed, you will need to wait for the DASH daemon to download blocks (in the background). Because it is a new "wallet", it has to download the full block chain. Be patient...
7. In the meanwhile, you can launch P2Pool by using below command:
bash ~/p2pool.start.sh
It may display message like:
p2pool.util.jsonrpc.NarrowError: -10 Dash Core is downloading blocks...
This is normal - just wait until DASH daemon has finished downloading blocks then the p2pool node will be up and running.
NOTE: The DASH daemon is set to auto-start. However, you will need to login and use the above command to launch P2Pool node after the Ubuntu server has been restarted.
Web Front-ends
I am a bit greedy so I have put all 3 front ends that are recommended by the p2pool-dash project. Access them using below URLs:
http://<your ubuntu server IP>:7903/static
http://<your ubuntu server IP>:7903/static/ext
http://<your ubuntu server IP>:7903/static/status
http://<your ubuntu server IP>:7903/static/legacy
Miner
Just point to your node like:
stratum+tcp://<your ubuntu server IP>:7903
Before you do this, make sure you can access the web frontend of your node, and the global stats on it are shown correctly. Pay attention to the "Node peers" - you want both "In" and "Out" are non-zero. If "In" is 0, check firewall and port-forwarding, and make sure port 8999 is accessible from outside world.
NOTE
It seems the current version of p2pool-dash hasn't been updated to support latest dash core 0.12.2.x. You may see a warning message about unknown version 1 etc. For my setup it disappeared after a while, and it doesn't seem to impact performance etc. so not sure if it has any side-effects - I will leave this to experts to confirm!
Hope this makes setting up P2Pool node easier for you! I would like to see some *mass provisioning* of P2Pool nodes so they will eventually make hashing power decentralized again.
So for the sake of easing the next person who needs to setup p2pool node, I have put together a script (see attached) to kind of "automate" the process a bit. It is not yet reaching the "installer for idiots" extent but should save you some time and effort.
Prerequisites:
1. The script is for *new deployment* only - it will only work on a newly installed Ubuntu 17.10 server. If you already have dash wallet installed etc. the result is unknown.
2. I only used it with Ubuntu 17.10. It may work with other distros tho...
Before Start:
1. Make sure you have your Ubuntu server configured properly, e.g. you have chosen the user account to run the p2pool instance, and have static IP address configured etc.
2. Obtain your public IP address
3. Configure port forwarding rules if you are behind a router etc. You will at least need port 8999 (UDP?/TCP) forwarded to your server. If you want to make your p2pool node public, port 7903 should be forwarded as well. (not sure if the instance would work without this forwarded though...experts to confirm.)
4. If you have firewall, make sure the above ports are allowed
5. Make sure you Ubuntu server can access the Internet...
Steps:
1. Download the attached .zip file. It contains only one file - the bash script to install p2pool node. Extract the .zip and open the script with your favorite text editor. If you are on Windows, use Notepad++ because you want to *preserve Unix line endings*. Modify at least the below variables to match with your setup:
PUBLIC_IP=<your public IP address>
EMAIL=<your email address>
PAYOUT_ADDRESS=<your DASH wallet address to receive fees>
USER_NAME=<Ubuntu user name to run p2pool>
RPCUSER=<your random rpc user name, like fhdjkasfh7gfs63hg8sa>
RPCPASSWORD=<your random rpc password, like f6d8ahgh39gf9ggh>
2. Save the script
3. Logon to your Ubuntu server with the user account to run p2pool, and transfer the script to user home folder. For me it is easy, the Ubuntu is on a Guest VM inside Hyper-V so I can simply use Powershell to do that. If you have a physical Ubuntu server, you can use USB drive.
4. Run the script like:
bash ~/p2pool.deploy.sh
It should prompt for password (for root access). Then it will continue to run.
5. Wait until the installation finishes. Monitor any error happens - if you do see an error, sorry you will have to modify the script yourself to make it work
6. Once installation is completed, you will need to wait for the DASH daemon to download blocks (in the background). Because it is a new "wallet", it has to download the full block chain. Be patient...
7. In the meanwhile, you can launch P2Pool by using below command:
bash ~/p2pool.start.sh
It may display message like:
p2pool.util.jsonrpc.NarrowError: -10 Dash Core is downloading blocks...
This is normal - just wait until DASH daemon has finished downloading blocks then the p2pool node will be up and running.
NOTE: The DASH daemon is set to auto-start. However, you will need to login and use the above command to launch P2Pool node after the Ubuntu server has been restarted.
Web Front-ends
I am a bit greedy so I have put all 3 front ends that are recommended by the p2pool-dash project. Access them using below URLs:
http://<your ubuntu server IP>:7903/static
http://<your ubuntu server IP>:7903/static/ext
http://<your ubuntu server IP>:7903/static/status
http://<your ubuntu server IP>:7903/static/legacy
Miner
Just point to your node like:
stratum+tcp://<your ubuntu server IP>:7903
Before you do this, make sure you can access the web frontend of your node, and the global stats on it are shown correctly. Pay attention to the "Node peers" - you want both "In" and "Out" are non-zero. If "In" is 0, check firewall and port-forwarding, and make sure port 8999 is accessible from outside world.
NOTE
It seems the current version of p2pool-dash hasn't been updated to support latest dash core 0.12.2.x. You may see a warning message about unknown version 1 etc. For my setup it disappeared after a while, and it doesn't seem to impact performance etc. so not sure if it has any side-effects - I will leave this to experts to confirm!
Hope this makes setting up P2Pool node easier for you! I would like to see some *mass provisioning* of P2Pool nodes so they will eventually make hashing power decentralized again.