Setup Your Own Mining Pool

This is a step by step guide on how to setup your own mining pool for things like bitcoin, litecoin, and other crypto-currencies.

This guide is meant to replace Novice’s Guide to Setting up a Crypto-Currency Mining Pool

Why the update? MPOS (Mining Portal Open Source) is very old now and NOMP (Node Open Mining Portal) has branched off into another project called uNOMP (Unified, Node Open Mining Portal). uNOMP has a very active development team and is updated on a regular basis. This not only ensures adequate support of new currencies, but also better security. uNOMP also has many things in one, and is easier to setup then the old MPOS/NOMP hybrid as described in the legacy guide.

I have ran several large mining pool operations, and helped out at several more. The purpose of this guide is to enable more people the opportunity to run their own pool, whether it be for their own miners or just out of curiosity to understand how it all works. This is by no means meant to be a guide so you can setup your own professional mining pool operation. Running your own mining pool that other miners other then yourself will use is not an easy undertaking, and requires extensive systems administration experience as well as a large budget, patience, troubleshooting skills, and a solid knowledge of how crypto-currencies work. This guide will not be going over any security features.

This guide is going over how to setup a uNOMP (Unified, Node Open Mining Portal) pool. This is meant to setup a mining pool for a single crypto-currency. This is not a guide for a multipool.

If you want to see what it looks like before you set it all up, head to the Example Pool that was built completely off of this guide.

Guide Requirements

  • VPS with at least 1GB Ram, 20GB Disk Space and Ubuntu Server 14.04 x64
  • Putty
  • WinSCP
  • Very basic knowledge of Linux

If you are setting up a bitcoin pool, you will need more then 20GB of disk space because the blockchain is very large.

I am using a Windows 10 based PC, and communicate with the VPS using Putty and WinSCP.

This guide will probably take you a long time, especially if you are new to Linux. I highly suggest you be patient, and take it one step at a time.

This guide is meant for novices. If you are already an experienced systems administrator then head on over to the uNomp Github and follow their directions.

A lot of these commands will seem very redundant, especially all the blank “cd” commands. Since everything is split up into different sections, sometimes readers can loose track easily. Blank “cd” commands can put them on track and get them into the right directory.

I will be using Litecoin (scrypt), I will not be going into specific of how to host something like dash (x11) or other algorithms. After you understand the basic concept of how uNOMP works, you will later realize it is not hard to change algorithms.

If you have the ability to snapshot your VPS, then I suggest you do that every time you complete a step. It will save you a lot of time if you make a mistake.

All shell commands will be surrounded with a code box like this:

shell command

Information I want you to insert into a file, or somewhere else will be surrounded with a block quote box like this:

info for a file


VPS Setup

At this point you should have your VPS started, putty up and running and your logged in as root.

Let’s go ahead and setup the VPS before we get into the meat and potatoes.


Update Ubuntu

apt-get update
apt-get dist-upgrade


Setup Swap

By default there is no swap setup on my VPS, it is required especially on a system with limited memory. I am setting up a 4GB swap, which is the most common swap size used for a VPS.

dd if=/dev/zero of=/mnt/myswap.swap bs=1M count=4000
mkswap /mnt/myswap.swap
swapon /mnt/myswap.swap

Now let’s add it into fstab so it will activate at boot.

nano /etc/fstab

Add the following line at the end of the file.

/mnt/myswap.swap none swap sw 0 0

Should look something like this:


Ctrl+O to save, and Ctrl+X to exit the nano editor.

Now your swap is setup, you can modify the size in the future if you need more or less.


Install Required Packages

apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
apt-get install libboost-all-dev git npm nodejs nodejs-legacy libminiupnpc-dev redis-server
add-apt-repository ppa:bitcoin/bitcoin
apt-get update
apt-get install libdb4.8-dev libdb4.8++-dev
curl | sh
source ~/.profile
nvm install 0.10.25
nvm use 0.10.25

All required packages are installed, we may have to hit a few more later but for right now you are good.


User Setup

You never run things like your coin daemon (wallet), or other things as root!

Let’s create a user for your mining pool.

As root type:

adduser usernameyourwant

