Crypto Miners in Tray – Slim Universal Cryptocurrency Mining Front-End

The Story

After using GuiMiner for a couple of months, I got tired of a few of its shortcomings, so I designed and wrote a program, which meets my needs exactly and can do the following:

  • Allow for unattended 100% utilisation of mining resources
  • Allow mining selection between Bitcoin and various altcoins, depending on current profitability
  • Specify priority level for the individual miners
  • Specify processor affinity (even on Vista, where GuiMiner fails to do so)
  • Specify the backup pools
  • Can stop the miners nicely, by issuing Crl-C event, so that the miners have a chance to clean up. (GuiMiner simply terminated the miners, which resulted in NVidia display driver crash.)
  • Can watch the system for a set of conditions and modify miner state accordingly
  • Minimalistic GUI design
  • Be fully-configurable through a single XML file
  • Can run any miner, independent of its parameter signature, including rpcminer-4way.exe
  • Can run a set of programs prior to launching the miners – ideal for applying overclocking, using ClockTweak, or starting mining-proxy when when using getwork miner against Stratum pools.
  • Can keep the miners alive by checking their output and run state and re-starting them if they become unresponsive
  • Can auto-launch all the miners and hide itself in a tray with minimum fuss
  • Can be completely managed from the tray


I do not distribute any miners with this front-end. Indeed, it can support not only Bitcoin/Cryptocurrency miners, but other long running command-line applications, such as Folding@Home client. This applicatin has been tested with CGMiner, BFGMiner, Poclbm, Pooler’s CPUMiner, CudaMiner, RPC Miner, and Phoenix 2 Miner.

CGMiner must be started with --text-only or -T parameter to disable ncurses.

For CudaMiner and CpuMiner, remember to specify readSpeedFrom=”stderr” attribute in the config file.

NB! If you get a crash “Could not load file or assembly ‘System.Web.Extensions, Version=’ when launching Crypto Miners in Tray, it means that you do not have Microsoft .NET Framework 4 installed. Download and install it from Microsoft site.


Future versions:
– Add a custom column to the miner list. The text displayed in the column will be parsed from last miner output, using user-provided RegEx.
– Add tabbed view with one tab and one log file per miner.
– Add ready-to-use configuration examples.

Version 7.30: [Binary] [Source]
– Implement backup argument set rotation for KeepAlive function. This is handy for those miners that do not support specification of backup pools, such as cpuminer, poclbm and cudaminer.
– Fix an issue, where log file would be rotated twice when configuration file is reloaded.
– Fix a bug, where a miner in a profitability group would not get stopped if profitability changes while the miner is in a suspended by watcher state.

See the changelog for older versions and changes.

This program is represented at Bitcointalk software forum.


1DodoExzsNPvVRXFrgkKw6E259VjfUW8KhIf you find this program useful and use it on the daily basis, please support a good cause and donate to my Durrell Wildlife Conservation Trust bitcoin fund-raising drive



An example configuration file is included with the binary. Edit it to reflect your setup, prerequisites and miners and rename it to BtMinersInTray.xml


Crypto Miners In Tray

Crypto Miners In Tray - Balloon Status Tooltip Crypto Miners In Tray - Context Menu

The GUI is largely self-explanatory. Running miners are shown in green, stopped miners – in orange and mis-configured miners (wrong workingDir and/or application info) – in red. One or more miners can be started or stopped by marking the checkbox by their names. The program starts directly into system tray. Double-click the icon to show the GUI window. The probram can be minimised back to tray with (_) or closed with (X). Reloading config will stop all the running miners, read the new configuration and start the miners with any updates.

Almost all operations can be performed without opening the GUI window, through the use of the context menu and the status balloon tooltip.

Changelog and archived versions

Version 7.21: [Binary] [Source]
– Fixed a bug, introduced in 7.20, where “Start with Windows” would write incorrect application executable name to registry.
– Fixed logging to file so that the text is auto-flushed, allowing to view the log file while it is being written to.
– Refactored registry accessing methods to facilitate testing.
– Keep using old/stale data from CoinChoose if the site’s API temporarily stops supplying data for a coin.
– Improved error handling in log to file code.

Version 7.20: (retracted)
– Added Execute action to watchers. External command can be launched once watcher condition either becomes positive, negative or in both cases.
– Added possibility to continuously append the output log to file. Log files are rotated with a timestamp on log window clearing. Logging to file is disable by default.

