-
Notifications
You must be signed in to change notification settings - Fork 494
Configuration old
This guide will show you how to get the CoiniumServ project running on your system. It will not provide much trouble-shooting or help if you can't get it working. If you run into a problem you believe is a bug and not something caused by you; open an issue. If you simply can't get it working or don't understand something, ask in the #coiniumserv IRC channel.
Some of the problems may seem like errors, but aren't, so check and re-check your config before asking for help.
Running an operational pool takes a lot of time and effort. This is by no means a guide on how to run a pool, merely on how to set it up. To run a pool you need to have a greater understanding of the code and be able to troubleshoot yourself.
This guide is based around operations on an Ubuntu server, but as CoiniumServ can be run on most platforms in much the same way, so many of these instructions should work across the different platforms. See Here to compile and install CoiniumServ on your OS: Compilation And Installation
This guide also assumes you have the necessary dependencies to run and compile your coins daemon - and have compiled it. See the docs folder of the coin you plan to install's git repository if you are unsure.
Litecoin will be used as a scrypt example. Please see the CoiniumServ readme for a list of currently supported algorithms.
It is generally a good idea to create a text file full of any information you need to retain throughout the setup. The first is your coin address.
On linux, run:
litecoind getaccountaddres ""
And it will appear below to be copied. On any other system, open the gui wallet, click receive and copy the address.
The next thing you need to change is your config file for the coin. On linux, this is found at
~/.litecoin/litecoin.conf
Windows at
appdata/roaming/Litecoin/litecoin.conf
and on Mac at
~/Library/Application Support/Litecoin/litecoin.conf
Inside it you will need to add these configurations:
server=1
daemon=1
gen=0
listen=1
rpcserver=1
rpcuser= *YOUR USERNAME HERE*
rpcpassword= *YOUR PASSWORD HERE*
rpcallowip=127.0.0.1
rpcport=*YOUR PORT HERE (Generally over 3000)
It is a good idea to write the username, password and port for later use.
Start the coin daemon up, and let it synchronise.
Navigate to CoiniumServ/bin/Debug/config (On any platform).
There you will find config-example.json. Rename it to config.json, and open it up.
{
# -------------------------------
# Stack Configuration
# -------------------------------
# name: name of the pool stack.
"stack": {
"name": "CoiniumServ.com"
},
# -------------------------------
# Website Configuration
# -------------------------------
# enabled: set this true to enable frontend.
# bind: interface to bind webserver.
# port: port to listen for http connections.
# stats:
# updateInterval: interval for recaching statistics.
# hashrateWindow: how many seconds worth of shares should be gathered to generate hashrate.
# backend:
# enabled: set this true to enable admin backend.
# password: password for enabling administrator
# website configuration
"website": {
"enabled": true,
"bind": "127.0.0.1",
"port": 80,
"stats": {
"updateInterval": 60,
"hashrateWindow": 300
},
"backend" : {
"metrics": {
"enabled": false
}
}
},
# -------------------------------
# Logging Configuration
# -------------------------------
# root: relative path of logs.
# targets: log targets.
# target:
# enabled: is the log target enabled?
# type: console, file or packet.
# filename: filename of the log file.
# rolling: set this true to get a seperate log file for every day.
# level: minimum log level.
# logging configuration
"logging": {
"root": "logs",
"targets": [
{
"enabled": true,
"type": "console",
"level": "debug"
},
{
"enabled": true,
"type": "file",
"filename": "server.log",
"rolling": false,
"level": "information"
},
{
"enabled": true,
"type": "file",
"filename": "debug.log",
"rolling": false,
"level": "verbose"
},
{
"enabled": true,
"type": "packet",
"filename": "packet.log",
"rolling": false,
"level": "verbose"
}
]
}
}
This file is generally self explanatory. Set whether to enable or disable the website, and on which port it runs. You can also edit the name of the pool, (obviously set it to yours) and any logging info.
In CoiniumServ/bin/Debug/config/pools (On any platform), you will find advanced-example.json default-example.json and example.json.
Rename default-example.json to default.json, and open it up
{
# default pool configuration
# if a per-pool config file doesn't override a setting, default value from this file will be applied
# -------------------------------
# Coin Daemon RPC Connection
# -------------------------------
# host: ip/hostname of coin-daemon.
"daemon": {
"host": "127.0.0.1"
},
# -------------------------------
# Meta Configuration
# -------------------------------
# motd: message of the day.
"meta": {
"motd": "Welcome to CoiniumServ pool, enjoy your stay! - http://www.coinumserv.com"
},
# -------------------------------
# Payment Processing Configuration
# -------------------------------
# interval: interval in seconds that payment-processor will be running.
# minimum: minimum amount of coins before a miner is eligable for getting a payment.
"payments": {
"interval": 60,
"minimum": 0.01
},
# -------------------------------
# Miner Configuration
# -------------------------------
# validateUsername: set true to validate miner usernames as an addresses against the coin daemon.
# timeout: timeout in seconds to disconnect miners that did not submit any shares for the period.
"miner": {
"validateUsername": true,
"timeout": 300
},
# -------------------------------
# Job Manager Configuration
# -------------------------------
# blockRefresh: timeout in miliseconds to poll coin daemon for a new block.
# rebroadcast: if now new blocks are found in this many seconds, a new job will be created and broadcasted.
"job": {
"blockRefreshInterval": 1000,
"rebroadcastTimeout": 55
},
# -------------------------------
# Stratum Server Configuration
# -------------------------------
# stratum:
# bind: interface to bind stratum server.
# diff: default difficulty assigned to newly connected miners.
# vardiff:
# minDiff: minimum difficulty that can be assigned to miners.
# maxDiff: maximum difficulty that can be assigned to miners.
# targetTime: try to get a single share per this many seconds from miner.
# retargetTime: retarget a miners difficulty ever this many seconds.
# variancePercent: allow difficulty for a miner to vary this percent without retargeting.
"stratum": {
"bind": "0.0.0.0",
"diff": 16,
"vardiff": {
"minDiff": 8,
"maxDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
},
# -------------------------------
# Ban Configuration
# -------------------------------
# you can ban miners which submits invalid work / data to reduce system/network load.
# duration: duration of ban when a miner gets flagged for so.
# invalidPercent: percentage of invalid shares to trigger a ban.
# checkThreshold: number of shares required before a miner's shares are considered for a ban.
# purgeInterval: purge interval in seconds that bans are checked to see if they are expired.
"banning": {
"duration": 600,
"invalidPercent": 50,
"checkThreshold": 100,
"purgeInterval": 300
},
# -------------------------------
# Per-pool Storage Configuration
# -------------------------------
# redis:
# host: redis host.
# port: redis port.
# password: set the password if your redis installation requires one.
# databaseId: redis database instance id (optional)
"storage": {
"redis": {
"host": "127.0.0.1",
"port": 6379,
"password": "",
"databaseId": 0
}
},
# -------------------------------
# MPOS Compatibility Mode
# -------------------------------
# NOT-IMPLEMENTED-YET!
# host: database host.
# port: database port.
# username: username for connecting the database.
# password: password for connecting the database.
"mpos": {
"database": {
"host": "127.0.0.1",
"port": 3306,
"user": "username",
"password": "password"
}
},
# -------------------------------
# Getwork Server Configuration
# -------------------------------
# EXPERIMENTAL!; This feature is still in development and not complete yet.
# bind: interface to bind getwork server.
"vanilla": {
"bind": "localhost"
}
}
Here you will find the standard configuration for any pool you setup in the one instance of CoiniumServ. If you want them all to be separate, use the advanced-example.json instead of default.json combined with example.json.
Here you need to change the message of the day, and vardiff changes you want to make. Next, you will need to open example.json (which you can rename to whatever you want). If you are using advanced-example.json, you need to change these settings within advanced-example.json.
In this file you need to change enabled to true, this will tell CoiniumServ that this config is active. Change the "coin" option to YOURCOIN.json. A list of available coins are found in config/coins, and you can create a new one easily if yours is not there by simply changing the name, ticker and algorithm options.
"daemon": {
"port": 9333,
"username": "user",
"password": "password"
},
In this section you need to set the rpcuser, rpcpassword and rpcport to the info you saved in your coin's .conf file.
"wallet" : {
"address": "n3Mvrshbf4fMoHzWZkDVbhhx4BLZCcU9oY"
},
# rewards: list of addresses that gets a percentage from each mined block (ie, pool fee.)
"rewards": [
{"myxWybbhUkGzGF7yaf2QVNx3hh3HWTya5t": 1}
],
Here you set the address to be the account address you acquired earlier.
The rewards address is for fees. Set the address for the fee, and the percentage on the right. The example above will send 1% of all mined coins to "myxWybbhUkGzGF7yaf2QVNx3hh3HWTya5t".
"stratum": {
"enabled": true,
"port": 3333,
"vardiff": {
"enabled": true
}
},
This section sets the stratum port, where your miners mine to, and whether vardiff is to be used.
"storage": {
"redis": {
"enabled": true
}
},
Here you will have to specify whether you are running redis. The pool will function without it, you simply won't have hashrate info in the front-end.
Once you have double checked your config and ensured your coin's daemon is running, you can start the CoiniumServ.
Navigate to CoiniumServ/bin/Debug, and run CoiniumServ.exe
Hopefully your output should be something like this:
Point your miners to your domain name or server ip with the port set to your stratum config in the above section with your address to receive coins as the username and anything as the password. You should be getting accepted shares soon, and maybe even some blocks!
Generally when something isn't right with CoiniumServ it will crash, spitting out a lot of errors. If you do encounter a crash, read through it carefully and try to figure out where the crash is coming from. Generally it will be from your config files, re-check them, or even re-download them and try again.
Feel free to donate to the CoiniumServ project with any of the addresses that appear on startup, or me, the author of this guide at BTC: 19thWM2oHo6SypiUS1PrDZr9d4eUKtYbCB