Skip to content

config.json

raistlinthewiz edited this page Oct 16, 2014 · 23 revisions

config.json contains the generic configuration for the server. You have to first copy config-example.json as config.json and start editing it.

Stack Configuration

Stack configuration hosts the settings for your pool stack.

    "stack": {
        "name": "CoiniumServ.com",
        "nodes": [
            {
                "location": "eu",
                "address": "127.0.0.1",
                "default": true
            }
        ]
    }
  • name: Name of the pool stack, that will be rendered over various places in your frontend.

nodes

Contains the list of your stratum server nodes over different geographic locations.

  • location: Set here the geographic location of your server. Make sure to use the two-letter country code as web front-end will be rendering a flag icon using it.
  • address: ip/domain of the server hosting the node.
  • default: set this true if you want to set this node as the default one in the stack.

Statistics Configuration

Contains the statistics configuration settings which are used by the web front-end.

"statistics": {
        "updateInterval": 60,
        "hashrateWindow": 300
    }
  • updateInterval: Update interval in seconds for updating settings.
  • hashrateWindow: How many seconds worth of shares should be included in to calculate hashrate data.

Website Configuration

Settings for embedded web-server and front-end

    "website": {
        "enabled": true,
        "bind": "",
        "port": 80,
        "template": "default",
        "feed": "",
        "backend": {
            "metrics": {
                "enabled": false
            }
        }
    }
  • enabled: Is the embedded web-server enabled?
  • bind: Interface that embedded web-server will bind. Leave this empty to let it bind on all available interfaces.
  • port: Port that embedded web-server listen for http connections.
  • template: Name of the template that will be used. It should exist in bin/Release/web.
  • feed: Url of the RSS feed that will be used for news.

Backend settings

If enabled, backend will available for pool administrator's use.

Metrics

Settings for metrics interface which is only enabled within debug mode.

  • enabled: If enabled, a metrics interface for performance measures will be available over /metrics page. Should be only used for development & debugging purposes.

Logging Configuration

Contains settings for logging subsystem.

{
    "root": "logs",
    "targets": [
        {
            "enabled": true,
            "type": "file",
            "filename": "server.log",
            "rolling": false,
            "level": "information"
        },
        {
            "enabled": true,
            "type": "file",
            "filename": "debug.log",
            "rolling": false,
            "level": "verbose"
        },
        {
            "enabled": false,
            "type": "packet",
            "filename": "packet.log",
            "rolling": false,
            "level": "verbose"
        }
    ]
}
  • root: Root folder name that the logs will be put in.

Targets

You can add here log targets with different settings.

  • enabled: Is the target enabled?
  • type: Type of the target.
    • file: Plain file log.
    • packet: Specially formatted file that logs network packets for debugging purposes.
  • filename: Name of the file.
  • rolling: Enable this true to create files for each day.
  • level: Minimum log level the target will emit.