Use whatever username you want, I will be using “poolguide” for this guide just because it is simple.
Do not use the sample username I use, think of your own for security purposes.
You will be prompted for a password, please use a password that is different from your root password.
The other info it asks for you can either fill out or just leave blank and hit enter.

Now let us give that new user sudo access:

adduser usernameyousetup sudo



A lot has been done to the VPS. Let us go ahead and reboot it as a good, safe practice.


That is it for the VPS setup, let’s move on.


Litecoin Daemon Setup (Wallet)

Now let’s setup the coin daemon, I will be using Litecoin.

Boot up putty and login to that new user we setup earlier.

git clone

Now let’s compile litecoin.

cd litecoin
sudo ./
sudo ./configure
sudo make
sudo make install

The compile process will take a long time, especially if you have a small VPS with only 1 or 2 vCores. Once you do the command “sudo make” I highly suggest you take a break or whatever it is you need to do, because it will be a moment until you are ready to do the next command.

Now let’s go ahead and run litecoind (the daemon) so it will create the .litecoin directory in your users home dir.

cd src

You will get a message stating there is no configuration file, and they suggest such and such rpc user/pass. We are getting to that.

Now we need to setup the config file for the litecoind.

I am going to start using WinSCP to edit/add files, yes you can use nano, gedit, vim, or whatever shell based text editor you want instead. However, when a novice starts editing as many files as we are about to edit it will be easier for them if they use graphic interface for all of it. It will also help a novice understand the file structure better.

You can get WinSCP here:

I will walk you through WinSCP with this litecoind config file, but after that you should be able to use it easily if I just list out what directory you need to go to. You will see here shortly.

Once you install WinSCP, you should be prompted with a login screen.

  • Select “New Site”
  • “File Protocol” will be SFTP
  • “Hostname:” is your VPS IP
  • “Port number” is your ssh port that you have been using with putty
  • “User name:” will be root
  • “Password:” is your root password

Fill all that out and it should look like this (with your server info in there):

Click login, make sure to accept the host key.

Now that you have logged in, you are in the /root folder. Double click the “..” to back out of it.

The file path is /home/username/.litecoin

  • Click on the “home” folder.
  • Click on the folder that is named after your username.
  • Click on “.litecoin” it will be grayed out like such:


  • Right click on the white area in WinSCP and Go to “New” and “File”. Should look like this:


  • Name the file “litecoin.conf”

A white text editor window should pop up, this is WinSCP’s internal editor and what we will be using to edit files. Now we’ll want to put some basic stuff into the configuration file. You should definitely use a different username and password then that I use in the guide. I am just using the ones that litecoind generated for me already.

rpcpassword= wdYMsDT4E61jCv8xx6zZd6PYF3iZkjD7t3NpuiGpn6X

I understand that some of these .conf settings are redundant for litecoin, however in the past I have ran into certain crypto-currencies that did not allow localhost to connect, etc… Just thought this was the best overall config for a multitude of scrypt coins since the users following this guide are probably not setting up a litecoin pool. I also changed the rpcport, which is just a simple security measure I like to take.

If you are setting this up for a PoS (Proof of Stake) currency ensure that you put “staking=0” into the config otherwise your miners may not be able to withdraw their matured coins if they start staking.

The default listen port for litecoin is 9333.

Now that you have updated the litecoin.conf file, go ahead and click on the floppy disk icon in the top left of the WinSCP Editor.


Now that we have setup and saved the config file, let’s get back into ssh (putty) on your user that you created earlier.

cd litecoin/src

You should get a message that states “Litecoin server starting” if for some reason you can’t get out of that command simply press Ctrl+C in putty and it’ll fix it.

Now let’s make sure it’s updating.

./litecoin-cli getinfo

You should see a bunch of info that looks like this:

Run that getinfo command several times, and you should see the “blocks” number updating everytime you run that getinfo command.

The wallet should be fully updated by the time this guide is over, however if you are quick or unsure simply run the getinfo command again and compare the block number to if the block number matches what’s on that site then you are good to go.

Now let us set the crontab so that the litecoin daemon (litecoind) will always start on boot.

  • crontab -e
  • Select “2. /bin/nano <—- easiest”
  • Use your arrow keys to scroll down to the bottom of the crontab.
  • Add this line below the # symbols.

