This How-to need to be actualized : Iridium forked at block 115200 to change the POW. This how-to can be applied on the iridium-pool fork : https://github.com/iridiumdev/iridium-pool : it is ready for the new POW. and can be run on Node v8.11.1 LTS

This a step by step guide on how to setup your own crypto-currency mining pool. This guide is going over how to setup an Iridium mining 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 French (IRD) mining pool ~ http://irdpool.fr

For this guide purpose we will be using Iridium(IRD) Crypto Currency.

Requirements

a VPS : you can get it from any where like ovh, vultr , lenode , digitalocean

  • VPS with at least :
    • 2GB of Ram
    • 2 CPU core
    • 50Gb disk
    • Ubuntu 16.04 x64 or Ubuntu 18.04 x64

Setup

At this point you should have your VPS started, terminal up and running.

Update Ubuntu

$ sudo apt-get update
$ sudo apt-get dist-upgrade

Setup SWAP

We are setting up a 4GB swap, which may be overkill, but it's the most common swap sized used in most guides so we'll keep it at that.

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

Now let's add it into fstab so it'll activate at boot.

$ sudo nano /etc/fstab

Add the following line at the end of the file.

/mnt/myswap.swap none swap sw 0 0

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

$ sudo apt-get install build-essential cmake libtool autotools-dev autoconf libssl-dev pkg-config libboost-all-dev libssl-dev libzmq3-dev libunbound-dev libsodium-dev libminiupnpc-dev libunwind-dev liblzma-dev libreadline-dev libldns-dev libexpat1-dev libgtest-dev doxygen graphviz git curl libminiupnpc-dev
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
 
**exit and reopen terminal**
 
$ sudo curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ sudo npm i -g npm
$ sudo add-apt-repository ppa:chris-lea/redis-server
$ sudo apt-get update
$ sudo apt-get install redis-server

The latest version of https://github.com/iridiumdev/iridium-pool can run now with Node v8.11.1 LTS

Now let's setup the coin daemon, we will be using Iridium.

install latests binaries (faster an easier way)

Getting latests binaries (no need to compile - should work as is but depend of cpu flags)

If for any reason you need to compile, here are the instructions :

Build Iridium core from source

You need boost libs for the core to compile :

$ sudo apt-get install libboost-all-dev

Here we go :

$ git clone https://github.com/iridiumdev/iridium.git
$ cd iridium
$ mkdir iridium-build
$ cd iridium-build
$ cmake -D STATIC=ON -D CMAKE_BUILD_TYPE=RELEASE ..
$ PORTABLE=1 make -j$(nproc)

Now sit back for a couple minutes and allow it to compile.

Start the core daemon for the first time

The resulting executables can be found in iridium/iridium-build/src

After entering ls we will see many files are in the directory. We need to start daemon now so that it will start the sync to blockchain network.

$ ./iridiumd

Once again feel free to get up and stretch your legs as the daemon take some time to sync.

When we get the message:

**********************************************************************
You are now synchronized with the Iridium network.

Exit iridiumd and iridium_simplewallet with the "exit" or "save" command.
Otherwise, you will possibly need to synchronize the blockchain again.

Use "help" command to see the list of available commands.
**********************************************************************

type exit so that it will save the fresh downloaded blockchain (default location is ~/.iridium).

Start the core daemon

Start the iridium daemon (default p2p port is 12007 and listen all interfaces, default rpc port is 13007 and listen only on localhost) :

$ ./iridiumd 

Generate the pool wallet

Open a new terminal window and enter the src folder

$ cd iridium/iridium-build/src
$ ./iridium_simplewallet

Type G for a new wallet

Pick the wallet name and then your password. Record the wallet address, you will need it for the pool configuration later. You can retrieve it by reading yourwallet.address. Once the wallet process is complete type exit so that it will save.

Open the simplewallet in RPC listen mode

$ ./iridium_simplewallet --wallet-file xxxxxxxx.wallet --password xxxxxxx --rpc-bind-port 14007

https://github.com/iridiumdev/iridium-pool : is ready for current POW. Use it istead of the forknote pool

Using a new terminal window

We will use the https://github.com/dvandal/cryptonote-nodejs-pool to setup the pool and front end site.

Downloading and Installing

Clone the repository and run npm update for all the dependencies to be installed:

   $ git clone https://github.com/dvandal/cryptonote-nodejs-pool.git pool
   $ cd pool
   $ npm update

Configuration

Cryptonote coins other than Iridium: this software may or may not work with any given cryptonote coin. Be wary of altcoins that change the number of minimum coin units because you will have to reconfigure several config values to account for those changes. Unless you're offering a bounty reward - do not open an issue asking for help getting a coin other than Iridium working with this software

## Edit the config.json file to fit your needs

a note about fees : The “blockUnlocker” section contain configuration for fees :

  • “poolFee” : Fee received in the wallet pool.
  • “devDonation” : Fee for the pool dev, address is in lib/configReader.js
  • “coreDevDonation”: Fee for the core dev, address is in lib/configReader.js

