How to configure Foxy-Proxy¶
Foxy-Proxy looks for a file named
config.yaml in the current directory it is run from. If no such file is found it will look for it in
If no config file can be found, an example config file is created for you in
To store statistics Foxy-Proxy uses a SQLite database located in
<HOMEDIR>/.config/foxy-proxy/db.sqlite by default.
Autostart Foxy-Proxy on boot¶
The following steps for Windows will start the proxy on login, not boot
.batfile which contains the following lines:
cls :start call foxy-proxy goto start
Create a shortcut to that bat file and move it into
npm i -g pm2
Start the proxy through pm2:
pm2 start foxy-proxy
Save the current running configuration and create a startup cmd:
pm2 save pm2 startup
Depending on if you are
pm2 startupcommand either runs directly or outputs a sudo command you will need to execute.
Per Miner maxScanTime¶
To allow fine granular control each miner which supports urls instead of simple ip:port can subscribe to their own maxScanTime. To do so, just append the preferred maxScanTime in seconds to the url, like so:
http://localhost:12345/burst-bhd/25. That would result in that miner setting its
maxScanTime to 25 seconds.
The config file currently consists of these config options:
proxies: Array of proxy config objects, see below (required)
name: The name of the proxy, must be unique (required)
maxScanTime: The maximum amount of seconds each round takes to scan completely. Defaults to 30 seconds.
ignoreMinerIP: Only use the miners name for identification, useful for Heroku deployments.
color: Use the defined hex string as color for this proxy's name. eg
minerColor: Use the defined hex string as color for this proxies's miner names in logs. eg
minerOfflineMinutes: Report miners offline after at least this amount of minutes. Defaults to 5.
minerOfflineBlocks: Report miners offline after at least this amount of blocks. Defaults to 2.
hideUpstreamName: Set to true to hide the upstreams name in logs. Useful for single upstream proxies.
humanizeDeadlines: Set to true to display deadlines in the cli in a human readable format (2d 02:46:13).
dynamicDeadlineColor: Set to true to use dynamic colors from red to green for deadlines.
dynamicDeadlineColorLimit: Set the deadline limit from where on deadlines are considered "bad" and colored red. Defaults to 2678400 (31 days).
disabled: Set to true to disable the proxy.
useProfitability: Set to true to use dynamic prios based on profitabilities of the coins.
useEcoBlockRewards: Set to true to enable eco block rewards for useProfitability option.
maxNumberOfChains: Set the max number of chains that should be scanning. Can be combined with
useProfitabilityto only mine the
nmost profitable chains.
upstreams: Array of upstream config objects, see below (required)
name: The name of the upstream, must be unique within the proxy (required)
url: The upstream url, should be omitted for foxy-pools
'pool'depending on if the upstream is a pool or a solo wallet (required)
isBHD: Set to
trueif the upstream is a bhd solo wallet or bhd pool (required for bhd based upstreams)
walletUrl: Optional url of a wallet to retrieve block winner information
customEndpoint: Set a custom endpoint for burst like coins. Defaults to
burst. Set to
boomfor the boomcoin wallet.
passphrases: accountId -> passphrase mapping for solo mining (required for solo)
passphrase: Use a singular passphrase for all accountIds (pool emulation)
targetDL: Deadlines below this value will not be sent to the upstream (required)
updateMiningInfoInterval: Change the default 1000 msec update interval, value is in ms
accountKey: Add the supplied account key to miningInfo and nonceSubmission requests (required for bhd pools)
payoutAddress: Your payout address, required for FoxyPool type upstreams.
type: Used to distinguish different upstream types. Valid values are
socketio. Omit to use the generic upstream.
accountIdToUrl: accountId -> upstream url (object), override the default upstream url based on the accountId
historicalRoundsToKeep: By default keep 720 rounds of historical stats, overwrite here
minerName: Set a custom miner name
accountName: Set a custom account name in FoxyPool
sendTargetDL: Set a custom targetDL to send to the miners
submitProbability: Set to the desired percentage you want to submit with, eg 0.95 for 95% submits.
weight: defines which upstream should have the higher priority when two blocks appear within the same max scan time. Defaults to 10.
sendMiningSoftwareName: When set to true send the mining software name as well on submit nonce requests.
accountIdToTargetDL: accountId -> targetDL (object), override the upstream-wide configured targetDL for specific account ids.
showAllDeadlines: set to true to show all DLs received by the proxy.
color: Use the defined hex string as color for this upstream's name. eg
newBlockLineColor: Use the defined hex string as color for this upstream's new block lines. eg
newBlockColor: Use the defined hex string as color for this upstream's new block height. eg
newBlockBaseTargetColor: Use the defined hex string as color for this upstream's new block baseTarget. eg
newBlockNetDiffColor: Use the defined hex string as color for this upstream's new block netDiff. eg
newBlockTargetDeadlineColor: Use the defined hex string as color for this upstream's new block targetDeadline. eg
minerColor: Use the defined hex string as color for this upstream's miner names in logs. eg
accountColor: Use the defined hex string as color for this upstream's accountIds in logs. eg
accountColors: Use the defined hex string as color per accountId for this upstream in logs. eg
deadlineColor: Use the defined hex string as color for this upstream's deadlines in logs. eg
estimatedCapacityRounds: Use a custom amount of rounds for estimated capacity calculations.
disabled: Set to true to disable the upstream.
coin: Required for
useProfitabilityand correct block explorer links. Possible values are:
excludedAccountIds: An array of accountIds to exclude when submitting to the upstream.
distributionRatio: Your preferred distribution ratio (DR) on Foxy-Pools. Eg.
minerPassthrough: Set to true to pass the miners minerName and capacity through to the upstream.
listenAddr: a string representation of the address and port the proxy should listen on (required)
useMultiplePorts: set this to
truewhen using blago as blago doesn't support regular urls but only an address and a port
webAuth: Remove this config option to allow any user without authenticating to access the stats
username: The username to use for logging in
password: The password to use for logging in, will be removed by the proxy and replaced with a
passHashvalue to never store your password in plain text.
logLevel: Can be one of the following values:
debug. Defaults to
logToFile: Boolean, if set to
proxy.login the default log location (
<HOMEDIR>/.config/foxy-proxy/logs). Files are rotated once they reach 10MB and each day.
logDir: Override the default log directory with a custom one
logMaxFiles: Set the number of log files to keep, eg. 5 to keep only the last 5 log files
host: The hostname of the smtp mail server, eg.
port: The port to use when sending mails, eg
secure: Boolean value whether to use TLS/SSL or not
user: The username/mail address to authenticate with
pass: The password to authenticate with
mailTo: The recipient mail address
mailFrom: Optional config key to override the user as sender
disableAnonymousStatistics: Set to true to disable anonymous usage statistics.
automaticUpdates: Set to true to enable automatic updates once a new version is detected. Works for npm and git installs.
isInstalledGlobally: Set to true if you installed the proxy globally via npm.
transports: An array of transports to use. Available options are:
listenAddr: '127.0.0.1:12345' useMultiplePorts: false proxies: - name: 'Multi-Foxy' maxScanTime: 30 upstreams: - name: 'FoxyPool BHD' type: 'foxypool' coin: 'BHD' payoutAddress: 'your BHD payout address' accountName: 'your desired name' weight: 12 - name: 'FoxyPool BURST' type: 'foxypool' coin: 'BURST' payoutAddress: 'your BURST payout address' accountName: 'your desired name' weight: 8