Version 7.10: [Binary] [Source]
– Made it possible to define global variables in the configuration file. These variables can then be referenced in any node or attribute, making it easier to update multiple places at once.
– Fixed a bug, where the initial state of “Run with Windows” was always checked contrary to the actual state of affairs.

Version 7.00: [Binary] [Source]
– Implemented “miner profitability grouping”, where the program would choose one of the miners in a group, targeting the same card/hardware for the most profitable coin, using the information from At most one miner in a group can run at any given time. A group is treated as one miner: Hitting “Start” on any miner in a group would start the most profitable miner. Hitting “Stop” on any miner in a group would stop the running miner in that group.
– GUI changes, moving all buttons to the toolbar.
– GUI change, allowing resize of the program window and of the relative proportion between miner list and output text box.
– GUI window size and splitter position between miner list and the log window are saved in the registry and restored upon next program launch.
– Fixed a bug, where custom-selected config file would not be loaded when the program is launched with Windows.
– The program’s name has been changed to “Crypto Miners in Tray” to denote that miners targeting different cryptocoins can be managed from the application. The executable’s name remains the same for backward compatibility.

Version 6.01: [Binary] [Source]
– Fixed a bug where keepAlive with threshold would stop working if a miner’s hashing speed would drop to 0 right after a successful keepAlive check.

Version 6.00: [Binary] [Source]
– Complete rewrite of the Process launching code, encapsulating the .Net Process class, so as to be able to peek on the stdout/stderr output pipe from the miners, solving the problem with some miners (pooler’s cpuminer) not showing any output until they exit. (Thanks to WebMaka for a lead.)
– All speeds in the balloon tooltip are now shown in the “dot” decimal notation, culture independent
– Added Speed column to the GUI list of miners.
– Added milliseconds to the log timestamp.
– Made config file path in the status bar into a clickable link, which would open Explorer at that path.
– Added restartEvery attribute to the miner node, allowing miners to be force restarted at certain hour intervals.
– Added readSpeedFrom attribute, allowing the user where the hashing speed is parsed from: stdout or stderr.
– Possibility to specify how the miner reports its speed in the list and the tooltip – K, M or G – through the new displaySpeedIn attribute. The total in the tooltip and GUI is always in M.
– Fixed a bug in hashrate-based keepAlive threshold calculation, which resulted in frequent false positives.
– Fixed a problem with disabled auto-scroll. Windows interop EM_GETSCROLLPOS returns scaled down 16-bit values even though it has a 32-bit Point structure at its disposal, resulting in erronous behaviour when the size of the RichTextBox content height exceeds 65535 pixels. A work-around has been applied, which alliviated the problem, though the text would not stay completely still.
– Fixed an off-by-one error in average speed calculation.
– The donation hint now points to Durrell Wildlife Conservation Trust fund-raising: 1DodoExzsNPvVRXFrgkKw6E259VjfUW8Kh

Version 5.10: [Binary] [Source]
– Added “Run with Windows” checkbox to the GUI and tray context menu.
– Improved positional handling of the output text box when autoScroll feature is disabled.
– KeepAlive Hits column now shows counters for each category.
– Reset KeepAlive Hits counters when a miner is manually restarted.
– Added threshold attribute to the checkHashRate keepAlive option. An average hashing speed during the keepAlive check interval, which is below this threshold will trigger miner restart.
– Added a small and unobtrusive donation hint to the main GUI screen. 😉

Version 5.00: [Binary] [Source]
– Long-running prerequisites are now stopped when the program exits or the config file is reloaded.
– Prerequisites can now have keepAlive setting, watching for Process and Output conditions.
– Replaced custom-drawn checkbox-containing ListBox with ListView control. It is now multi-selectable, and without checkboxes.
– ListView box now contains detailed information about each miner’s configuration, including current priority and keepAlive hit count. Ideally it should stay on 0. If the value is growing, it means that you either have a misconfigured keepAlive condition, so that the function kicks in more than it should, or that you have overclocked your GPU too much and it keeps crashing the driver.
– KeepAlive now reports reasons for restarting the miner (in the log window).
– The application now targets .Net Framework ver. 4.0 and is built with explicit platform target set to x86.

