Bitcoin Forum
October 17, 2017, 03:38:57 PM *
News: Latest stable version of Bitcoin Core:  [Torrent]. (New!)
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: Guide: How to run your own P2Pool in Ubuntu 16.04 LTS with merged mining  (Read 1974 times)
Full Member
Offline Offline

Activity: 196

View Profile
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=

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:
(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:
sudo apt -y update
sudo apt -y install software-properties-common aptitude dialog
sudo add-apt-repository -y ppa:bitcoin/bitcoin
sudo apt-key adv --keyserver --recv B58C58F4
sudo add-apt-repository 'deb xenial emercoin'
sudo apt -y update
sudo apt -y install bitcoind emercoin screen python python-rrdtool python-pygame python-scipy python-twisted python-twisted-web python-imaging
sudo apt -y dist-upgrade

Grab P2Pool:
cd ~
sudo git clone git://

Setup Bitcoin config file:
mkdir ~/.bitcoin/
echo server=1 >~/.bitcoin/bitcoin.conf
echo daemon=1 >>~/.bitcoin/bitcoin.conf
echo rpcuser=bitcoin >>~/.bitcoin/bitcoin.conf
echo rpcpassword=h3wby4zWjGwywZ >>~/.bitcoin/bitcoin.conf
echo rpcallowip= >>~/.bitcoin/bitcoin.conf

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:

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@

echo /usr/bin/bitcoind  >~/start-p2pool
echo sleep 200 >>~/start-p2pool
echo screen -d -m -S p2pool ~/p2pool/ bitcoin h3wby4zWjGwywZ --merged http://emccoinrpc:PheIHyBs99yyTBgrQGa6mUMmmO8Tq3ht@ >>~/start-p2pool
chmod +x 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:
screen -d -m -S p2pool ~/p2pool/ bitcoin h3wby4zWjGwywZ --merged http://emccoinrpc:PheIHyBs99yyTBgrQGa6mUMmmO8Tq3ht@ >>~/start-p2pool

You can view the P2Pool ouput using
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:

The above command includes a wait of 200 seconds (so that bitcoind gets latest updates) before starting p2pool.

Enjoyed it? Buy me a beer Smiley
Send your donations to: 1mrdfyA1GhKmTPhaSkvyq5DBterQ5m7ZK

Buy me a beer: 1mrdfyA1GhKmTPhaSkvyq5DBterQ5m7ZK

Run your own P2Pool with Ubuntu 16.04 LTS and merge mining
Hero Member
Offline Offline

Posts: 1508254737

View Profile Personal Message (Offline)

Reply with quote  #2

Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Offline Offline

Activity: 1

View Profile
August 26, 2017, 12:35:54 AM

Hi I tried setting this up and it seems to be working but is there really only like 20-30 miners using p2pool (as shown under payouts)? Here are my stats:

Version: 17.0-2-gbc2d09e

Pool rate: 198TH/s (14% DOA+orphan) Share difficulty: 287000

Node uptime: 15.1 hours Peers: 6 out, 3 in

Local rate: 12.5TH/s (7.8% DOA) Expected time to share: 1.6 minutes

Shares: 22 total (4 orphaned, 1 dead) Efficiency: 90.15%

Payout if a block were found NOW: 0 BTC to 1LC5aq498kUHWuYx5iKRA5Pyo9QurDLXCa. Expected after mining for 24 hours: 1.07 BTC per block.

Current block value: 17.02137056 BTC Expected time to block: 223.5 days

I don't understand why the pool rate is only 198TH/s. If this is the hash rate of the pool it would take a really long time to find a block, which means a really long time for a payout correct? Is there something I'm doing wrong?

Thank you.
Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!