Title: Guide: How to run your own P2Pool in Ubuntu 16.04 LTS with merged mining Post by: murdof on May 17, 2017, 09:57:02 AM This is a guide on how to run P2Pool on Ubuntu 16.04 LTS Server with merged mining (emercoin)
17-May-2017: 1st version - Please report any issues IMPORTANT SECURITY NOTE: If you are running your server on a VPS with full internet access make sure you change the rpcpassword or edit your config files and add rpcallowip=127.0.0.1 Some history: I created this guide to have up to date P2Pool installation instructions on latest version of Ubuntu LTS (currently 14.04). People may consider it difficult to get a P2Pool node up and running but in fact it's very simple if you have some basic Linux knowledge. In this guide I will provide BTC and merged mining. Note that althought BTC mining is distributed among P2Pool miners, merged coins will not be distributed to others but you will solo mine those. If you mine exclusively with P2Pool you will get the same profit (and a bit more) compared to mining to other pools. In the long run NMC/DVC/IXC profit will be the same. Install Ubuntu 16.04 LTS Server from here: http://www.ubuntu.com/download/server (note do not install Ubuntu DESKTOP 16.04 LTS - you need Server version for text only install) I will not cover instructions on how to do this. You can install it in a virtual machine or a physical machine. For virtual machine start with 2 Processors and 4GB memory. Suggested disk size is 300GB (that's a lot but you will have room to grow). Create a user and run all the commands as a user NOT as root. If you find any mistakes please let me know! First thing after you install ubuntu is to install all updates and prerequisites for Ubuntu: Code: sudo apt -y update Grab P2Pool: Code: cd ~ Setup Bitcoin config file: Code: mkdir ~/.bitcoin/ About emercoin: We have already emercoin binary already from official repo. For each installation a random RPC password is generated so do a: sudo cat /var/lib/emc/.emercoin/emercoin.conf Find the line: rpcpassword=PheIHyBs99yyTBgrQGa6mUMmmO8Tq3ht And hold on to this password. Don't just copy paste the lines below. Change the password after emccoinrpc to match your password you got above: For example it should be: --merged http://emccoinrpc:PheIHyBs99yyTBgrQGa6mUMmmO8Tq3ht@127.0.0.1:6662/ Code: echo /usr/bin/bitcoind >~/start-p2pool You are not ready to start P2Pool just yet. The BTC blockchain has to be downloaded first and it will take some time... So execute these commands and wait... Run this command to start P2Pool: Code: screen -d -m -S p2pool ~/p2pool/run_p2pool.py bitcoin h3wby4zWjGwywZ --merged http://emccoinrpc:PheIHyBs99yyTBgrQGa6mUMmmO8Tq3ht@127.0.0.1:6662/ >>~/start-p2pool You can view the P2Pool ouput using Code: screen -x p2pool You disconnect from the P2Pool output by pressing: Ctrl-A and then D (nothing will show on screen) When you reboot your server you can just start it by executing: ~/start-p2pool The above command includes a wait of 200 seconds (so that bitcoind gets latest updates) before starting p2pool. Enjoyed it? Buy me a beer :) Send your donations to: 1mrdfyA1GhKmTPhaSkvyq5DBterQ5m7ZK |