How can I setup pushpool on my ubuntu dedi?

I have bitcoind up and running with latest blocks, what's next?

  • 1
    I'd suggest you follow this comprehensive guide on the forums.
    – BinaryMage
    Commented Aug 10, 2012 at 7:24
  • @BinaryMage, you could probably make this an answer instead of a comment.
    – D.H.
    Commented Oct 14, 2012 at 15:34
  • I rewrote the guide to be more concise and less trial-and-error.
    – cdecker
    Commented Jan 4, 2013 at 16:26

1 Answer 1


This guide will set up everything you need on a single machine.

Let's get started by setting up the environment:

sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install automake gcc
sudo apt-get install libevent-dev libmemcached-dev libcurl4-openssl-dev zlib1g-dev libjansson-dev curl memcached

Depending on your distro some of these may not be available (libjansson-dev for example is not available on Lucid), and you may have to download and compile the sources.

Pushpool requires a database to work so we have to install either SQLite3 or MySQL. MySQL probably is the better choice, but SQLite3 suffices to just test pushpool:

sudo apt-get install libsqlite3-dev sqlite3

To get MySQL you'd instead install libmysql++-dev.

Next we download the pushpool source and extract it to /tmp/:

cd /tmp/
curl -s http://yyz.us/bitcoin/pushpool-0.5.1.tar.gz | tar -xvz
cd pushpool-0.5.1

Now let's get on with it by configuring, compiling and installing it into /opt/pushpool:

./configure --prefix=/opt/pushpool/
sudo make install
cd /opt/pushpool/

At this point we can quickly check that everything worked:

$ sbin/pushpoold -E -F
[2013-01-04 16:00:40.682356] config file(server.json): No such file or directory

All we need to do now is to configure the pushpool server.

sudo cp /tmp/pushpool-0.5.1/example-cfg.json /opt/pushpool/server.json
sudo nano /opt/pushpool/server.json

Here's mine for example:

        # network ports
        "listen" : [
                # binary protocol (default), port 8336
                { "port" : 8336 },

                # HTTP JSON-RPC protocol, port 8337
                { "port" : 8337, "protocol" : "http-json" }


        # database settings
        "database" : {
                "engine" : "sqlite3",
                "name" : "/tmp/data.sqlite",
                "stmt.pwdb" :
                  "SELECT password FROM pool_worker WHERE username = ?"


        # cache settings
        "memcached" : {
                "servers" : [
                        { "host" : "", "port" : 11211 }

        "pid" : "/tmp/pushpoold.pid",

        # overrides local hostname detection
        "forcehost" : "localhost.localdomain",

        "log.requests" : "/tmp/request.log",
        "log.shares" : "/tmp/shares.log",

        # the server assumes longpolling (w/ SIGUSR1 called for each blk)
        "longpoll.disable" : false,

        # length of time to cache username/password credentials, in seconds
        "auth.cred_cache.expire" : 75,

        # RPC settings
        "rpc.url" : "",
        "rpc.user" : "bitcoinrpc",
        "rpc.pass" : "bitcoinpassword",

        # rewrite returned 'target' to difficulty-1?
        "rpc.target.rewrite" : true,

        # allow clients to update the ntime field of their work
        "roll.ntime.disable" : false

And finally we get to the database setup:

sqlite3 /tmp/data.sqlite "CREATE TABLE pool_worker (username VARCHAR(32), password VARCHAR(32))"
sqlite3 /tmp/data.sqlite "INSERT INTO pool_worker VALUES ('username', 'password');

At this point we have created the database and inserted a new user called username and password password. Running sbin/pushpoold -E -F again will start the daemon.

Pointing your miner to http://username:[email protected]:8336/ should get you mining.

  • Thanks cdecker ... And how do you send the bitcoins you create to your wallet?
    – balavec
    Commented Apr 17, 2013 at 17:11
  • 1
    Well the coins that are mined should end up in your bitcoind instance, as this is also used to create the initial work for the miners. You will then have to implement some way of calculating the share of the reward that each participant should get and then distribute the reward accordingly. This is the part you'll have to implement yourself.
    – cdecker
    Commented Apr 17, 2013 at 17:39
  • @cdecker I know this is very stupid to ask, but you seem to know much about this... I have some questions I'd like you to take a look at :) Click my profile. Thanks Commented May 14, 2013 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.