Creating a Mining Pool

Prepare Server

Create AWS Account

Create an account with Amazon AWS.

Setup an Instance

On the home page, click the services tab and then go to compute and click 'EC2'. Once you are there you will chose your region on the top of the page in the header section. Next click the 'Launch Instance' button at the center of the page and then select an AMI. For this tutorial I am using Ubuntu Server 16.04 LTS.
Next you will need to choose an instance type. I am just going to use the t2.large for the tutorial.
You can then skip to step six and under the source tap select my IP.
Next press Review and Launch and then create a new key pair to be able to connect with your instance. Once the instance is live, you can connect to your instance using an SSH through Terminal, PuTTY or similar program.

SSH into the Instance

  1. 1.
    Download key pair that you created earlier
  2. 2.
    Make sure you are in the same directory as the key and allow permissions
1
chmod 600 <key-name>.pem
Copied!
  1. 1.
    SSH into instance
1
ssh -i <key-name>.pem [email protected]<EC2-IP-Address>
Copied!

Install Dependancies

1
sudo apt-get install aptitude
Copied!
1
sudo aptitude update
Copied!
1
sudo aptitude install โ€“with-recommends build-essential autotools-dev autoconf automake libcurl3 libcurl4-gnutls-dev git make cmake libssl-dev pkg-config libevent-dev libunbound-dev libminiupnpc-dev doxygen supervisor jq libboost-all-dev htop
Copied!
1
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
Copied!
1
sudo apt-get install libboost-all-dev git npm nodejs nodejs-legacy libminiupnpc-dev redis-server
Copied!
1
add-apt-repository ppa:bitcoin/bitcoin
Copied!
1
sudo apt-get update
Copied!
1
apt-get install libdb4.8-dev libdb4.8++-dev
Copied!
1
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh
Copied!
1
bash install_nvm.sh
Copied!
  • After npm is installed you will have to log out and then back into your instance and continue installing dependancies.
1
source ~/.profile
Copied!
1
nvm install 0.10.48
Copied!
1
nvm use 0.10.48
Copied!
1
nvm alias default 0.10.48
Copied!
1
nvm use default
Copied!
  • Install Apache2 for hosting the front end.
1
sudo apt-get update
Copied!
1
sudo apt-get install apache2
Copied!
  • Adjust firewall to allow Apache full.
1
sudo ufw allow 'Apache Full'
Copied!

Install Qwertycoin

1
git clone --recurse-submodules https://github.com/qwertycoin-org/qwertycoin
Copied!
1
cd ./qwertycoin
Copied!
1
mkdir ./build
Copied!
1
cd ./build
Copied!
1
cmake ..
Copied!
1
cmake --build . --config Release
Copied!

Start Daemon and Let It Sync

1
cd build/src
Copied!
1
tmux
Copied!
1
./qwertycoind
Copied!
  • Let the blockchain sync before continuing
  • To sync the blockchain faster follow this guideโ€‹
  • control b + d to exit tmux

Start Simple Wallet and Follow Steps to Generate a New Wallet Address

  • After you generated a new wallet exit it and run this:
1
tmux
Copied!
1
./simplewallet --wallet-file <wallet_name> --password <wallet_password> --rpc-bind-port 8198
Copied!
  • control b + d to exit tmux

Install Pool Software

Install Dependancies

1
sudo apt-get install libssl-dev libboost-all-dev
Copied!
1
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash
Copied!
1
sudo apt-get install -y nodejs
Copied!
1
sudo add-apt-repository ppa:chris-lea/redis-server
Copied!
1
sudo apt-get update
Copied!
1
sudo apt-get install redis-server
Copied!
  • Clone repository
1
git clone https://github.com/dvandal/cryptonote-nodejs-pool.git pool
Copied!
1
cd pool && npm update
Copied!

Pool Configuration

  • Copy the config_examples/qwertycoin.json file to config.json
1
cp config_examples/qwertycoin.json config.json
Copied!
Change the following variables: Line 2 - Pool host to your pools IP Address Line 30 - Your simplewallet address that you generated Line 138 - Set your API password Line 125-127 - (Optional) change pool fees

Copy website_example Files to html directory

1
sudo cp -rf js/ lang/ pages/ themes/ admin.html config.js index.html /var/www/html
Copied!

Configuring website_example

  • Edit config.js to use your pool's specific configuration

Start the Mining Pool

1
cd && cd pool
Copied!
1
node init.js
Copied!
  • Your pool should now be visible at your server's IP address
  • You can visit your admin page by appending admin.html to your server IP address in your browsers search bar like so:
http://server-ip-address/admin.html
  • Your admin password is your API password you set earlier in config.json