Version 4.10: [Binary] [Source]
– Fixed a bug, where setting keepAlive to 0 would cause a crash
– keepAlive is back to being a child node of a miner, and can now be configured with interval and restart conditions: Process, Output, and HashRate.
– Fixed a rare occasion, when both the user and a watcher starting a miner at exactly the same time would result in two instances of the miner to be launched.
– Fixed handling of start/stop/restart watcher events to make it more resilient.
– Added killDelay miner attribute, so it is possible to tweak the time between Ctrl-C event is sent to the miner and the miner is deemed unresponsive to it and is forcefully killed.
waitForExit attribute of a prerequisite execute statement is renamed to delay and can now specify a delay in seconds, in addition to special values of ‘no’ and ‘forever’.

Version 4.00: [Binary] [Source]
– Added locks around critical sections in miner start and stop routines. Addition of asynchronous watchers introduced a possibility of race conditions.
– Changed the colour of miner entries in the list and context menu: Green – running, Orange – suspended by watcher, Red – stopped. Misconfigured/invalid miners are no longer shown in the lists.
– Changed the way watchers are defined: condition and action parameters are now specified in the body of the watcher element. See example config file.
– Watcher check interval can now be configured on a per-miner level.
– Added two new watcher actions: RestartWithArguments and ChangeAffinity.
– Priority action is renamed into ChangePriority.
– Added three new watcher conditions: BatteryPower, TimeInterval and DaysOfWeek.
– Renamed Enabled miner setting to autoStart to better reflect what that setting actually does.
– Made averageWindow setting miner-specific.
– Application watcher can now specify multiple processes to watch.
– Tray icon is now visible while GUI is maximized (unless Stealth Mode TrayIcon is specified).
– Seconds are now displayed in the log timestamp.
Breaking change to the config format: id, autoStart, keepAlive, averageWindow, and watcherCheckInterval are now attributes of the <watch> node, instead of being child nodes. This is done so as to make the config file less cluttered
Breaking change to the config format: waitForExit is now an attributes of the <execute> node, instead of being a child node.

Version 3.00: [Binary] [Source]
– Introduced watchers that can observe such conditions as human activity or a running application and start/stop/change priority of the miners accordingly.
– Stealth config option which can either disable on-hover balloon tooltip or hide the tray icon altogether, in which case showing GUI is done by running the program again.
– Keep-alive setting is moved to individual miners (because of pooler’s cpumine’s faulty output mechanism). The default is now ‘off’.
– Total hashing speed info moved to status bar.
– Added possibility to specify any config file through the command line argument.
– Added possibility to open any config file through the GUI.
– Information about currently loaded config file is in the status bar.
– AutoScroll can be togged from GUI.
– Stealth mode and average window info is in the status bar.
– Fixed a bug, where user-stopped miner would sometimes be treated as dead and restarted.
– Fixed a bug, where the program would crash if no averageWindow was specified in the config (missing default).
– Improved stdout parsing heuristics to read correct speed info from CGMiner output and to avoid false positives.
– Brought most of the business logic under test, reordered some code, latest additions programmed using TDD.
– Various bug fixes as the result of unit testing.

Version 2.20: [Binary] [Source]
– Individual and total hashing speed is now shown in on-hover balloon tooltip in tray icon.
– Tray icon now has a context menu with the commands to open the GUI, stop all miners, reload config, start/stop individual miners, and exit.
– Average window for hashing speed calculation is now configurable.
– Checkboxes of the misconfigured miners are now disabled.

Version 2.10: [Binary] [Source]
– Fixed a rare bug, where an exception would be thrown if checkbox list redraw occurred at the same time as config file reload.
– Simplified routine that stops the miners, eliminating the need for briefly-flashing command line windows when starting miners.
– Added colour tagging of the output window: Green – program output; Blue – miner stdout, Red – miner stderr.
– Made output textbox read-only.
– Average hashing speed across all miners is now displayed in the GUI.

Version 2.01: [Binary] [Source]
– Fixed hiding of the icon in task switcher, when the application is minimised to tray.

Version 2.00: [Binary] [Source]
– Initial stable release

The first version was published at BitcoinTalk newbie forum, but was still very much a work in progress.

