subtitle: the dummy's guide to setting up a merged mining pool

Setting up your own pool might seem like a very daunting task, but with a Linux machine and a little basic Linux knowledge you too can set up your very own merged mining pool, to mine for Bitcoin and Namecoin (more merged mining compatible coins are coming soon). I will do the best I can to keep this tutorial up to date with the most recent information.

What we need :

'''Linux''', preferably Debian/Ubuntu or something similar
['''Bitcoind'''] for Linux 0.50 or later
['''Namecoind'''] for Linux (ArtForz Fork)
'''PoolserverJ 0.40'''
'''Mysql Database'''

I will make Bitcoind and Namecoind i386 binaries available for download, these were compiles on an intel CPU so if you have AMD CPU or something else you will need to compile your own binaries, otherwise these might work for you and will save you some time:



remember if you download the binaries you will have to chmod +x bitcoind and chmod +x namecoind to make them executable.

if You are using an AMD chip or the binaries wont work for some other reason you will have to download Bitcoind and Namecoind sources from the links below, instructions to compile them are found inside the archives.

[Bitcoind 0.50]

[ArtFoz Namecoind from]


First thing we need to do is get the Bitcoin and Namecoin daemons installed and get the block chains to start downloading, it will likely take 1 whole day just to download the block chains and they have to be completely downloaded before you can start up your pool.

lets download the binaries and make them executable

coinserver~: wget

coinserver~: wget

coinserver~: chmod +x bitcoind

coinserver~: chmod +x namecoind

lets create the data directories

coinserver~: mkdir ~/.bitcoin

coinserver~: mkdir ~/.namecoin

lets create configuration files (bitcoin.conf)

coinserver~: pico ~/.bitcoin/bitcoin.conf

paste this into the window





lets create the namecoin config file

coinserver~: pico ~/.namecoin/bitcoin.conf

paste this into the window





Lets get the daemons started and get that huge block chain downloading… first check for screen type :

coinserver~: screen

if screen launches hit enter if nothing happens / you get an error you have to install screen

coinserver~: sudo apt-get install screen

when that finishes go back type

coinserver~: screen

and hit enter

time to launch bitcoin

now type:

coinserver~: ./bitcoind

