Hello everybody! In this how to guide I will be showing you how to make your own ethereum mining pool! This will be a full fledged guide with everything you will need to know in order to create a successful pool.
In order to make a pool, you will need a good VPS host. Some good hosts that I recommend are Linode and DigitalOcean. Here are the MINIMUM specs required to run a small pool:
You will also need the following tools on your computer:
Open up putty and log into your VPS as the root user. Create a new, non root user and give it sudo access. Then, log in as your new user. Never log in as root again.
Run the following shell commands to update Ubuntu:
sudo apt-get update
sudo apt-get dist-upgrade
Next, create a 4GB swap file:
dd if=/dev/zero of=/mnt/myswap.swap bs=1M count=4000
mkswap /mnt/myswap.swap
swapon /mnt/myswap.swap
Next, edit the file nano /etc/fstab
, and add the following line to the end of the file:
/mnt/myswap.swap none swap sw 0 0
Run the following commands:
apt-get install git -y
apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev -y
apt-get install libboost-all-dev git npm nodejs nodejs-legacy libminiupnpc-dev redis-server -y
apt-get install libdb4.8-dev libdb4.8++-dev -y
apt-get install golang -y
apt-get install nginx -y
First, we need to let Linux know that Ethereum exists so it can install it for us. To do this, run these commands:
sudo apt-get install software-properties-common -y
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
And finally, to install and start the node:
sudo apt-get install ethereum
geth account new
geth
This is really the home stretch! Let's compile the pool software:
git config --global http.https://gopkg.in.followRedirects true
git clone https://github.com/sammy007/open-ethereum-pool.git
cd open-ethereum-pool
make
Configuration is very easy with this pool: simply edit config.json using nano like you did before. All settings should be clear and documented.
To run the pool:
./build/bin/open-ethereum-pool config.json
At this point, you should have a working pool up and running, but we want a web interface, don't we?
Enter the www directory (cd www), and change "ApiUrl: '//example.net/'" to match your domain name. Change the other options to your environment too.
Install EmberJS to push data to the website:
npm install -g ember-cli@2.9.1
npm install -g bower
npm install
bower install
./build.sh
We also need to register our directories with Nginx:
Edit the file /etc/nginx/nginx.conf, and add the following lines:
upstream api {
server 127.0.0.1:8080;
}
Under Location: /, add:
location /api {
proxy_pass http://api;
}
And that's it! You now should have a working pool where miners can connect! Test everything out and make sure the web interface works!
If this guide helped you to create your pool, please give it an up vote!
Thank you so much for reading this far, and see you in the next one!