32 thoughts on “Crypto Miners in Tray – Slim Universal Cryptocurrency Mining Front-End

  1. Hi,

    I saw your app on Bitcointalk forum, but since I’m still a newbie I can’t answer you on the forum.

    The upcoming feature looks very interesting.
    If the app could have a software exclude list it would be great, like “if abc.exe is running stop all miners (or a specific miner)”.
    (the ideal example is the Boinc client)

    I have a little request about the “balloon tooltip”, an option is the config file to disable it 🙂

    Thank you,

  2. Hi!

    I will include the tooltip disable option in the next release. May I ask you why you would want to disable it? As it is now, it only appears for 2 seconds when you hover over the icon and does not interfere with double-click or right-click. Your reason for wishing to disable it may influence how it is implemented.

    As for the app-watch list, I need to think how to design it to be useful. It is most probably best to have it on a per-miner bases as some people run multiple miners against different hardware, some of which might not be affected by the excluded programs.

  3. I’m using Bitcoin Miners in Tray at work for mining Litecoins (pooler cpuminer), I recently decided to put it on more computer than my own. Ok it’s not completely stealthy but the balloon tooltip is very annoying, even if you’re quickly sweeping the taskbar for another software, the balloon tooltip comes up.

  4. He-he. At uni, I did for a short time something similar with Seti@home in the good old pre-Boinc days (modifying YASC on Unix). I’ll see if I can make BMT a bit more stealthy. 🙂

  5. I saw your update on the forum, I haven’t yet tested. It’s awesome !!

  6. Hi,
    the gui is very useful, but “keep alive” feature doesn’t work in case of GPU driver crash. Is it any way to detect 0 hashrate (in guiminer) and then restart it?

  7. Hi.
    Thanks for the fedback.
    You mention guiminer. Bitcoin Miners in tray is not meant to run guiminer, but to replace it, running the miners (e.g. poclbm) directly.
    KeepAlive currently checks for two conditions: if the process is running and, if yes, if it outputs anything of its stdout and stdin.
    I can try to modify KeepAlive feature so that it is configurable and can check for a user-defined set of conditions, including 0-hashing speed.

  8. Hi,

    I’m interested in use your program, but I get an “BtMinersInTray.exe is not a valid win32 application”.
    I have tested 2 latest version with same result.
    I’m running in WinXP 32bit.
    There is any special requeriment to run it?
    Thank you for your attention.

  9. I build the program on a 64-bit Win7. However, I used a 32-bit configuration and tested it on a 32-bit Vista. The program targets .Net framework 4.5. Check Windows Update and ensure that you have the latest .Net framework runtime installed. I don’t know what is the highest supported framework version on XP as I haven’t had an XP machine for some time.
    Alternatively, you can wait for the next release, where I will lower the target framework version number to 4.0 as I use no features of the latest framework.

  10. hi.

    this hide the “bitcoinminerintray program itself” in the tray, which is really nice, but the “GUIminer.exe program itself” is not hidden, it is visible in the tray.

    How i can put the GUIminer programm hidden ???

    plz help 🙂 btw: your program is nice, but the config is hard.

    one error:
    if i dont delete ”

    >-pa scrypt -o -p 3334



    i can NOT LOAD the config.xml

    any ideas? im using win7 64bit. thx a lot.

    ^^ sorry i mean this code has to be deleted, if i want load the config, without errors:




  11. 1) Guiminer is a front-end in itself – you don’t run a front-end from a front-end. What you run from Bitcoin Miners in Tray, are the commandline-based miners themselves: poclbm.exe, cgminer.exe, cpuminer.exe, etc. The only reason you would want to get Guiminer is for the bundled latest build of poclbm.exe (in case you have 7900 series AMD card).
    2) The included example file is just that – an example, that’s why it is called .example.txt 😉 It is there to document all configuration settings and their values. You write your own configuration, using the bits from the doc-file that you need. The minimum configuration requires only miners->miner section, give it an id and specify workingDir, application and arguments nodes.
    3) Prerequisites is just a section with programs, which are run before the miners themselves are launched. You can, for example, run mining-proxy from there if you use a miner which only supports Getwork protocol (e.g. poclbm) against a pool, which only supports Stratum (e.g. OzCoin)

  12. Any chance to make this program autostart with Windows? I know I can just put the link into Startup folder by myself, but its much of a hassle, create lnk, copy..

  13. I just create a shortcut in the Startup menu myself 😉
    Having said that, adding a Start with Windows option would be an interesting exercise…

  14. It would be very helpful to be able to set the checkHashrate manually. I’m doing port80 mining at work and it often gets stuck, but the rate does not go to zero.
    For example, “24-4-2013 11:05:35 [GPU Miner]: [0.402 MH/s (~0 MH/s)] [Rej: 0/0 (0.00%)]”. It would be great to be able to set a process to restart if the hash rate is below 0.6 or so.

  15. I guess I could add a threshold attribute on that option. Currently the threshold is hardcoded to be below 0.0000000000001 😀

  16. All-in-all this is a great program though 🙂 Thank you for all the development, it’s definitely a major improvement over guiminer and others.

  17. hi, thx a lot for your big answer.

    after 3 hours i dont get it. if i use cgminer, alway the cgminer WINDOW is shown.
    btw: i can only open cgminer via the path to the “start_mining.bat” . i know this is double. but if i pointing to the cgminer.exe —> [kevin: averageWindow size: 0 samples
    27.04.2013 14:49:49 [kevin]: Redirection is not supported.

    if i use guiminer, it worked …but the guiminer WINDOW is alway visible. i understood your explaination about the gui in the gui.

    how to get the cgminer window invisible?! the BCMinTray is invisible perfectly 🙂
    “Run with window” (hack) dosent any effect by me.

    thx a lot.

  18. I mentioned in the Compatibility section that you should start cgminer with the following options:

    --text-only --log 1

    No need to go via a batch file. Starting a bat-file, you launch a command interpreter, (which my program will not show), which in turn launches cgminer (which will remain visible).
    “Run with Windows” will launch Bitcoin Miners in Tray on Windows start-up.

  19. #1#
    is there a way to start with windows, invisible. so noone can see the cgminer? in tray hidden, too?!
    my goal is to run (autostart) BtMinerInTray+cgminer absolutly hidden on win7, ATI card. and use the human activity control, too.

    srry but i dont get it 🙂

    #2# –text-only –log 1 <— some example. plz, i have not a clue 🙁

    #3# do u know an other miner (CGminer has too many problems), that worked better in unvisible modus compared with your BtMinerTray ??

    thx for your replys, anyway. must be a very good programm, but maybe for noobs like me, should have more tutorials. (video TUT on youtube maybe?)

  20. #1: Add <stealthMode value=”TrayIcon” /> in the top-level configuration section. (See .example.txt file) Launch the program once, and tick “Run with Windows” checkbox in the GUI. On next boot, the program will be launched at Windows start-up, but will not show up in the system tray.
    #2: Those are cgminer arguments. add them along with the other arguments that you pass to cgminer
    #3: Depends on what you mine. For LTC cgminer is the best (unless you are CPU-mining); for BTC, I prefer using poclbm (either stand-alone build for the older cards, or the one bundled with GuiMiner for 79xx series). See links in the Compatibility paragraph of my post.

  21. Thanks so much for adding the checkHashRate option. Another useful feature would be the ordering and prioritizing of miners and adding an option to automatically move on to another once one of them stop working. An example of this would be if the pool server is down. I have account on three mining pools and they sometimes shut down port80 mining, I have to check on them manually.

  22. Zoltan, what you are looking for, already exists in most major miners (e.g. poclbm and cgminer), and is called backup pools. They are better position to know when a pool is down, than my GUI will ever be, so it is better to use the miners’ capabilities for such fail-overs. Check you miner’s help/readme to see how you specify multiple pools and fail-over conditions on a command line.
    As for ordering, the miners appear in the GUI in the same order they are listed in the config file.

  23. Hi,
    I just installed the program and found a few issues but I can live with them.

    I would like to have 2 new features.
    * Accepted shares, the same way that you parse the speed, it would be nice if you could parse the accepted shares. Or add a way to put the text to look for in the config scrip if it is too difficult due the different miners.

    * A way to put variables in the config file. When you are repeating the same values over and over in the different miners is a pain if you have to change any value later on. It could be nice if you could defile variables like:

    and later on start the miner with something similar to:
    –url=${url3} –userpass=${user}:x


  24. Request 1: As you say, the way miners report (or not) accepted shares varies too greatly to write a consistent algorithm. What I can do is to add a custom-reported column to the miner list and allow the user to provide RegEx expression to use for value extraction. Still, what to do with that value: treat it as a string and display the last one, parse it to double and accumulate or parse and calculate average… I’ll try to implement the first option in a future release.

    Request 2: This is a good idea, I’ll add it to the next version (implemented in 7.10).

  25. Great to see the variable feature implemented!!! THANK YOU.

    I’m still trying to fine tuning my setup and another possible addition could be adding a “execute” action to the watchers.
    My idea is to send commands with an external application to cgminer.exe using the JSON API (e.g. change the intensity without needing to restart it) .

    Do you think that having a output tab (maybe a logingWindow=”name” attr) for each miner is a good idea, it gets confusing to check the output when all the miner are sending the output to the same window.

    Thanks again for your great work

  26. The execute action is a good idea and would be fairly easy to add – I designed watchers to be extensible with new conditions and actions in mind. The applications launched from the watcher will have their output redirected, but will otherwise not be tied to Crypto Miners in Tray.

    As for multiple output tabs, I need to investigate. This would require some inner rewiring of how the output is handled. I might include it in a future release, but I am not sure if it would be worth the hassle. In my experience, running 4 mining rigs, I seldom open the GUI after the initial configuration stage. The program justifies its name and sits for weeks in the tray keeping the performance close to 100%, all by itself. If you have many pieces of hardware (GPUs) on the same rig, you can configure them one at a time to minimise the clutter.

  27. Thanks once again for those new features ….

    Trying to configure a miner i ran into another requirement… 😉

    Could it be possible to put others miner ID in the condition of “RunningApplication” instead of just a process name?

    I want that one particular miner stops if a different miner starts due any reason


  28. I am on the verge of abandoning any further development of the program due to time constraints and little interest in the application judging by the amount of donations (exactly 0) and the number of comments on the forums.
    Are you sure you cannot achieved what you want, using the existing functionality? Maybe what your are after is the “Profitability group”? If not, what is the use case for your scenario?

  29. Hi,
    I’m sorry to hear that 🙁

    I’m really enjoying your tool, sorry for not be able to be more grateful in a more “material” way.

    I think that the tool is not suitable for any one (you need some background for be able to deal with the xml) but it is a GREAT improvement over “GUI Miner”

    If you decide to continue, two ways that I can think to improve the visibility are:

    * Update the main post on every time you do an update.
    * Do an extra version of the configuration example, ready to use, that some one new only needs to replace the values in some of the variables for start using it. (I’ll try help with that)

    After taking a look at the “Profitability group” is kind of what I have in mind, but what the triggers the miner change is not the profitability, but the ending of the previous miner.

    Two use cases that I have in mind are:

    * Implement a pool change when there are connection/pool problems (with minerd.exe, that doesn’t implement its own pool change)
    The idea is having a group that when a miner exists (minerd –retries=3 –retry-pause=60 …) it starts the next in the group, and keeps looping over then. Something like a “Batch Group”

    * I usually have the miners set up that automatically puts themselves in a non intrusive way during working hours. I would like to have an extra miner configuration to put them in “full steam” when I know that I’m not going to use the computer for some time. The idea is to put the “full steam” miner ID in a “RunningApplication” watcher of the “normal miner” to stop it automatically when I start the “full steam” miner. If I just put the miner name in the “RunningApplication” it never starts because it detects it self 🙁


  30. I removed your last two comments with malformed XML, as I understand what you are aiming at. To post XML, you can use “& lt ;” and “& gt ;” symbols (remove spaces), like this: <xml>

    Now, to answer your points:

    – When I update with a new version, I always posted a reply on that thread, bumping it up. The screenshot changed automatically, once I updated it in the blog.

    – I actually made something like that in the next to last post on the forum to demonstrate profitability groups. Might include a few ready-to-use samples with the next release, if I find time to update the program.

    About your use cases:

    – This might actually be a candidate for keepAlive node expansion. If keepAlive detects that a miner needs to be restarted, it can rotate through a set or arguments, defined within keepAlive node. Hmm…

    – What you describe here is a RestartWithArguments on HumanActivity/TimeInterval/DaysOfWeek watchers, unless your full steam miner is different from a down-throttled one.

Comments are closed.