@reboot ./litecoin/src/litecoind

  • Should look something like this:


  • Press Ctrl + O to save and Ctrl + X to exit

The Litecoin daemon will now start on boot.

Last thing we need to do is get a new address for our litecoin wallet.

./litecoin-cli getnewaddress

An address will show up, please keep record of this address. We will be using it later in the guide.


Mining Pool Setup

Now we are at the part you have been waiting for, actually setting up the mining pool. As mentioned earlier we will be using uNOMP for this. uNOMP already has the stratum server, webpage, payout system, and much more built into it.

You should have Putty and WinSCP up and running, you are logged in as your new username on Putty and root on WinSCP.

Download and Update uNOMP

git clone unomp
cd unomp
sudo npm update

Main Configuration

cd unomp
cp config.json.example config.json

Now let’s open up WinSCP.

  • Navigate to /home/username/unomp
  • Right click on config.json and select edit
  • Find “website”:
  • Underneath website, find “host”: and change the “”, to your VPS IP
  • Save It!

Here is a picture example, what I had you change is highlighted in yellow. I used a fake IP but please use your actual IP.


The rest of the default settings in the config.json will work, however it is recommended you open it up on WinSCP after this guide is over and change things like your site title, admin password, stratum host, etc… For right now we will be using the default config settings to make the guide easier to follow.

Pool Configuration

Your asking, what do you mean by pool configuration? I thought we were doing that! Well yes, you are. However, the way the uNOMP works you can have multiple pools running on one instance. For this pool configuration portion of the guide you will be setting up the Litecoin pool. So if you want another pool for your currency of choice in the future, you can add another pool config into the pool_configs folder and you will have another pool running for a different currency (as long as you setup the coin daemon, make sure the coin.json is in unomp/coins/ and the settings are correct in the pool config).

cd unomp/pool_configs
cp litecoin.json.example litecoin.json

Now let’s open up WinSCP.

  • Navigate to /home/username/unomp/pool_configs
  • Right click on litecoin.json and select edit
  • Find “enabled” and change it to true,
  • Find “auxes”: and delete everything inbetween the [  ], if you do not understand there will be pictures below.
  • Find “address”: and place that address we saved earlier from the litecoin daemon setup.
  • Find “paymentInterval”: and change it to 30,
  • Find “minimumPayment”: and change it to 0.01,
  • Find “daemon”: and underneath it find “port”: and change it to the user from your litecoin.conf (see litecoin daemon setup)
  • Find “user”: and change it to the password from your litecoin.conf (see litecoin daemon setup)
  • Find “password”: and change it to the password from your litecoin.conf (see litecoin daemon setup)
  • Scroll down to “daemons”: after ports and configure your litecoin daemon (same info as the past 3 steps)
  • Save It!

Here are picture examples, everything I had you change is highlighted in yellow.




Start your Mining Pool

Now it’s time to start everything up, fingers crossed!

cd unomp
sudo node init.js

You should see something like this:


If you see something like the picture above, congratulations you configured everything correctly. If you got an error somewhere, the first thing I suggest is while in the unomp directory, do a quick “sudo npm update” then try again. If it does not work, then read through the guide again and try to spot any mistakes. If that does not work, then use a search engine to lookup your error. Odds are there is a solution for it on github or somewhere else.

Now let’s see if your webpage is working, use your web browser and go to http://yourvpsip

You should see something like this:


Now fire up your miner, I am not going to go into specifics about setting up cgminer or what have you. If you don’t know how to setup a miner, you probably should of researched that long before you attempted to setup your own pool.

Details for your miner:

-u ltcpayoutaddress
-p anything

Open up SSH Terminal (Putty) that you used the command “sudo node init.js” in. You should see that your LTC address was authorized, should look something like this:


Overtime you will see accepted shares. You can also look at the statistics on your uNOMP webpage.

Now that you verified everything is working, go ahead and open up the Putty window again and “Ctrl + C” to stop the pool for the time being.


Install Forever

Forever will make it so you can start a nodejs application (unomp for instance) and close your SSH client (Putty) and it will still remain running.

