how to Setup Pirl (PIRL) coin mining Pool Guide step by step
Pirl (PIRL) coin mining Pool Setup Guide
This a step by step guide on how to setup your own Pirl Coin Mining Pool. This guide is going over how to setup an Open open-Pirl-coin-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 http://pirl.miningpond.com/#/
For this guide purpose we I will be using Pirl Coin Crypto Currency .
Requirements
- VPS with at least 1GB of Ram you can get it from any where like vultr , lenode , digitalocen
- Ubuntu 16.04 x64
- Putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
- WinSCP (http://winscp.net/eng/download.php)
Setup
At this point you should have your VPS started, putty up and running and your logged in as root.
UPDATE UBUNTU 16
sudo apt-get update
sudo apt-get dist-upgrade
sudo reboot
Install make and build tools
sudo apt-get install build-essential make
GoLangInstall GoLang
sudo tar -xvf go1.9.2.linux-amd64.tar.gz
sudo mv go /usr/local
export GOROOT=/usr/local/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
export GOPATH=$HOME/go
Type: go version
You should have a response with the version.
Installing Redis latest version
sudo cp src/redis-cli /usr/local/bin/
sudo mkdir /etc/redis
sudo mkdir /var/redis
sudo cp utils/redis_init_script /etc/init.d/redis_6379
sudo cp redis.conf /etc/redis/6379.conf
sudo nano /etc/redis/6379.conf
- Edit the configuration file, making sure to perform the following changes:
- Set daemonize to yes (by default it is set to no).
- Set the dir to /var/redis/6379 (very important step!)
sudo mkdir /var/redis/6379
sudo update-rc.d redis_6379 defaults
sudo /etc/init.d/redis_6379 start
Test Redis Install
redis-cli
Expected response
redis 127.0.0.1:6379> ping
PONG
exit
Install nginx
sudo apt-get install nginx
NGINX starts automatically on port 80. This is all that needs to be competed at this step.
NPM and NODE Install
Install using this guide provided ..
ln -s `which nodejs` /usr/bin/node
User Setup
You never run things like your coin daemon (wallet), or pool 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.
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
Pirl Coin Demon install
Login to server as user we have crated above this step
cd ~
mkdir pirl
cd pirl
git clone https://github.com/pirl/pirl.git
cd pirl
export GOROOT=/usr/local/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
export GOPATH=$HOME/go
make pirl
Run pirl For first Time
cd build/bin/
./pirl – rpc console
-add account for miner pool
personal.newAccount()
You will see like this ” 0xf0d066c928aeb570847900a1a39fde27a98d83ce ”
Save this adders in you pc somewhere as we need to use this in later stage of configuration
DON’T FORGET PASSWORD
To Exit: Control B release buttons and then press D
Pirl Coin Pool Build
cd ..
cd open-ethereum-pool
IF YOU NEED TO RUN MAKE AGAIN USE:
export GOROOT=/usr/local/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
export GOPATH=$HOME/go
make
Edit pool configs before ./build
cp ~/open-ethereum-pool/config.example.json ~/open-ethereum-pool/build/bin/config.json
edit config.json
edit www/config/environment.js
Change ApiUrl: ‘//example.net/’ to ApiUrl: ‘//youtdomain.com:8080/
Configuration
Configuration is actually simple, just read it twice and think twice before changing defaults.
Don’t copy config directly from this manual. Use the example config from the package, otherwise you will get errors on start because of JSON comments.
Build configuration
cd www
sudo npm install -g ember-cli@2.9.1
sudo npm install -g bower
sudo npm install
bower install
./build.sh
NGINX Config
-Change NGINX default config
sudo nano /etc/nginx/sites-available/default
The final config for NGINX should be formatted like this:
upstream api
{
server dbix.drowningpool.net:8080;
}server {
listen 80 default_server;
listen [::]:80 default_server;
root /home/username/open-ethereum-pool/www/dist; # <- This should be the absolute path to the files
index index.html index.htm index.nginx-debian.html;server_name _;location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
Restart NGINX
sudo service nginx reload
Firewall ports to open
Stratum: 8008
Web 80
Proxy is 8888 and can be opened for http getwork clients.
Make password file for wallet unlock in rpc
Login to server using
- WinSCP (http://winscp.net/eng/download.php)
Now go to Pirlcoin folder
Right click >> create new file >> add the password you use when you creating account in music coin demon >> save it
Start Pirl Coin demon
screen
If comand not working use
sudo apt-get install screen
cd pirl/pirl/build/bin/
./pirl –rpc –cache=128 –extradata “your-domain-name” –identity “your-domain-name” –maxpeers 500 –rpcapi “eth,net,web3,admin” –rpcport “6588” –rpcaddr “127.0.0.1” –etherbase “your-wallet-address- created above step ” –unlock “your-wallet-address- created above step” –password “location to password file” –rpccorsdomain “localhost” –mine –minerthreads 0
IT will take some hours to sync with blockchain so just close this putty session and will will run for ever in the screen
Start Pool
cd ~/open-ethereum-pool/build/bin
./open-ethereum-pool config.json
Some important command to interact with your pool wallet
— Send fund from pool wallet to another wallet ——-
eth.sendTransaction({from: ‘0xf0d066c928aeb570847900a1a39fde27a98d83ce’, to: ‘0x325e8a67db242341a2b65bf0524566c34d3c26f7’, value: web3.toWei(851.5, “ether”)})
— unlock your wallet —-
personal.unlockAccount(primary, “password”);
— Check balance —
web3.fromWei(eth.getBalance(eth.coinbase), “ether”)
Notes
- Unlocking and payouts are sequential, 1st tx go, 2nd waiting for 1st to confirm and so on. You can disable that in code. Carefully read
docs/PAYOUTS.md
. - Also, keep in mind that unlocking and payouts will halt in case of backend or node RPC errors. In that case check everything and restart.
- You must restart module if you see errors with the word suspended.
- Don’t run payouts and unlocker modules as part of mining node. Create separate configs for both, launch independently and make sure you have a single instance of each module running.
- If
poolFeeAddress
is not specified all pool profit will remain on coinbase address. If it specified, make sure to periodically send some dust back required for payments.
I hope you enjoyed this basic how-to on the PirlCoin pool build!
No comments