To help improving this project, thank you considering to donate to core developpment.

Always check address validity in configReader.js

{
    "poolHost": "your.pool.host",
 
    "coin": "iridium",
    "symbol": "IRD",
    "coinUnits": 100000000,
    "coinDecimalPlaces": 4,
    "coinDifficultyTarget": 175,
 
    "daemonType": "default",
    "cnAlgorithm": "cryptonight_light",
    "cnVariant": 1,
    "cnBlobType": 2,
 
    "logging": {
        "files": {
            "level": "info",
            "directory": "logs",
            "flushInterval": 5
        },
        "console": {
            "level": "info",
            "colors": true
        }
    },
 
    "poolServer": {
        "enabled": true,
        "clusterForks": "auto",
        "poolAddress": "** Your pool wallet address **",
        "intAddressPrefix": null,
        "blockRefreshInterval": 1000,
        "minerTimeout": 900,
        "sslCert": "./cert.pem",
        "sslKey": "./privkey.pem",
        "sslCA": "./chain.pem",
        "ports": [
            {
                "port": 3333,
                "difficulty": 5000,
                "desc": "Low end hardware"
            },
            {
                "port": 4444,
                "difficulty": 15000,
                "desc": "Mid range hardware"
            },
            {
                "port": 5555,
                "difficulty": 25000,
                "desc": "High end hardware"
            },
            {
                "port": 7777,
                "difficulty": 500000,
                "desc": "Cloud-mining / NiceHash"
            },
            {
                "port": 8888,
                "difficulty": 25000,
                "desc": "Hidden port",
                "hidden": true
            },
            {
                "port": 9999,
                "difficulty": 20000,
                "desc": "SSL connection",
                "ssl": true
            }
        ],
        "varDiff": {
            "minDiff": 100,
            "maxDiff": 100000000,
            "targetTime": 60,
            "retargetTime": 30,
            "variancePercent": 30,
            "maxJump": 100
        },
        "paymentId": {
            "addressSeparator": "+"
        },
        "fixedDiff": {
            "enabled": true,
            "addressSeparator": "."
        },
        "shareTrust": {
            "enabled": true,
            "min": 10,
            "stepDown": 3,
            "threshold": 10,
            "penalty": 30
        },
        "banning": {
            "enabled": true,
            "time": 600,
            "invalidPercent": 25,
            "checkThreshold": 30
        },
        "slushMining": {
            "enabled": false,
            "weight": 300,
            "blockTime": 60,
            "lastBlockCheckRate": 1
         }
    },
 
    "payments": {
        "enabled": true,
        "interval": 1800,
        "maxAddresses": 50,
        "mixin": 5,
        "priority": 0,
        "transferFee": 5000000,
        "dynamicTransferFee": true,
        "minerPayFee" : true,
        "minPayment": 100000000,
        "maxPayment": null,
        "maxTransactionAmount": 0,
        "denomination": 10000000
    },
 
    "blockUnlocker": {
        "enabled": true,
        "interval": 30,
        "depth": 20,
        "poolFee": 0.8,
        "devDonation": 0.2,
        "networkFee": 0.0
    },
 
    "api": {
        "enabled": true,
        "hashrateWindow": 600,
        "updateInterval": 5,
        "bindIp": "0.0.0.0",
        "port": 8117,
        "blocks": 30,
        "payments": 30,
        "password": "your_password",
        "ssl": false,
        "sslPort": 8119,
        "sslCert": "./cert.pem",
        "sslKey": "./privkey.pem",
        "sslCA": "./chain.pem",
        "trustProxyIP": true
    },
 
    "daemon": {
        "host": "127.0.0.1",
        "port": 13007
    },
 
    "wallet": {
        "host": "127.0.0.1",
        "port": 13008
    },
 
    "redis": {
        "host": "127.0.0.1",
        "port": 6379,
        "auth": null,
        "db": 0,
        "cleanupInterval": 15
    },
 
    "notifications": {
        "emailTemplate": "email_templates/default.txt",
        "emailSubject": {
            "emailAdded": "Your email was registered",
            "workerConnected": "Worker %WORKER_NAME% connected",
            "workerTimeout": "Worker %WORKER_NAME% stopped hashing",
            "workerBanned": "Worker %WORKER_NAME% banned",
            "blockFound": "Block %HEIGHT% found !",
            "blockUnlocked": "Block %HEIGHT% unlocked !",
            "blockOrphaned": "Block %HEIGHT% orphaned !",
            "payment": "We sent you a payment !"
        },
        "emailMessage": {
            "emailAdded": "Your email has been registered to receive pool notifications.",
            "workerConnected": "Your worker %WORKER_NAME% for address %MINER% is now connected from ip %IP%.",
            "workerTimeout": "Your worker %WORKER_NAME% for address %MINER% has stopped submitting hashes on %LAST_HASH%.",
            "workerBanned": "Your worker %WORKER_NAME% for address %MINER% has been banned.",
            "blockFound": "Block found at height %HEIGHT% by miner %MINER% on %TIME%. Waiting maturity.",
            "blockUnlocked": "Block mined at height %HEIGHT% with %REWARD% and %EFFORT% effort on %TIME%.",
            "blockOrphaned": "Block orphaned at height %HEIGHT% :(",
            "payment": "A payment of %AMOUNT% has been sent to %ADDRESS% wallet."
        },
        "telegramMessage": {
            "workerConnected": "Your worker _%WORKER_NAME%_ for address _%MINER%_ is now connected from ip _%IP%_.",
            "workerTimeout": "Your worker _%WORKER_NAME%_ for address _%MINER%_ has stopped submitting hashes on _%LAST_HASH%_.",
            "workerBanned": "Your worker _%WORKER_NAME%_ for address _%MINER%_ has been banned.",
            "blockFound": "*Block found at height* _%HEIGHT%_ *by miner* _%MINER%_*! Waiting maturity.*",
            "blockUnlocked": "*Block mined at height* _%HEIGHT%_ *with* _%REWARD%_ *and* _%EFFORT%_ *effort on* _%TIME%_*.*",
            "blockOrphaned": "*Block orphaned at height* _%HEIGHT%_ *:(*",
            "payment": "A payment of _%AMOUNT%_ has been sent."
        }
    },
 
    "email": {
        "enabled": false,
        "fromAddress": "your@email.com",
        "transport": "sendmail",
        "sendmail": {
            "path": "/usr/sbin/sendmail"
        },
        "smtp": {
            "host": "smtp.example.com",
            "port": 587,
            "secure": false,
            "auth": {
                "user": "username",
                "pass": "password"
            },
            "tls": {
                "rejectUnauthorized": false
            }
        },
        "mailgun": {
            "key": "your-private-key",
            "domain": "mg.yourdomain"
        }
    },
 
    "telegram": {
        "enabled": false,
        "botName": "",
        "token": "",
        "channel": "",
        "channelStats": {
            "enabled": false,
            "interval": 30
        },
        "botCommands": {
            "stats": "/stats",
            "report": "/report",
            "notify": "/notify",
            "blocks": "/blocks"
        }
    },
 
    "monitoring": {
        "daemon": {
            "checkInterval": 60,
            "rpcMethod": "getblockcount"
        },
        "wallet": {
            "checkInterval": 60,
            "rpcMethod": "getbalance"
        }
    },
 
    "prices": {
        "source": "tradeogre",
        "currency": "USD"
    },
 
    "charts": {
        "pool": {
            "hashrate": {
                "enabled": true,
                "updateInterval": 60,
                "stepInterval": 1800,
                "maximumPeriod": 86400
            },
            "miners": {
                "enabled": true,
                "updateInterval": 60,
                "stepInterval": 1800,
                "maximumPeriod": 86400
            },
            "workers": {
                "enabled": true,
                "updateInterval": 60,
                "stepInterval": 1800,
                "maximumPeriod": 86400
            },
            "difficulty": {
                "enabled": true,
                "updateInterval": 1800,
                "stepInterval": 10800,
                "maximumPeriod": 604800
            },
            "price": {
                "enabled": true,
                "updateInterval": 1800,
                "stepInterval": 10800,
                "maximumPeriod": 604800
            },
            "profit": {
                "enabled": true,
                "updateInterval": 1800,
                "stepInterval": 10800,
                "maximumPeriod": 604800
            }
        },
        "user": {
            "hashrate": {
                "enabled": true,
                "updateInterval": 180,
                "stepInterval": 1800,
                "maximumPeriod": 86400
            },
            "payments": {
                "enabled": true
            }
        },
        "blocks": {
            "enabled": true,
            "days": 30
        }
    }
}
 

Start the pool

You can start all the pool modules at one time in the same terminal, screen, tmux:

$ node init.js -module=pool -config=config.json

This will show all threads running and start accepting shares for your pool!

Or start each module individually, each in it's own term/screen/tmux (better for maintenance)

$ node init.js -module=pool -config=config.json
$ node init.js -module=api -config=config.json
$ node init.js -module=unlocker -config=config.json
$ node init.js -module=payments -config=config.json

and watch logs you setup in the config.json

You can no connect any miner to test that things are running smoothly.

Hosting the front end

Simply host the contents of the website directory on file server capable of serving simple static files (nginx, apache…) Edit the variables in the config.js file to use your pool's specific configuration.

Customize your website

The following files are included so that you can customize your pool website without having to make significant changes to index.html or other front-end files thus reducing the difficulty of merging updates with your own changes:

  1. custom.css : for creating your own pool style/
  2. custom.js : for changing the functionality of your pool website/
  3. TODO: WHAT PAGE TO EDIT FOR DISCORD SUPPORT-POOL CHAT

Then simply serve the files via nginx, Apache, Google Drive, or anything that can host static content.

Congratulations You have now your own an IRD Mining Pool Ready to Start

Initial Guide compiled by PsychoSterope