cd unomp
sudo npm install forever -g

Forever is now installed, now let’s run your pool.

sudo forever start init.js

You can now close out of Putty and your pool will keep on running.

You may want to read up on forever on their github page, You can use forever to log all outputs of uNOMP, which will make life much easier if you run into an issue later on. You can simply read the logs and find the error.

If you want to stop uNOMP, simply go to the unomp directory again as your user and type:

sudo forever stop init.js




Congratulations if you completed this guide successfully, it is not an easy task especially if you are a novice with mining pools and linux. Remember that the best way to learn something is just to mess with it, and see what you can do. Push your mining pool to it’s limits, edit the software, mess with the database, etc… These things will make you more knowledgeable. I did not get to where I am at from simply following guides.

You can edit the actual uNOMP website by going to /unomp/website/. If you have a basic knowledge of HTML you should have no issues, the website is still in early development. Please remember that this guide has not gone over the security aspect whatsoever. You need to secure your VPS! There is plenty of guides about this on the internet.

If you have any issues, please review the guide again and make sure you have not missed anything before you start asking questions. It is a huge guide and you can easily miss a step. Also, search engines are your friend.

I get asked a lot about what sort of server power is required to run a mining pool. Based off of the scrypt algorithm, you want about at least 1 CPU Core and 1GB of Memory per 1 GH/s to be on the safe side. This is not including at least 1 CPU Core and 1GB minimum to run your frontend (website), which will also fluctuate depending on the amount of traffic. Internet connection wise, you want at least a 10Mbps port. Most VPS or Servers that you can rent usually have at least a 100Mbps port now-a-days. I would highly recommend SSD drives, especially if you plan on going over 1 GH/s on your pool. Mining pools love to use a lot of IOPS.

I would like to thank the developers that made  uNOMP. I had to cross-reference their guides multiple times to make this one. Please check them out on Github, and donate to them if you are using their software.
uNOMP Github

You are free to use my guide whichever way you want, just please give credit to my site BlockGen.

Zach A.

Mining Pool Operator & Mining Enthusiast. Jack of All Trades, Master of None.

Leave a Reply

127 Comments on "Setup Your Own Mining Pool"

Notify of
Sort by:   newest | oldest | most voted

Hey Zach, I need help with the getnewaddress

Im making a pool for a coin called electro.
When I do the command getnewaddress
./electro-cli getnewaddress
It says there is no such folder.
Can you please Help?

john smith

when i run:
sudo ./

then eror:
Can’t exec “aclocal”: No such file or directory at /usr/share/autoconf/Autom4te/ line 326.
autoreconf: failed to run aclocal: No such file or directory


Is there a scryp multi pool guide?


First of all very grateful, I use your guide to build a successful pool, but the operation I found a lot of coins are the following problems:
“Payments obamacare Not enough funds to cover the tx fees for sending out payments, decreasing rewards by 10.999999999999998% and retrying”

The effect is that coins are not enough to pay. I think it is not the reason for the fee, because the gap is ten times huge, to several times, and will be dug before but has stopped mining address continue to pay coins.
There are a lot of coins that have the same problem. Do I have a problem with the setting of a place?

Woooww this guide is awesome, I believe this is the best compilation on the internet about how to create your own pool. Congrats Ok, I have a couple questions, I have my own bitcoin full node working properly, I follow all your instructions using bitcoin. My first question: 1- I have the same user and pssw configuration inside of my bitcoin.conf and bitconf.json files but every time that I run the init.js i receive this message: :~/unomp# node init.js [2017-05-25 19:44:12.952] [INFO] [default] – New Relic [2017-05-25 19:44:12.955] [DEBUG] [default] – NewRelic Monitor New Relic initiated [2017-05-25 19:44:12.957] [INFO] [default] – POSIX Not Installed [2017-05-25 19:44:12.957] [DEBUG] [default] – POSIX Connection Limit (Safe to ignore) POSIX module not installed and resource (connection) limit was not raised [2017-05-25 19:44:12.958] [INFO] [default] – Run Workers [2017-05-25 19:44:13.219] [DEBUG] [default] – Master PoolSpawner Spawned 1 pool(s) on 1 thread(s) [2017-05-25 19:44:13.902] [INFO] [default]… Read more »