then hit CONTROL A+D on your keyboard (this is the command to exit screen and leave bitcoind running in the background

now we launch namecoin

coinserver~: screen

coinserver~: ./namecoind

then hit CONTROL A+D on your keyboard (this is the command to exit screen and leave namecoind running in the background

Lets install Java (poolserverj needs java to run)

coinserver~: sudo apt-get install openjdk-6-jdk

Lets install Mysql and dependencies to setup your pool database

coinserver~: sudo apt-get install mysql-server

go ahead and let it download and install everything it needs there, this might take a few mins when it is finished we need mysql-admin to set up the database

coinserver~: sudo apt-get install mysql-admin

again let that download and install everything it needs, when it is finished we can create your database

coinserver~: sudo mysqladmin create poolserverj_native -p[password]

you will need to replace [password] with your root password hint: there is no space between -p and your password, so if your password is bananas it would look like this

sudo mysqladmin create pool -pbananas

now we have to download PoolServerj - These Links currently download versions 0.40rc2 and 0.40rc7 always check the website to make sure you are getting the most recent version.

coinserver~: wget

coinserver~: wget

Lets extract it and put the files where they need to be

coinserver~: tar -xvf poolserverj-0.4.0rc2.tar.gz

coinserver~: tar -xvf poolserverj-0.4.0rc7-mini-binary.tar.gz

coinserver~: cd poolserverj-0.4.0rc7-mini-binary

coinserver~: mv poolserverj.jar ../poolserverj-0.4.0rc2/bin

coinserver~: mv *SNAPSHOT* ../poolserverj-0.4.0rc2/lib/lib_non-maven

Now we can setup your config file!

coinserver~: cd ~/

coinserver~: cd poolserverj-0.4.0rc2

coinserver~: cd conf-samples

coinserver~: pico

There is a lot of stuff here and it can be overwhelming to the beginner - I am only going to tell you the stuff you need to change from the top to the bottom - I will try to make this as easy as possible!

First thing we are going to have to do is change every instance of localhost to, some people have trouble with this being localhost here and I don't want you to have trouble so do this



replace: localhost

replace with:

A (to replace all)

it should say [ Replaced 15 occurrences ]

scroll way down to line: 439 (you can find out what line you are on by hitting CONTROL-C


change :

'''db.password=[password] (change [password] to your root password)'''

now go down to line 587


Now open up another terminal window, log in and go to your home directory type

./bitcoind getnewaddress

it should give you a Bitcoin address - replace that address on line 587 with the address it just gave you

scroll down to line 599

json-rpc username - for standard bitcoind this is set in bitcoin.conf (rpcuser)
json-rpc password - for standard bitcoind this is set in bitcoin.conf (rpcpassword)

change this to


now go down to line 635


FIRST! Make sure you UN-comment the first line erasing the &lt;nowiki>'#'&lt;/nowiki> from in front of it,

Then go back to your open terminal window you were into before but this time we need a namecoin address

coinserver~: ./namecoind getnewaddress

so here we need to remove the # from in front of the first line, put the namecoin address you got from the terminal window and put it in front of payoutAddress= change the port to 8330, change the username and the password.

that section should look like this:


The Config is Finished! Hit CONTROL-X and make sure you save it

now back at the prompt


coinserver~: mv ../conf/poolserverj.conf

ok now lets get PoolServerJ ready to run

coinserver~: cd ~/

coinserver~: cd poolserverj-0.4.0rc2

coinserver~: cd bin

coinserver~: pico

in this file you see at the end $1 $2 $3, well delete that and replace it with this:

start ../conf/poolserverj.conf

hit CONTROL-X and save the file

Congratulations you finished setting up the Pool Back End! and if you did everything right it will work!

But WAIT!!! You can't start it up and have fun with it until that pesky block chain is down downloading

so let it go for about a day, you can check it by doing

coinserver~: ./bitcoind getinfo

when the block number matches the most recent block from - you know its finished downloading the block chain.

When your ready to start the Pool you do it like this

coinserver~: cd poolserverj-0.4.0rc2

coinserver~: cd bin

coinserver~: screen

coinserver~: ./

remember you always want to start everything in a screen so you can put it in the background by hitting CONTROL A+D

if you did everything right and you waited until the block chain finished downloading you should be able to test it out by pointing your miners to port 8999 and you can check out the management interface on port 8997

to test out a miner you will need to go into the database to create a worker username/password for the beginner the best thing to do is install phpmyadmin

coinserver~: sudo apt-get install phpmyadmin

then you need to make sure it loads with apache

coinserver~: sudo pico /etc/apache2/apache2.conf

add this line to the botom of the file:

Include /etc/phpmyadmin/apache.conf

now restart apache2

coinserver~: sudo apachectl restart

this will allow you a gui web interface to edit the Database and add workers and check shares etc, just point your web browser (on the local machine you installed all of this on) to:

or if you have command line only linux you use lynx

coinserver~: lynx

alternatively you can connect to it from another computer on your network, just find out the local IP of the machine and browse it it the same way from your favorite browser.

and login with your root username and password.

then you will need to click on the database “poolserverj_native

first step is to download this file

then look at the top of the screen you will see an “Import” tab click that

and then chose the file you just downloaded, import that by clicking go.



Now Let's add a worker so we can test out mining! Follow the image above, click insert on the pool_workers table and on the next screen enter a username and password and click “GO” that username and password is what you want to use when you test out mining on the pool.

If you want to run an actual public pool you will need a web based front end that will allow people to register with your pool, create workers, view statistics etc, its basically an interface between your database and your miners. There are a couple of PoolServerj Compatible front ends and you can find links to them on

If you are interested in hiring someone to create a front end for you or if you want to hire someone to set up the pool for you I am available for reasonable prices. Just email me at []

I hope this tutorial was helpful in setting up your pool


cablepair /

If this tutorial is useful to you please consider sending a donation

Bitcoin: 1HiACV7bpKARiRHGVbmevAnphwN4xjniQ5

Namecoin: N1pboiUnBtZAvd4yd8BiUkYvA2zbTr25KR

Devcoin: 1JHZGh6fNdnCRQC9V8F2h9KjpsqEqzg7Vt


QR Code
QR Code how_to_setup_a_merged_mining_bitcoin_pool_with_poolserverj (generated for current page)