• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

P2Pool Script to deploy P2Pool on Ubuntu

Status
Not open for further replies.

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 :D

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.
 

Attachments

  • p2pool.deploy.zip
    1.9 KB · Views: 243
Nice, thank you!

...
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!
...

@chaeplin @thelazier @ourlink Can you guys confirm that there is the warning message in your logs?
 
@UdjinM6
Looks like error Warning message form fresh synced dashd(DIP0001). reload/restart dashd is current solution.
A user reported that Sentinel refused to run when dashd has this Warning.
Code:
dash-cli getinfo
{
  "version": 120201,
  "protocolversion": 70208,
  "walletversion": 61000,
  "balance": 0.00000000,
  "privatesend_balance": 0.00000000,
  "blocks": 780491,
  "timeoffset": 0,
  "connections": 19,
  "proxy": "",
  "difficulty": 61080290.15690264,
  "testnet": false,
  "keypoololdest": 1512040839,
  "keypoolsize": 999,
  "paytxfee": 0.00000000,
  "relayfee": 0.00010000,
  "errors": "Warning: unknown new rules activated (versionbit 1)"
}
 
Last edited:
Hi @dracocephalum - great script, and great to see another kiwi Dash user!

I have seen the question of how to set up a P2Pool node pop up quite regularly, so I have written up an initial version of the steps in your script for the documentation here. Ideally I would like to recommend users deploy using your script from Github rather than doing all the steps manually. Would you be interested in setting the script up on Github so it can be simply cloned and run, or licensing it so that I can do it from my account? I would add a snippet of code from dashman to automatically find and deploy the latest build of Dash from Github as well, otherwise it can pretty much go as-is. I am happy to test and send any necessary pull requests for the more widely deployed Ubuntu 16.04, and we have a few Fedora users who could probably add what is necessary to support that platform too.

Please let me know what you think!
 
Hi @dracocephalum - great script, and great to see another kiwi Dash user!

I have seen the question of how to set up a P2Pool node pop up quite regularly, so I have written up an initial version of the steps in your script for the documentation here. Ideally I would like to recommend users deploy using your script from Github rather than doing all the steps manually. Would you be interested in setting the script up on Github so it can be simply cloned and run, or licensing it so that I can do it from my account? I would add a snippet of code from dashman to automatically find and deploy the latest build of Dash from Github as well, otherwise it can pretty much go as-is. I am happy to test and send any necessary pull requests for the more widely deployed Ubuntu 16.04, and we have a few Fedora users who could probably add what is necessary to support that platform too.

Please let me know what you think!
Ah, I should have mentioned the script is under GNU GPL so yeah please feel free to use it and upload to Github using your account etc. :)
 
Hi !

I would realy like to set up a node in Norway.
I have no skills on ubuntu tho.

Can someone help me ?

Maybe just start with the hardware specs needed on a server.
I have 80/80 Mbit line and under 250ms to about 40 of the current servers.

Have god windows skills and got a ubuntu 17 pc up and running but cant install anything from repositories ?

Any possibility to run ubuntu in WMware and can someone build a working image to run ?

Anyone out there ?

Thank you !

B.
 
Last edited:

Attachments

  • 1.jpg
    1.jpg
    121.6 KB · Views: 178
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 :D

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.
Verry good thanks
 
Status
Not open for further replies.
Back
Top