Help me! I don’t get the “Litecoin server started” piece of text when starting litecoin and when I use litecoin getinfo i a “Server not found” kind of error.


* I get a “Server not found” kind of error.


I am trying to use the updated blockgen-multi-hashing module on Ubuntu 17.04 with node.js version 6.9.4 installed using nvm. The module seems to crash right after hashing.
I am using this script for testing:

var multiHashing = require(‘blockgen-multi-hashing’);
console.log(multiHashing.c11(new Buffer(20)));

Here is the log of the error:

(I also get the error when using UNOMP).

[2017-04-19 11:38:35.935] [DEBUG] [default] – Pool litecoin Thread 1 could not update auxillary chains: [object Object] Hi , find your tutorial very nice and thanks for writing and posting it , I have followed the post to the letter until it worked , let it running over night and I start getting this errors the site is working (not really updating) I tiried sudo update in the unomp directory and ran sudo node init.js and this keep happening and help please /home/coinboner/unomp/node_modules/merged-pooler/lib/jobManager.js:122 var pos = util.getAuxMerklePosition(auxData[i].chainid, size); ^ TypeError: Cannot read property ‘chainid’ of undefined at buildMerkleTree (/home/coinboner/unomp/node_modules/merged-pooler/lib/jobManager.js:122:63) at JobManager.processTemplate (/home/coinboner/unomp/node_modules/merged-pooler/lib/jobManager.js:186:29) at /home/coinboner/unomp/node_modules/merged-pooler/lib/pool.js:722:69 at itemFinished (/home/coinboner/unomp/node_modules/merged-pooler/lib/daemon.js:156:36) at /home/coinboner/unomp/node_modules/merged-pooler/lib/daemon.js:169:17 at parseJson (/home/coinboner/unomp/node_modules/merged-pooler/lib/daemon.js:85:17) at IncomingMessage. (/home/coinboner/unomp/node_modules/merged-pooler/lib/daemon.js:95:17) at IncomingMessage.EventEmitter.emit (events.js:117:20) at _stream_readable.js:920:16 at process._tickCallback (node.js:415:13)

Hello Zach,
Many thanks for the great guide ! I got my first pool running thanks to you. 🙂

Can you tell me if NIST5 is supported by uNOMP ?
I tried to setup a pool for some NIST5 coin, but seems like the miner can’t mine..

Also, I have found this :

This says it supports merged-mining, and a lot of coin algorithms, but I don’t see it mentioned in your guide. What would be the steps to replace the current stratum server with this one in a pool build exactly by your guide ?

Many thanks for your time !


Can you make any profit from running your own pool? What are the benefits?


thank working on the first shoot amazing

Mars YWH

Have any one encount this error message, Pool litecoin Thread 4 Could not parse rpc data from daemon instance 0, after executing “node init.js”

Andrew Henson

Security – Can you give some tips / guidance on locking down the pool server to prevent it from being accessed by a third party.


Search and you will find. Theres a post about it on this site 🙂

Andrew Henson

Hello, the example pool link is not working. Can you check and update it please.


Theres a hundred and one sites using this script. Just look for UNOMP Pools.


Upon starting NOMp i have 100 % CPU usage. Is there any way to mange the number of the threads for use?
Thank you


Awesome Awesome Write up! I got through everything using an AWS instance. I am however stuck at one spot and its the very last step.

sudo node init.js

I am able to connect to the coin and gives me all the network information. It continues right through the payment addresses.

Then it throws an error:

throw er; // Unhandled ‘error’ event
at errnoException (net.js:901:11)
at net.js:1069:30
at Object.3:1 (cluster.js:592:5)
at handleResponse (cluster.js:171:41)
at respond (cluster.js:192:5)
at handleMessage (cluster.js:202:5)
at process.EventEmitter.emit (events.js:117:20)
at handleMessage (child_process.js:318:10)
at (child_process.js:345:11)

Any thoughts on this?

Thank you very much in advance!


Oh and I should also mention that from what I’ve looked up, EADDRNOTAVAIL means the port is being used somewhere, However, this is a fresh aws instance. I only have one coin set up and I have tried a couple different ports for this coin. Nothing else is running.



