Novice’s Guide to Setting up a Crypto-Currency Mining Pool

[Image: datamining.jpg]

This a step by step guide on how to setup your own crypto-currency mining pool.

This guide is out-dated, it has now been replaced by Setup Your Own Mining Pool. Please refer to the new guide if you want to setup your own mining pool. This guide will still exist and serve as a legacy guide for reference. All things in this guide still work, however MPOS and NOMP are out-dated. We highly suggest you use the New Guide. 

I have ran large mining pool operations, and have helped out at several other operations. I am creating this guide because I feel like more people should have the ability 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. I will only be going over basic security, such as firewall setup.

This guide is going over how to setup an MPOS (Mining Portal Open Source) Pool using NOMP as stratum (Node Open Mining Portal). 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 and associated guides.


Guide Requirements

-VPS with at least 1GB of Ram, I just deployed an instance on for this guide since I had a free $5 coupon and it’s got a cheap hourly rate, just google “Vultr Coupons” and you’ll probably find something. You can also host a virtual machine on your own PC if you want to at no cost, just google it.
-Ubuntu 14.04 x64
-Putty (
-WinSCP (
-Chrome Web Browser (it’s what I am using to view web pages, can’t guarantee it’ll work on other browsers).
-Very basic knowledge of Linux

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.

I will be using litecoin (scrypt), I will not be going into specific of how to host something like darkcoin (x11) or other algorithms. It is not very hard though to change algorithms, maybe I will add to the guide at a later date.

This guide is meant for novices, things like webmin and phpmyadmin are not required and only useful to novices. If you are an experienced sys admin you should be able to adapt and figure out ways around that.

If you have the ability to snapshot your VPS, then I suggest you do that everytime 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 by quote tags (Ignore the Quote: !) :


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 Vultr vps, it is required especially on a system with limited memory. I am setting up a 4GB swap, which may be overkill but it’s the most common swap sized used in most guides so ill keep it at that.

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’ll 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 like this:
[Image: jujuBxG.png]

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 git
apt-get install build-essential libboost-all-dev libcurl4-openssl-dev libdb5.1-dev libdb5.1++-dev mysql-server

Set a MySQL Root Password (different from your Ubuntu root pass!)
[Image: 4W8Uv6K.png]
[Image: VJk0oka.png]


Install Required Packages for Mining Portal Open Source (MPOS)

apt-get install memcached php5-memcached php5-mysqlnd php5-curl php5-json libapache2-mod-php5

Let’s get Apache Web Server Going:

apache2ctl -k stop; sleep 2; sudo apache2ctl -k start

You will get a message stating it could not reliably determine your servers domain name, don’t worry about this right now. The web server is still running, just go to your server’s ip (http://youserverip) in chrome and you should see this:
[Image: fS6sluI.png]

If you want to setup a DNS server so you can utilize a domain name, then go to google. There is literally 100’s or even 1000’s of guides on that topic. For this guide we will just be working off the servers ip. After you finish this guide, you can checkout Utilize CloudFlare as a DNS Server for a quick and easy way to have a registered domain point at your pool.


Install Required Packages for NOMP Stratum

curl –sL | bash -
apt-get install -y nodejs
npm install –g npm
npm install forever -g
apt-add-repository ppa:chris-lea/redis-server
apt-get update
apt-get install redis-server


Setup Webmin

Webmin is a GUI interface for managing your server. It’s very powerful and feature packed, and it’s free. It’s great for linux beginners as well. Keep in mind that Webmin is not officially supported under Ubuntu, the things we do in this guide will work but I can’t guarantee that everything in Webmin will work if you use it for other things.

nano /etc/apt/sources.list

Press the Down Arrow on your keyboard to reach the end, and add these two lines below:


deb sarge contrib
deb sarge contrib

Should look like this:
[Image: vs6Jc57.png]

Press Ctrl+O to save, and exit the nano editor with CTRL+X

Let’s get Webmin’s GPG Key

cd /root
apt-key add jcameron-key.asc

Install Webmin

apt-get update
apt-get install webmin

Webmin should now be installed, now let’s see if it works. Open your browser and go to https://yourserverip:10000/
You may get an SSL error, which is common since we have not setup a cert. This does not matter.
If everything works out right, you should be seeing this:
[Image: 0itYMUz.png]

Go ahead and login.


Username: root
Password: Your server’s root password

If any updates pop up in webmin, then go ahead and install those updates.


Install phpMyAdmin

apt-get install phpmyadmin

You should get a dialogue that looks like this:
[Image: Li8exD4.png]

Select Apache.
You then will be asked to configure a database, hit ok and then put in the password you setup with MySQL earlier.

Now we need to add phpmyadmin to Apache.

ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
a2enconf phpmyadmin
service apache2 reload

Head to http://yourserverip/phpmyadmin

You should see a page that looks like this:
[Image: hOVqjS3.png]

Login to make sure everything is good.


Username: root
Password: the one you setup earlier

Once you login you will see 3 or 4 default databases on the left hand side. You are good to go.

If you get a red error message on the bottom of phpmyadmin stating mcrypt is missing then do this:

php5enmod mcrypt
service apache2 restart

Log back into phpmyadmin and the mcrypt error should be gone.


Basic Hardening/Security

This part of the guide is completely optional, but HIGHLY recommended before you move on to the mining pool setup. I have separated it from this guide, in case you want to do it later on.

Basic Hardening and Security for your Pool


Mining Pool Setup

First let’s download some of the pool software on your PC. Yes, you’ll be using git and what not to download it on your server however there is a few files you will want to interact with on your PC.


Extract that somewhere on your PC that you can easily access.


User Setup

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

Let’s create a user for your mining pool.

Login to ssh using putty as root.

adduser usernameyouwant

You’ll 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’s give that new user sudo access.

adduser usernameyousetup sudo


MySQL User and Database Setup

Remember phpmyadmin? Head back to it: http://yourserverip/phpmyadmin

Using the password you setup earlier, login as root.
Head to the “Users” button on the top of the page, looks like this:
[Image: G6UBHUE.png]

Click on “Add user” in the middle of the page.

-Fill in the “User name:” field with any username you’d prefer. I like to name it after the coin I am setting up a pool for.
-Then click the button next to “Generate password:”
-You can use your own password, but I prefer the generated password since it is very strong. Just remember to write it down somewhere.
-Now click the checkbox for “Create database with same name and grant all privileges”
-Your page should look somewhat like this:
[Image: cCz4bdd.png]

-If everything is good, then scroll down a bit and click “Go” in the bottom right of the page.
-You should get a success message.

Now let’s import the MPOS database.

Click on your pool username/database you just created in the left side of phpmyadmin.
It is highlighted here:
[Image: h8pGC3E.png]

Once you have clicked on the database, go ahead and click “Import” on the top of the screen. It’s highlighted here:
[Image: Q8QORx1.png]

You will see a “Choose File” button, go ahead and click it and browse to the location you extracted that MPOS we downloaded before to.

Once you navigate to the “php-mpos-master” folder on your computer go ahead and click on the “sql” folder inside. Then click on “000_base_structure.sql” and click open.

That’s all you have to do for settings, your page should look like this:
[Image: iR3JxQP.png]

Now click “Go” on the bottom of the page. You should get a success message stating your import was successful.

The MySQL user and Database has been successfully setup for your mining pool.


Litecoin Daemon Setup (Wallet)

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

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

git clone

Now let’s compile litecoind

cd litecoin/src
make –f makefile.unix USE_UPNP=-

Now the litecoin daemon is compiling. It may take some time if you have a slow server.

Let’s clean up the daemon a bit.

strip litecoind

Copy litecoind to system path.

sudo cp litecoind /usr/bin

Let’s go and run litecoind so it will create the .litecoin directory in your users home dir.

cd /usr/bin

You’ll 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”. The “File Protocol” will be SFTP, “Host name:” is your server ip, “Port number” is your ssh port that you have been using with putty. “User name:” will be root and “Password:” is your root password.

Fill all that out and it should look like this (with your server info in there):
[Image: 9VPgQT2.png]

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.
[Image: zBw1nln.png]

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:
[Image: Y3fErk5.png]

-Right click on the white area in WinSCP and Go to “New” and “File”. Should look like this:
[Image: ske5b0y.png]

-Name the file “litecoin.conf”

A white text editor window should pop up, this is WinSCP’s internal editor and what we’ll 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 what 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, I made you open it earlier in CSF if you read that part of the guide. If you don’t have this port open, your wallet will not update.

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.
[Image: SB7v7Wn.png]
(Just the fact that I have to point out what a floppy disk looks like is making me feel old).

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 /usr/bin

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.

./litecoind getinfo

You should see a bunch of info that looks like this:
[Image: CxuwOHU.png]

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

The wallet should be fully updated by the time this guide is over, however if you are quick or unsure simply go back to /usr/bin and run the “litecoind 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.

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

litecoind getnewaddress

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


NOMP Stratum Setup

Next we’ll be setting up NOMP (node open mining portal) to be used as a stratum server. NOMP has it’s own front end, but we are using MPOS as the front end instead. Keep following the guide, you will see.

Get on your user (not root) on ssh (putty).


The command we just did, “cd” by default put’s your user in it’s home folder (/home/username), where we will be installing a lot of stuff.

Let’s download NOMP and put it in a directory called nomp.

git clone nomp

Let’s go into the nomp directory now.

cd nomp

Let’s update nomp, it may take awhile depending on your servers internet connection.

npm update

Now we will create a real config file for nomp.

cp config_example.json config.json

Alright, now you need to boot up WinSCP again and login. Navigate to the nomp directory, which is /home/username/nomp

If you are still logged into WinSCP from before, you may need to right click and click on refresh in order to see the nomp directory.

You’ll see the config.json, right click on it and edit.
Scroll down to where you see:


“website”: {

“enabled”: true,

You need to change the “true” to false.  Should look like this when you are done:
[Image: J674klU.png]

Now you can save it and exit out of that config.json a, but we are still using WinSCP so keep it open.

Now, for litecoin there is already a json file setup for it under /coins in the nomp directory. Many of the more relevant coins are in there already, such as bitcoin, darkcoin, dogecoin, etc… You can take a look and see if your crypto-currency is in there. You can setup a json file for a coin that is not listed on there, but that is out of the scope of this guide since we are using litecoin. I’d suggest taking a look at the NOMP documentation on their github page if you are doing that.

Alright, now NOMP needs even more configuration. We have not pointed it at the database yet, or set the ports, coin daemon details, etc… Let’s get into that.

Open up your ssh terminal again (putty) under your user.

cp /home/username/nomp/pool_configs/litecoin_example.json /home/username/nomp/pool_configs/litecoin.json

Open up WinSCP, navigate to /home/username/nomp/pool_configs
You’ll see the new litecoin.json file you just copied over with that previous command.
Right click on it and edit it.

I will post a screenshot of all the settings I have changed in the config file at the end, however I will go over step by step what to change first.

-Change “enabled” to true.
-“address” is that wallet address you saved earlier before, make sure you copy and paste that in there.
-You’ll see “paymentProcessing” and “enabled” below that, change that to false.
-Now you’ll see “ports” scroll down to where you see port “3032”, change it to “3333”.
-Go down to where you see “daemons”.
-Port will be 2300 if you copied my litecoin.conf settints from before.
-“user” is your rpcuser from the litecoin.conf.
-“password” is your rpcpassword from the litecoin.conf.
-Scroll down to “p2p” and find the “enabled” below it and change it to false.
-Scroll down to “mposMode”.
-Change “enabled” to true.
-Change “user” to the username you setup on the phpmyadmin step from before
-Change “password” to the password you setup on the phpmyadmin step
-Change “database” to the database you setup on the phpmyadmin step (we made it the same as username)
-Save it!

Your litecoin.json should look like this now:
[Image: PR6Rh9o.png]
[Image: izQIfbx.png]

If any of the settings are wrong, your stratum will not work. Please double or triple check!

Make sure everything saved correctly, we will come back to NOMP later on.


MPOS Initial Setup

Let’s setup MPOS (Mining Portal Open Source), which will be the frontend of your pool website. We have not set up the mail server, and we will not in this guide. Please make sure you understand his before messing with the settings in MPOS and trying to use email activation. There is plenty of guides on google you can find on how to setup your mail server. I recommend this guide if you want to use your gmail for your pool email.

Alright, let’s go this going. Login to ssh on your user if you are not already.

git clone mpos
cd mpos

Setup permissions.

sudo chown –R www-data templates/compile templates/cache logs

Let’s copy over the configuration.

sudo cp include/config/ include/config/

Alright, now let’s setup the MPOS global configuration file. Open up WinSCP and navigate to /home/username/mpos/include/config/ and right click on and edit it.

Alright, same as what I did with NOMP before. I will go through the steps of what to edit, and then ill post some screenshots of what I did afterwards.

-Scroll down to “SALT” and “SALTY”, see how it says make it something random? Literally mash on your keyboard and just get at least 20+ characters. This is what they use to scramble passwords.
-Scroll down to “algorithm”, if you are using litecoin it should remain “scrypt” and you don’t have to change it.
-Scroll down to “Database Configuration”
-‘user’ will be the user you setup in phpmyadmin from before
-‘pass’ is the password you generated on phpmyadmin
-‘name’ is the name of the database you created with phpmyadmin before, we named it the same as the user if you followed the guide exactly.
-Move down to “Local wallet RPC”
-On ‘host’ change 19334 to 2300
-‘username’ to your rpcuser from the litecoin.conf
-‘password’ to your rpcpassword from the litecoin.conf
-Save it!

Now, for Litecoin the global config is all setup now. You can change the minimum and maximum auto-withdrawals, and everything else after you make sure the pool is operational. If you are using another currency other then litecoin it is imperative that you change things like ‘currency’, ‘coin target’, ‘block reward’, and other options otherwise you WILL have some huge issues. I suggest everybody look at the MPOS documentation on github at some point.

Here are screenshots of what my looks like now (get ready to scroll a few pages, it’s big!:
[Image: Wqm2sUr.png]
[Image: tj54Ip3.png]
[Image: V2Na7OD.png]
[Image: 47Ue2kf.png]
[Image: J4Ey1j5.png]
[Image: 83De6Ly.png]
[Image: DiobyUh.png]

Now we need to point the Apache Virtual Server towards the MPOS public directory.

Login to Webmin, https://yourserverip:10000/

-Go to Servers > Apache Webserver.
-You should see the Virtual Server that says “Handles the name-based server on address *.”, click on that virtual server. Here is a highlighted picture if you do not understand:
[Image: 4cYDoOr.png]

-Go to “Virtual Server Details” on the bottom
-Find “Document Root” and change “/var/www/html” to “/home/username/mpos/public”, take a look at this screenshot if you are confused:
[Image: VqAZO9F.png]

-Click Save

Now we need to update the Apache configuration a bit.

-Click on “Global Configuration” on the top center left, screenshot:
[Image: h1j7cOq.png]

-Click on “Edit Config Files”
-Scroll all the way to the bottom of the config file
-Add this to the bottom, and update it according to your username obviously.

Quote:<Directory /home/username/mpos/public>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted

Should look like this:
[Image: pIVjVxt.png]

-Click Save
-Click on “Apply Changes” in the type right of Webmin.
[Image: BgzZMDp.png]

Now let’s see if the MPOS frontend is working, go to http://yourserverip
You should see a page that looks like this:
[Image: mf3zaJv.png]

If you see the MPOS frontpage, then go ahead and skip to the “MPOS Frontend Initial” step.

If you get a blank page, don’t worry it may be a permissions issue.
Login to root on ssh.

cd /home/username/mpos
chown -R www-data templates/compile templates/cache logs

Now head back to http://yourserverip and see if MPOS shows up. If it does not at this point, you should go back in the guide and make sure you did everything right. If that does not work, then boot up WinSCP and go to /var/log/apache2/error.log and read the bottom line (it should mention your ip), see if there is a permissions issue or some other error. You can google most apache errors easily, and find a fix somewhere.


MPOS Frontend Familiarization

Before we get into the cronjobs, let’s go ahead and get familiar with MPOS.

Click on “Other” and then click “Sign up”

The first account on MPOS is the admin account and does not require email activation. Fill in the info and then click “Register” on the bottom. Much like this:
[Image: RXoAwIU.png]

The coin address is just your wallet, that you want your mined coins to go to. By default MPOS won’t let you register without one.

Also, if you are getting “token expired” messages don’t worry, it’s just MPOS being finicky. Try again.

You should get a “Please check your mailbox to activate” message, don’t worry you do not need to activate anything as the first account is the admin account.

Go ahead and login.

-Go to Admin Panel > System > Settings
-You should be at a page that looks like this:
[Image: 6AzgViT.png]

-Click on “System” on that settings page:
[Image: LvHmdHc.png]

-Find “Disable e-mail confirmations” and select yes.
-Scroll to the bottom and click save.

Now you just set it so users can register without email confirmations, which is important if you don’t have a mail server setup. The other settings you can toy with later on after this guide is over, such as your pool name.

Now we need to setup a worker, so you can test your mining pool towards the end of this guide. You can either register another account, or use your admin account (which is not advised in a public environment).

Go to My Account > My Workers > Add New Worker
Input your worker details, I like to keep it simple and put “1” for the name and “x” for the password. Click “Add New Worker” and you should see your new worker, which will be “mposusername.1” with a password “x”. It will look like this:
[Image: uhJsz3M.png]

Remember your worker and worker password for later on.

Last thing, go to Admin Panel > System > Monitoring
This page is not important now, but it will be when we setup the cronjobs. Please keep it open in a tab on your browser for later. I will refer to it as the “Monitoring Page” in the cronjob section of this guide.

Do not worry if there is issues like “we can’t poke your Stratum server”, because the Stratum is not started yet. We will get into that here shortly.


MPOS Cronjob Setup

MPOS work’s off of 3 different main cronjobs. Payout, statistics, and maintenance. There are others, but this is what we will be setting up. We will run them every minute, it is very important that you run these crons every minute otherwise MPOS likes to break.

Login to Webmin, http://yourserverip:10000/

Go to System > Scheduled Cronjobs

-Select “Create a new scheduled cronjob” on the bottom.
-“Execute cron job as”, select your user.
-“Active” will be yes.
-Command will be “/home/username/mpos/cronjobs/”
-Go down to “Minutes” and click on the “selected” and then highlight all the numbers.
-Click “Create”

Here’s a picture for reference:
[Image: Q13PVtx.png]

Now you will create 2 more cronjobs using the exact process we just did above, for “/home/username/mpos/cronjobs/” and “/home/username/mpos/cronjobs/”

I won’t repeat the process, it’s really straight forward and I am sure you can do it if you have gotten this far in the guide.

However, here’s the screenshots for the last 2 cronjobs in case you get confused.
[Image: WbEhvd7.png]
[Image: vHhGlQC.png]

Alright, remember that “Monitoring Page” I had you leave open? Go back to it, and hit refresh.

This is what you should see:
[Image: jm8PsOS.png]

Your monitoring page should get new results pushed to it every minute, if not it’ll turn yellow and eventually red.

Congraulations, your cronjobs are setup.


Turning Stratum On

Remember NOMP? We are going to turn it on now.

Log back onto ssh (putty) as your user.

cd nomp

Before we set NOMP to stay on “forever” we are going to make sure it works first while we can still interact with it.
Let’s start the stratum server in shell.

node init.js

You should see something that looks like this:
[Image: NFBw62T.png]

If you have no errors, then you are good your stratum is running. If you have issues, please go back to the NOMP setup part of the guide. If that does not work, then I suggest you google your error. More then likely a github issue will pop up with a solution.

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 mposusername.1
-p x

Now, connect your miner.

Open up your ssh terminal (putty) that you used the command “node init.js” in. You should see that your worker was authorized, and share(s) have been submitted. Should look something like this:
[Image: U2i06ZW.png]

Congratulations, you are officially mining on your new pool.

Now, close your miner.

Open up the ssh terminal (putty) window you ran the command “node init.js” on. Press Ctrl+C to get out of init.js.

Now type this to keep init.js running indefinitely (until you restart your server or nomp crashes).

forever start init.js

Your Stratum is now running, and will stay running even if you close your ssh terminal.

If you want to know what’s happening with your stratum server, you should run some logs and read up more on forever. Check out the NOMP github page: Also check out the forever github page:

This guide I am writing is just enough to get your pool started, not manage it. You will want to see who is accessing your stratum, and what’s causing crashes and what not. Logs are very important and something you should look into.



[Image: congrats.png]

Now you can head over to http://yourserverip and check out MPOS some more. I suggest playing around with all the settings and making it how you want it. If you connect your miner, you will see the graphs updating etc…

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, google is 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. MySQL and MPOS likes to eat up those IOPs when your pool gets busy.

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.

I may come up with more guides in the future, or additions to this guide. I will use this one as a basis a lot, and I like to cater heavily towards novices. I know they’ll be some purists out there that will hate on me for using things such as Webmin or WinSCP but this guide was never meant for them.

I would like to thank the developers that made MPOS and NOMP. 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.


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

If you liked this guide, please donate to me as well!
BTC: 19ejzHzBgf2Jb57nEkJA89erVRqwjnnQeq

Zach A.

View posts by Zach A.
Mining Pool Operator & Mining Enthusiast.


  1. IDIR
    April 1, 2018

    Hi Zach,
    Great guide!
    My question is, do this guide still valid atm?

  2. Mohammed Abbas
    March 4, 2018

    I have a question in which place i could configure fees and donation addresses in MPOS i see in the web ui under
    transactions some transactions marked as a fees and others are donation i am wonder which addresses these
    two transactions using and how can i config them

  3. marina pangeea
    December 28, 2017

    Is 2017 and all procedure breaks up with latest involution of nodejs and friends

  4. Kingsley Ohia
    September 27, 2017

    Thanks for this guide… I do have an issue though. Pls help…
    When I use the node init.js command, I get the message
    My node version is v0.10.48 and the npm version is 2.15.1.
    Any suggestions please? I have tried updating node from 0.10.25 but this did not solve the issue.

  5. sachin verma
    September 13, 2017

    hi Zach

    I have created my mining pool from this article and all is good but the problem is my payout is not showing in wallet balance. since 5 days i am just running my miner in a hope that my balance will update . but it is not updating on my admin panel but on the other hand i have created one user account too . on user account balance is updating.

    i am mining with a scrypt miner .

    i dont know weather the block is found or not.

    is this pool works on solo mining pool or something else?

    my wallet is synced ok.
    cron job is ok
    stratum is working fine.

    now can you please tel me who i can see balance and when the balance will update?

    Best Regards


    September 5, 2017

    hello sir give me all details about ATC COIN MINING

  7. thomasmcdaniel
    August 11, 2017

    hey do you have a updated version of how to setup a mining pool i tried your tutorial earlier but got right to the end and something was not right . not sure if they updated something or what . please help

  8. Max
    July 21, 2017

    Findblocks disabled, new blocks will currently not show up in the frontend
    Blockupdate disabled, blocks and transactions confirmations are delayed
    Payouts disabled, you will not receive any coins to your offline wallet for the time being

  9. Max
    July 19, 2017

    Site’s directions did not work. Need help. Please contact.

  10. Max
    July 18, 2017

    I do not see where to see 9333 port in the tutorial/lesson. Where are we supposed to set the wallet configuration with this port? Telnet shows 9333 open but no wallet movement (for site or for miner) on some 300,000,000 shares of LTC work.

    In litecoin.conf paymentProcessing has two addresses and above that there is is a JSON field called “address”. You don’t say if we are to put our litecoin (personal wallet) number in any of these or if they are part of a the litecoin-cli getnewadress and we use that intead? And where do we put our personal wallet number if anywhere?

    It’s not explained nearly well enough. And I know MPOS is “older” but it’s like EOL was 2015 so it still has to mainly work. Otherwise the lession would say it’s a broken tech and don’t bother at all with this Novice version.

    Possibly the software is broken badly despite it and lesson is lost. There’s two tutorials on the internet and neither are clear enough . Sad.


  11. Max
    July 18, 2017

    Also, did not see where to see 9333 port in the tutorial/lesson. Where are we supposed to set the wallet configuration? Telnet shows 9333 open but no wallet movement (for site or for miner) on some 300,000,000 shares of LTC work.

    Possibly the software is broken badly and lesson is lost. There’s like two tutorials on the whole internet and neither are very clear.

    Tsk tsk

  12. Max
    July 17, 2017

    Where does the port 9333 go? Wallet you say is linked to it but the majority of the tutorial shows 2300. What? I put that.

  13. Max
    July 17, 2017

    You say 9333 is required for wallet update but in fact don’t show where to use it. 9332 is shows in your /home/username/.litecoin/litecoin.conf and 2300 elsewhere. Where does the 9333 fit actually then?

  14. Max
    July 17, 2017

    You say 9333 is required for wallet update but in fact don’t show where to use it. 9332 is shows in your litecoin.conf and 2300 elsewhere. Where does the 9333 fit actually then?

  15. Max
    July 16, 2017

    MPOS/NOMP is up and I see no issues when I run “node init.js” and all rest, with the exception of the mail server, are up and working fine. However, and it’s a big however, the payouts are not actually making to the site’s wallet or to the miner’s wallet.

    Using libdb4.8 with the latest MPOS build. Don’t see any errors but again the wallet is 13000 and shows no actual transaction(s).

    Could really, really use the answer. Have spent some 4 days looking around for it and we can’t seem to see what’s missing.

    Thanks. [email protected] or 919.923.0709

    1. Max
      July 16, 2017

      Running LTC daemon.

      node v0.10.25
      nvm 0.33.2
      npm 1.3.24

      There’s some few Litecoin in it if you can find the bug.

  16. Sanjay
    April 7, 2017


    As I am running node init.js this error throws.

    2017-04-07 15:29:00 [Payments] [litecoin] Unauthorized RPC access – invalid RPC username or password
    2017-04-07 15:29:00 [Payments] [litecoin] Unauthorized RPC access – invalid RPC username or password
    2017-04-07 15:29:00 [Pool] [litecoin] (Thread 1) Unauthorized RPC access – invalid RPC username or password
    (node-watch) First param in callback function is replaced with event name since 0.5.0, use (evt, filename) => {} if you want to get the filename

    throw er; // Unhandled ‘error’ event
    Error: bind EACCES
    at errnoException (net.js:905:11)
    at net.js:1073:30
    at Object.2:1 (cluster.js:594:5)
    at handleResponse (cluster.js:171:41)
    at respond (cluster.js:192:5)
    at handleMessage (cluster.js:202:5)
    at process.emit (events.js:117:20)
    at handleMessage (child_process.js:322:10)
    at (child_process.js:349:11)
    As I have manually add rpc username and password, you say bitcoin automatically generate this, how should I generate that, if not what I am doing wrong. Please help.

    1. Max
      July 16, 2017

      Bitcoin address [bitcoind getnewaddress] will give you a new wallet for receiving Bitcoin itself. The RPC username can be ‘bitcoinrpc’ and password can be anything (after a point they’ve stopped checking password I think I read).


  17. yavuz
    December 28, 2016

    hello how can i create this pool diffirent directory

  18. » Vps
    October 15, 2016

    […] Novice’s Guide to Setting up a Mining Pool … – Guide Requirements-VPS with at least 1GB of Ram, I just deployed an instance on for this guide since I had a free $5 coupon and it’s got a cheap … […]

  19. Mark
    October 11, 2016

    I am seeing 3 cronjobs errors which are disabled in Admin-Monitoring: “findblock”, “blockupdate” & “payouts”. I’m trying this guide with dashcoin. Everything went smoothly. This is what I see on ssh:

    2016-10-11 08:19:22 [Payments] [dash] Unauthorized RPC access – invalid RPC username or password
    2016-10-11 08:19:22 [Payments] [dash] Unauthorized RPC access – invalid RPC username or password

    Please. Any help will be appreciated.


    1. Max
      July 16, 2017

      Can I ask where you see the cron job errors/log? Can’t seem to find these outputs on my setup.

  20. Rishi
    February 15, 2016

    I am trying with peercoin but after running to run Stratum, I am getting

    [email protected]:~/nomp$ node init.js
    2016-02-15 17:16:31 [POSIX] [Connection Limit] (Safe to ignore) POSIX module not installed and resource (connection) limit was not raised
    2016-02-15 17:16:31 [Master] [CLI] CLI listening on port 17117
    2016-02-15 17:16:31 [Master] [PoolSpawner] Spawned 1 pool(s) on 1 thread(s)
    2016-02-15 17:16:32 [Switching] [Setup] (Thread 1) Loading last proxy state from redis
    2016-02-15 17:16:34 [Pool] [peercoin] (Thread 1) Could not start pool, error with init batch RPC call: {“code”:-32700,”message”:”Parse error”}

    Please help me with this error : Could not start pool, error with init batch RPC call: {“code”:-32700,”message”:”Parse error”}

    Thanks in advance for the wonderful blog.

    1. Olaf
      February 19, 2017

      For Peercoin zou need to use Python Stratum.
      Node Stratum not support Peercoin.

  21. MS
    December 8, 2015

    WHen I try to run node init.js i get this.

    The program ‘node’ can be found in the following packages:
    * node
    * nodejs-legacy
    Try: apt-get install


    1. Max
      July 16, 2017

      sudo apt-get install node nodejs-legacy

      / possibly should be sudo apt-get install nodejs nodejs-legacy

  22. Stoneboy
    October 1, 2015

    If your stuck on this Stuck at: “make –f makefile.unix USE_UPNP=- ”

    Try below:

    The build system has changed to autotools in later versions of Litecoin.

    The process now looks like this:
    make -j4
    make install # optional

  23. Stoneboy
    October 1, 2015

    Installing latest dev-libdb’s ( libdb4.8-dev) (don’t mind about …ppa:bitcoin/bitcoin…):

    sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
    sudo apt-get install libboost-dev
    sudo apt-get install libboost-all-dev

    sudo add-apt-repository ppa:bitcoin/bitcoin
    sudo apt-get update

    sudo apt-get install libdb4.8-dev libdb4.8++-dev libgmp-dev

  24. Stoneboy
    October 1, 2015

    when stuck on -g npm try this;

    # Using Ubuntu
    curl -sL | sudo -E bash –
    sudo apt-get install -y nodejs

    # Using Debian, as root
    curl -sL | bash –
    apt-get install -y nodejs

    and than this again:

    sudo npm cache clean -f
    sudo npm install -g n
    sudo n stable

  25. Stoneboy
    September 29, 2015

    Is guide updates already?… Stuck at: make –f makefile.unix USE_UPNP=- Pitty came from sofar….

  26. fanget
    September 26, 2015

    Thank you very much for this guide . It’s fantastic and help me a lot to understand who does work a pool.
    I’m trying to have multi coins on my pool ( MPOS/ uNOMP) but I guess it’s impossible. The only think that I can do is to have multicoin only with uNOMP and their Frontend….but this is to limited for me….

    Hope you can build a new tuto for multicoins with a nice website…

    Good job again

    Best regards

  27. Smegal
    September 21, 2015

    I found 14.04 server and it still gets stuck at
    make –f makefile.unix USE_UPNP=-

    I updated from the link you posted and a few installed but still no joy…

  28. Smegal
    September 21, 2015

    I downloaded the latest Ubuntu Server 14.04.3 LTS installed it on a computer locally, and hit a few snags. The first was the npm install -g npm line. I couldn’t issue this from Putty without err. I sudo locally on the server and issue the command and it works perfectly. So this may help someone else.

    So I am stuck at creating the Symbolic Link as written:
    ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf

    The error is:
    ln: failed to create symbolic link ‘/etc/apache2/conf-available/phpmyadmin.conf’: File exists

    This also may affect the process during the litecoin daemon setup:
    make –f makefile.unix USE_UPNP=-

    The error is:
    make: *** No rule to make target `–f’. Stop.

    I can’t find the exact flavor of Ubuntu 14.04 that you use on this post but I am not sure if this is the problem.

    I can send Crypto for any answers that make this work. Post an address and I will donate…

  29. Asher
    September 7, 2015

    when I do “npm update” this error happens:

    cc1plus: warning: enumeral and non-enumeral type in conditional expression
    CC(target) Release/
    CC(target) Release/
    ../sha1.c:4:25: fatal error: openssl/sha.h: No such file or directory
    compilation terminated. recipe for target ‘Release/’ failed
    make: *** [Release/] Error 1
    make: Leaving directory ‘/root/nomp/node_modules/stratum-pool/node_modules/multi-hashing/build’
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
    gyp ERR! stack at ChildProcess.emit (events.js:98:17)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
    gyp ERR! System Linux 3.16.0-38-generic
    gyp ERR! command “node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
    gyp ERR! cwd /root/nomp/node_modules/stratum-pool/node_modules/multi-hashing
    gyp ERR! node -v v0.10.40
    gyp ERR! node-gyp -v v1.0.1
    gyp ERR! not ok

    npm ERR! [email protected] install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] install script.
    npm ERR! This is most likely a problem with the multi-hashing package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! node-gyp rebuild
    npm ERR! You can get their info via:
    npm ERR! npm owner ls multi-hashing
    npm ERR! There is likely additional logging output above.
    npm ERR! System Linux 3.16.0-38-generic
    npm ERR! command “/usr/bin/node” “/usr/bin/npm” “update”
    npm ERR! cwd /root/nomp
    npm ERR! node -v v0.10.40
    npm ERR! npm -v 1.4.28
    npm ERR! code ELIFECYCLE
    npm ERR! not ok code 0

    Need help here.

    1. sixxkilur
      September 14, 2015

      I have ran into that one a few times; this worked for me Install libssl-dev.

    2. Smegal
      September 21, 2015

      I had this error and then just went to the console instead of Putty and I also enter sudo -s and type my password to remain root. It will install this way since that is all I did nothing more…

  30. youkun
    September 6, 2015

    I was trying this this guide again and again for XMG coinmagi
    please can you help me
    i can’t find home/username/.magid

    1. sixxkilur
      September 14, 2015

      Make sure you are showing hidden files and directories.

  31. guo
    September 4, 2015

    Who can fix it please

    var portalConfig = JSON.parse(JSON.minify(fs.readFileSync(“config.json”, {enco
    TypeError: Property ‘minify’ of object # is not a function
    at Object. (/home/7788/nomp/init.js:25:36)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:935:3

    1. sixxkilur
      September 14, 2015

      My NOMP gave that error when it was updated to the newest version you have to d/l an older version of Node and then install it. This worked for me on Ubuntu 14.04.3.

      sudo dpkg -i nodejs_0.10.40-1nodesource1~utopic1_amd64.deb

  32. mmurphy384
    August 28, 2015

    First off. . .. . many thanks for this guide. I learned so much about mining and pools.

    I’m fighting my way through this. It’s been a while since I’ve messed around with linux. But I’m getting through each step, one encountered-error at a time. I set this up on Amazon and the ubuntu uses (with no password) created some real challenges. Some things I’ve learned along the way (with regard to doing this at Amazon / EC2 / Ubuntu).
    – WHen copying some commands, the dash in the HTML document is different from the dash in unix. So, just get into the habit of redoing the dashes after you paste in the string.

    – I couldn’t get past the SSL errors. In retrospect, I probably could have altered my browser settings, but I set up the self-signed cert with these two places:

    Create cert:
    Install in apache

    – I had all kinds of problems in phpmyadmin. I couldn’t log in with root and when I logged in with phpmyadmin, there was no ‘users’ tab. I’m embarrassed how long it took to figure this one out. The conflicing info on “phpMyAmdin No Users tab” didn’t help. Basically, edit the /etc/phpmyadmin/ and find the commented out line about “allowNoPassword” = True and uncomment it. I was then able to log in as root . . . and saw the user tab.

    – The MAKEFILE part was the next scary part. I had all kinds of problems. But when I followed the above advice (a few comments up . . . about visiting the litecoin site), it worked. I had to study each and every error to figure it out. For example
    —– I needed to install some kind of “libtool” and issue a libtoolize command.
    —– run the ./autogen as ‘sudo ./autogen’
    —– When I ran the sudo ./configure . . . I had errors with an incompatiblt berkely DB. This one was a lot of fun too. That was easilly overriden with: sudo ./configure –with-incompatible-bdb

    So, I’m about 30% of my way through this guide and I have to ask myself. . . . is there a better way? Have more modern libraries come out that I can take advantage of? I’m sure I’ll work my way through the rest of this, but with my aged linux skills, I worry it’s going to take a long time to figure out each problem. Any thoughts?

    1. Zach Smith
      September 1, 2015

      In regards to your question “Is there a better way?”.

      The software being utilized in this guide is free and open source. They were never really designed to be all that friendly, although they are light years better then they were when they first came out. It’s just something you need to struggle with unless you plan on writing your own software or paying someone to do it. Unfortunately, any large successful pool operation you see is more then likely using completely custom software or a heavily modified version of MPOS and NOMP that is way more streamlined and easy to work with.

      Practice makes perfect though. When I originally wrote this guide back in February I actually had to refresh my skills and I setup a few pools on the VPS prior to me actually writing the guide. Out of the 3 large pool operations I have been apart of or ran myself, 1 of them actually used unmodified MPOS and NOMP. At my height I could pretty much do everything in this guide in about 10-15 minutes on a new VPS, the thing that took the longest was the compile of the coin daemon. This was when 3 to 5 coins were launching a day and I had to make 3 to 5 new pools a day…

    2. sixxkilur
      September 20, 2015

      It always helps when you add
      sudo add-apt-repository ppa:bitcoin/bitcoin;
      sudo apt-get update;
      sudo apt-get install libdb4.8-dev libdb4.8++-dev;
      sudo apt-get install libqt4-dev libprotobuf-dev protobuf-compiler;
      sudo apt-get install libssl-dev;

  33. Ben Kimstra
    August 23, 2015

    Hi Zach i didtched my dotcoin build and have started a GMC build. Im upto using winSCP and this part doesn’t work for me

    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:

    (where litecoin is gamecredits)

    When i go to this location (/home/username/) the only folder of file these is my GameCredits folder..No .gamecredits or anything greyed out like your image shows?

    1. Ben Kimstra
      August 23, 2015

      Fuck ignore this there are hidden files 🙁

  34. Ben Kimstra
    August 13, 2015

    Im stuck here

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

    I try to log in as the user i created (LiteCoin) but its not recognizing the password. I have logged out and back in but still nothing

    1. Ben Kimstra
      August 13, 2015

      EDIT: I logged in as root and used su LiteCoin
      received this “No Passwd entry for user ‘LiteCoin’

      1. Ben Kimstra
        August 13, 2015

        Ok i seem to have this sorted now but i am stuck on

        make –f makefile.unix USE_UPNP=-

        I have read the guide you posted below and well, i dont understand that. Im trying to make for Dotcoin

        1. Zach Smith
          August 13, 2015

          Make sure you are in the src directory when you try the makefile command. Also check the permissions on everything.

          While I have no experience with Dotcoin, I will say I have not heard of it before, now I am not saying it is a bad coin in the least I am sure it’s great. However, a lot of developers tend to forget to include some important files in their source and it will not compile. Since Dotcoin is a scrypt coin you may be able to pull some of the required files that are missing from another scrypt coin. This may or may not be the problem, but it’s worth looking into it.

          1. Ben Kimstra
            August 14, 2015

            Thank you loads for the fast reply. I’m just using dot as it has low hash rate and I can practice with the pool etc (confirm if I can actually get it to a point of finding a block etc).

            I’m going to work on this today. Do you have a guide on setting up a few pools, as in change it from dot to gmc or something or is it just a new VPS and follow the guide again?

          2. Zach Smith
            August 14, 2015

            No, I do not have a guide for multiple pools. I would suggest setting up a new VPS. Running multiple pools is possible on one machine and has been done plenty of times before, but you will need some intermediate systems administration skills to get it going.

          3. Jamie durdin
            August 22, 2015

            Hi Zach

            I wonder if you can help.

            I had a pool server made for me with Bitcoin and litecoin on the same Ubuntu system. The pools are both running fine, Bitcoin I can point miners to with no troubles. However the litecoin pool I can’t point any miners too.

            I have 4 mat Excaliburs and a big gridseed and none of them will connect to the pool. I tried to point a rented miner to it and that won’t connect either.

            Any ideas ? Please please I really need the help

  35. sixxkilur
    August 2, 2015

    Guide was useful but now I have the three main cronjobs not working
    blockupdate ERROR 0.02 seconds 07/27/2015 14:00:03 08/03/2015 05:20:01 Cron disbaled due to errors
    logs show
    2015-08-02 7:00:01 – CRIT –> Cronjob is currently disabled due to errors, use -f option to force running cron.

    1. Zach Smith
      August 13, 2015

      If this occurred after you have setup the pool and were mining on it, I will not be able to help you much. All sorts of different issues can cause the cronjobs to be disabled by MPOS, since it’s not a “clean install” it would be hard for me to diagnose it. I suggest you scour your logs more thoroughly and get in google. Also checkout the issue section of the MPOS github: and checkout their IRC channel on freenode #MPOS.

      1. sixxkilur
        August 13, 2015

        I discovered the cause of the issue; the coin daemon I have setup when the daemon closes sometimes on occasions overwrites a valid peers.dat with a blank one so unable to connect to receive block information. All seems to work fine now.

        1. yavuz
          January 14, 2017

          how to fix it?

  36. Jason Meek
    July 28, 2015

    I am also stuck on: make –f makefile.unix USE_UPNP=- I believe this is because the clone of contains no /src/makefile.unix why is that file not there?

    1. Zach Smith
      July 29, 2015

      Some more modern currencies are moving away from the common makefile method, after Bitcoin decided to do it. You can check out instructions on how to build litecoin here:

      I will be updating the guide within the next few weeks with some big changes. Using both uNOMP and fixing the build instructions for the daemon.

      1. Ben Kimstra
        August 14, 2015

        any idea when this guide will be updated?

  37. Stuck at: make –f makefile.unix USE_UPNP=-

    1. Dexter
      June 29, 2015

      Make sure you’re running Ubuntu 14.04. It failed for me on a newer version. Also check if you have all the dependencies installed. If you can, providena screenshot from the error as well.

  38. Dexter
    May 23, 2015

    Zach, you’re amazing. Thanks a lot for all the awesome guides. Please continue them, it’s definitely appreciated.

    1. Zach Smith
      May 25, 2015

      Thank You!

  39. Ajit
    May 22, 2015

    Will this guide work with CentOS 7?

    1. BlockGen (@BlockGen)
      May 22, 2015

      You can get MPOS and NOMP to work with CentOS. However, this guide was never meant for CentOS users. You can still use the guide as reference, but do not follow it exactly. It will take some adapting and improvising to get it going on CentOS correctly. If you are an experienced systems administrator it should not be a problem though.


Leave a Reply

Scroll to top