Ok – Further investigation.

I did the following command:
fuser 9090/tcp

That gave me the processID:
9090/tcp: 1048

After using the command ps -e, I see that the coin is using the process.

So, Now I am questioning some of the setup for obvious reasons. Above the port is the same in all config files. Is it supposed to be different?

I’ll continue trying. Just wanted to post my findings incase anyone has any thoughts.

Joseph Johnson

Anyone want to reply about this? i am having this same issue.


Very good guide .. the best I have read


Best guide I have seen. I had to adapt things, but I spawned a pool. Thanks.

Hi, zach, I would like to ask you how to use merged mining in unomp, as I believe: 1. the demons of each scrypt coin must be created with a different port 2. you must choose a main and a secondary 3. the configuration must be done in the configuration file of the pool in the directory: cd unomp / pool_configs for example: Litecoin.json As described in the following example ?: {     “Enabled”: false,     “Coin”: “litecoin.json”,     “Auxes”: [// Defines auxillery coins         {             “Coin”: “lottoshares.json”,             “Daemons”: [// It is reccomended to supply multiple daemons here for redundancy                 {                     “Host”: “”,                     “Port”: 23327,                     “User”: “lottosharesrpc”,                     “Password”: “By66dCmyX44uUbA7P3qqXJQeT3Ywd8dZ4dJdfgxCAxbg”                 }             ]         }     ],     “Address”: “n4jSe18kZMCdGcZqaYprShXW6EH1wivUK1”,     “RewardRecipients”: {         “N37vuNFkXfk15uFnGoVyHZ6PYQxppD3QqK”: 1.5,         “22851477d63a085dbc2398c8430af1c09e7343f6”: 0.1     },     “PaymentProcessing”: {         “Enabled”: true,         “PaymentInterval”: 600,         “MinimumPayment”: 9999999999,         “Daemon”: {             “Host”: “”,             “Port”: 19332,             “User”: “testuser”,             “Password”: “testpass”         }     },     “Ports”: {         “3008”: {             “Diff”: 8         },         “3032”: {             “Diff”: 32,             “VarDiff”:… Read more »

On github page of uNOMP project it says: Development stopped and is now unsupported.
Should I still using this pool software to build my own pool?

Alex Cho

I got the thing working. Thank you. However, I have a problem with my website. So after putting in my public ip, and starting, it said
Master Website Website process died, spawning replacement…
So, I thought that it might be because my isp(Rogers) blocks the port 80. So, I tried with many other ports, and forwarded them to my machine. However, it keeps getting that error, and the only way to fix it is to use a local IP. However, then only the devices connected to my network will be able to see it, and there will be no point of hosting a website that nobody can see. What’s the problem and how can I fix it?


Hello, thank you a lot for a nice man
I have strange issue, maybe you could able to help me?
I have tun pool, have connect worker to it. but all the time i have
[2017-02-01 19:37:16.092] [DEBUG] [default] – Pool * Thread 2 Connected timed out for S8XnEF8PxwJ4FjKa35Fa9sEAaxGwFR53iP []: last submitted a share was 610 seconds ago
[2017-02-01 19:37:16.092] [DEBUG] [default] – Pool * Thread 2 Connected timed out for S8XnEF8PxwJ4FjKa35Fa9sEAaxGwFR53iP []: last submitted a share was 606 seconds ago
[2017-02-01 19:37:16.096] [DEBUG] [default] – Pool * Thread 1 Authorized S8XnEF8PxwJ4FjKa35Fa9sEAaxGwFR53iP:password []
[2017-02-01 19:37:16.096] [DEBUG] [default] – Pool * Thread 2 Authorized S8XnEF8PxwJ4FjKa35Fa9sEAaxGwFR53iP:q []

And on website, i don’t see any workers – just 0
it is x13 algorithm


what is the comman to fix it. thanks my broo

Fixing libtool for -rpath problems.

error running sudo ./configure


Excellent guide. I do have once confusion though – as a pool operator do I need to run my miner on the VPS or elsewhere? should I need to run any miner at all, assuming I have other users who are mining?


can you you tell me which system it use and how to change it in this guide its not mention