# RainbowMiner [![current release](https://img.shields.io/github/release/RainbowMiner/RainbowMiner.svg)](https://github.com/RainbowMiner/RainbowMiner/releases) [![current release date](https://img.shields.io/github/release-date/RainbowMiner/RainbowMiner.svg)](https://github.com/RainbowMiner/RainbowMiner/releases) [![open issues](https://img.shields.io/github/issues-raw/RainbowMiner/RainbowMiner.svg)](https://github.com/RainbowMiner/RainbowMiner/issues) [![downloads](https://img.shields.io/github/downloads/rainbowminer/RainbowMiner/total.svg)](https://github.com/RainbowMiner/RainbowMiner/releases) ###### **RELEASES: [https://github.com/RainbowMiner/RainbowMiner/releases](https://github.com/RainbowMiner/RainbowMiner/releases)** ###### **Actual master.zip: [Developer Version master.zip](https://github.com/RainbowMiner/RainbowMiner/archive/master.zip)** ###### **[Central monitoring for all of your rigs:](https://rbminer.net)** [![miners](https://img.shields.io/endpoint?url=https%3A%2F%2Frbminer.net%2Fapi%2Fshio.php%3Fid%3Dminers)](https://rbminer.net/monitoring) [![profit](https://img.shields.io/endpoint?url=https%3A%2F%2Frbminer.net%2Fapi%2Fshio.php%3Fid%3Dprofit)](https://rbminer.net/monitoring) ###### **[Discord:](https://discord.gg/znzQpJWWQH)** [![online](https://img.shields.io/discord/513274071010508800)](https://discord.gg/znzQpJWWQH) ## INTRODUCTION GPU/CPU Mining script with intelligent auto-switching between different mining pools, algorithms and miner programs using all possible combinations of devices (NVIDIA, AMD, INTEL and CPU), optionally including the cost of electricity in profit calculations and stopping mining once it is no longer profitable. Features: easy setup wizard with ad-hoc working default (no editing of files needed), GUI-webinterface, selection of devices to be used, very low CPU usage. ![alt text](https://raw.githubusercontent.com/RainbowMiner/miner-binaries/master/rainbowminerhome.png "RainbowMiner Web GUI") ## FEATURE SUMMARY - **Multi-Platform (AMD, INTEL, NVIDIA, CPU) on Windows and Linux** - **Optional watchdog start scripts, that restart RainbowMiner automatically after a crash (StartWD.bat / startwd.sh)** - **Profit auto-switch between mining programs and [algorithm](https://rbminer.net/algorithms/) for GPUs & CPUs (optimized one for each vendor vs. one for each possible device combination)** - **Profit auto-switch between pools (2Miners, Abelpool, AccPool, Acepool, BaikalMine, Binance, C3pool, CpuPool, Crazypool, DeepMinerZ, EpicMine, Ethwmine, F2pool, FlockPool, Gtpool, Hashcryptos, Hashpool, HashVault, Hellominer, [HeroMiners](https://herominers.com), [K1Pool](https://k1pool.com/invite/016079e6c5), [Kryptex](https://pool.kryptex.com/?ref=15aa84c0), LeafPool, LuckPool, LuckyPool, Luxor, MinerRocks, Mining4people, MiningDutch, [MiningRigRentals](https://www.miningrigrentals.com?ref=2598069), Mintpond, Molepool, MoneroOcean, Nanopool, Neuropool, [Nicehash](https://www.nicehash.com/?refby=c402ea4d-9203-414c-b96e-526e34ad20e1), Pearlhash, Poolin, RaptoreumZone, Ravenminer, RPlant, SoloPool, Sunpool, SupportXmr, SuprNova, [unMineable](https://unmineable.com/?ref=U-TEMDPF), UUpool, ViaBTC, Vipor, WoolyPooly, XdagOrg, YadaMiners and Zpool)** - **Integrate own and custom pools as user pools, maintained on the User Pools page of the web interface (see [Doc/USERPOOLS.md](Doc/USERPOOLS.md))** - **Integrate your own miner programs as custom miners, compatible with HiveOS flight sheets (see [Doc/CUSTOMMINERS.md](Doc/CUSTOMMINERS.md))** - **Let your home automation switch GPUs on and off with one HTTP call, e.g. by room temperature (see [Doc/DEVICECONTROL.md](Doc/DEVICECONTROL.md))** - **Profit calculation, including real cost of electricity per miner** - **Uses the top actual available miner programs (Bminer, Ccminer, Claymore, CryptoDredge, Dstm, EnemyZ, Ewbf, Gminer, NBminer, Sgminer, SrbMiner, T-Rex, Xmrig and many more)** - **Easy setup wizard with ad-hoc working default - click Start.bat and off you go (RainbowMiner will ask for your credentials, no hassle with editing configuration files)** - **Client\Server networking for multiple rigs - minimizes internet traffic and avoids pool bans** - **Scheduler for different power prices and/or pause during specific timespans** - **Built-in automatic update** - **Mine with any device, arbitrarily - Mining devices freely selectable** - **Finetune miner- and pool-configuration during runtime** - **Bind/exclude devices to and from specific algorithms and miners** - **Define algorithms and/or to mine, per pool** - **Unlimited custom overclocking profiles per miner/algorithm** - **Easy overclocking of GPUs (memory, core, power limit, and voltage)** - **Switch MSI Afterburner profiles per miner/algorithm** - **Includes [OhGodAnETHlargementPill](https://bitcointalk.org/index.php?topic=3370685.0)** - **Very low CPU usage to increase CPU mining profit** - **Pause mining without exiting the RainbowMiner** - **Full automatic update** - **Easy replication and setup configuration** - **Very small minimum developer fee of 0.7% (10 minutes per day) to support my work** - **Live monitoring web-interface at [localhost:4000](http://localhost:4000)** - **Central monitoring of all your rigs at [https://rbminer.net](https://rbminer.net)** - **Offline notifications via email and/or https://pushover.net** ## DOCUMENTATION The following documents are the source of truth and are kept up to date with every release: | Document | Content | | --------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | [Doc/UPDATE.md](Doc/UPDATE.md) | how to update RainbowMiner, and what to do if the automatic update fails | | [Doc/CONFIG.md](Doc/CONFIG.md) | the complete parameter reference of `Config\config.txt` | | [Doc/POOLS.md](Doc/POOLS.md) | every pool that RainbowMiner ships, and what it needs from you | | [Doc/POOLSCONFIG.md](Doc/POOLSCONFIG.md) | the per-pool settings in `Config\pools.config.txt` | | [Doc/USERPOOLS.md](Doc/USERPOOLS.md) | add your own or other pools, that RainbowMiner does not ship | | [Doc/CUSTOMMINERS.md](Doc/CUSTOMMINERS.md) | add your own miner programs, incl. the import of HiveOS flight sheets | | [Doc/DEVICECONTROL.md](Doc/DEVICECONTROL.md) | switch GPUs on and off from home automation, without changing the config | | [Doc/OVERCLOCKING.md](Doc/OVERCLOCKING.md) | the two overclocking options and the custom overclocking profiles | | [Doc/MININGRIGRENTALS.md](Doc/MININGRIGRENTALS.md) | rent your rig out at MiningRigRentals.com | | [Doc/NETWORKING.md](Doc/NETWORKING.md) | hints for the client/server setup of multiple rigs | | [Doc/REPORTAPI.md](Doc/REPORTAPI.md) | the status report a rig sends to the central monitoring, for your own monitoring | | [Doc/LINUX-PREREQUISITES.md](Doc/LINUX-PREREQUISITES.md) | GPU driver, OpenCL and huge pages on a Linux rig | | [Doc/LINUX-SETUP-SHORTGUIDE.md](Doc/LINUX-SETUP-SHORTGUIDE.md) | short guide to running RainbowMiner on Linux with Nvidia GPUs | | [Doc/DOCKER.md](Doc/DOCKER.md) | run RainbowMiner in a Docker container: Dockerfiles for AMD, NVIDIA, both, Intel or CPU only, clean stop | The rest of this README covers the pre-requisites, the installation, the day-to-day operation and the remaining configuration files. ## REQUIRED PRE-REQUISITES **Important note: RainbowMiner recommends PowerShell 7.6.5 (LTS, supported until November 2028). PowerShell 7.2 still works, but is out of support since November 2024 and receives no more security fixes. The memory leak of the early 7.3/7.4 releases has been fixed long ago. On Linux, PowerShell 7.4 and newer needs glibc 2.27 or newer (Ubuntu 18.04+, Debian 10+), on 32-bit ARM glibc 2.35 or newer (Ubuntu 22.04+, Debian 12+). Older systems should stay on PowerShell 7.2.24.** ### Windows 7/8.1/10/11 pre-requisites 1. Install PowerShell 7: [Download Installer for version 7.6.5](https://github.com/PowerShell/PowerShell/releases/download/v7.6.5/PowerShell-7.6.5-win-x64.msi) 2. Install Microsoft .NET Framework 4.7.2 or later: [Web Installer](https://www.microsoft.com/net/download/dotnet-framework-runtime) 3. Install the GPU driver of your vendor. **The latest driver is not always the best one for mining**, and which one is right depends on your cards - a driver that runs your rig stable is worth more than a new one. Pick it on the vendor's page: - **Nvidia**: https://www.nvidia.com/download/index.aspx - **AMD**: https://www.amd.com/en/support These versions have been proven on older rigs and are a good starting point, if you are unsure or still run an older Windows: - [Nvidia Driver Version v512.15 - Windows 10/11](https://international.download.nvidia.com/Windows/512.15/512.15-desktop-win10-win11-64bit-international-dch-whql.exe) - [Nvidia Driver Version v471.41 - Windows 7,8,8.1](https://international.download.nvidia.com/Windows/471.41/471.41-desktop-win7-64bit-international-whql.exe) (the last series that supports Windows 7/8.1) - [AMD Adrenalin 2022 Edition 22.3.2](https://drivers.amd.com/drivers/amd-software-adrenalin-edition-22.3.2-win10-win11-march24.exe) 4. If your rig contains AMD graphic cards, RainbowMiner's overclocking features rely on MSI Afterburner, you should install and run it: [Download](http://download.msi.com/uti_exe//vga/MSIAfterburnerSetup.zip) 5. For accurate power and clock values of your CPU, the [PawnIO driver](https://github.com/namazso/PawnIO.Setup/releases/latest/download/PawnIO_setup.exe) (https://pawnio.eu/) is needed. `Install.bat` installs it automatically - on an existing installation, run `Install.bat` once more, or download and start the installer by hand. Without it, RainbowMiner only sees the CPU load and estimates the power draw from the CPU's TDP. PawnIO replaces the old WinRing0 driver, which Windows now flags as malicious Finally: check, if Powershell 7 is in your PATH, because RainbowMiner will not run correctly, if the path to powershell is missing. Sometimes `C:\Program Files\PowerShell\7` has to be added manually to the PATH environment variable after installing PowerShell 7. Here is a nice tutorial, on how to add to PATH environment variable https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/amp/ ### Windows 11: switch the default terminal application **Important for Windows 11: if you start RainbowMiner with `Start.bat`, `StartHidden.bat` or `StartInWin.bat`, run `FixConsole.bat` once, before you start RainbowMiner for the first time.** Windows 11 hosts every console window in Windows Terminal by default and Windows Terminal has known problems with classic console applications. RainbowMiner is hit by them directly: the RainbowMiner window may ignore all attempts to move, close, minimize or maximize it, and the `-windowstyle` of the start scripts (maximized/hidden/normal) is not applied reliably. `FixConsole.bat` switches the default terminal application of your Windows user back to the classic Windows Console Host. It asks for confirmation first, changes nothing but this one setting and needs no administrator rights. Add the parameter `/f` to switch without being asked, or run `FixConsole.bat /r` to undo the change at any time. Details and the manual way through the Windows settings can be found in the FAQ: [The RainbowMiner window cannot be moved, closed or minimized](#the-rainbowminer-window-cannot-be-moved-closed-or-minimized-windows-11) Not needed for the watchdog start scripts `StartWD.bat`, `StartWDHidden.bat` and `StartWDInWin.bat`: those detect Windows 11 and relaunch themselves under the classic console host on their own (see section [WATCHDOG START SCRIPTS](#watchdog-start-scripts-optional)). Running `FixConsole.bat` does not hurt them either. ### Linux pre-requisites RainbowMiner needs PowerShell 7 - `install.sh` installs it - plus the GPU driver and OpenCL of your vendor. How to get those onto an Ubuntu/Debian rig, how to set the huge pages the CryptoNight and RandomX family needs, and how to enable the Nvidia cool-bits for overclocking, is described in **[Doc/LINUX-PREREQUISITES.md](Doc/LINUX-PREREQUISITES.md)**. A complete walkthrough of a full rig setup, from the operating system to the autostart, is kept in [Doc/LINUX-SETUP-SHORTGUIDE.md](Doc/LINUX-SETUP-SHORTGUIDE.md). ## INSTALLATION #### 1. Download RainbowMiner and extract to a folder of your choice: [![current release](https://img.shields.io/github/release/RainbowMiner/RainbowMiner.svg)](https://github.com/RainbowMiner/RainbowMiner/releases) **Important:** Add the RainbowMiner directory to the exceptions of your antivirus program. Otherwise, some miners will cause false virus alerts. On Linux, you may use git for a shortcut: sudo apt-get update sudo apt-get install git git clone https://github.com/rainbowminer/RainbowMiner #### 2. Run the RainbowMiner installer On Windows: - open RainbowMiner folder with Explorer - right-click "Install.bat" and choose "Run as administrator" On Linux, cd into your RainbowMiner folder, change the attributes of install.sh, start.sh and others and run the Installer: - on a machine that allows root (sudo): ``` cd RainbowMiner chmod +x *.sh sudo ./install.sh ``` - on a machine that doesn't allow root (sudo), e.g. a managed server: ``` cd RainbowMiner chmod +x *.sh ./install.sh ``` At the end of the install, you will be asked to start RainbowMiner. **If the installer fails to install PowerShell, this is the way to install it manually:** Find the matching version of [PowerShell v7.6.5 for your system from here](https://github.com/PowerShell/PowerShell/releases/tag/v7.6.5) and download it to your machine. On Windows, just run the Installer On Linux: either use the GUI installer to install the package or do it manually, e.g. for Ubuntu: # if not already done, download the package (use the "-lts" for LTS Linux or the second line for non-LTS) wget https://github.com/PowerShell/PowerShell/releases/download/v7.6.5/powershell-lts_7.6.5-1.deb_amd64.deb #wget https://github.com/PowerShell/PowerShell/releases/download/v7.6.5/powershell_7.6.5-1.deb_amd64.deb # install powershell package (use the "-lts" for LTS Linux or the second line for non-LTS) dpkg -i powershell-lts_7.6.5-1.deb_amd64.deb #dpkg -i powershell_7.6.5-1.deb_amd64.deb # install powershell dependencies apt install -f #### 3. Start it (if not yet running) ##### On Windows: - open RainbowMiner folder with Explorer - on Windows 11: run "FixConsole.bat" once, it is needed for "Start.bat" but not for the watchdog start scripts (see [Windows 11: switch the default terminal application](#windows-11-switch-the-default-terminal-application)) - right-click "Start.bat" and choose "Run as administrator" ##### On Linux: ./start.sh Alternative: start as Linux `screen`: ./start-screen.sh - press `Ctrl+A`, then `d` to detach from screen (imagine you want to disconnect your ssh session) - use `./show-screen.sh` or enter `screen -R RainbowMiner` to reconnect to screen The better alternative: start as Linux `tmux`: ./start-tmux.sh - press `Ctrl+B`, then `d` to detach from the tmux session (imagine you want to disconnect your ssh session) - use `./show-tmux.sh` or enter `tmux attach-session -t RainbowMiner` to reconnect to screen Optional: if you want RainbowMiner to be restarted automatically after a crash, use the watchdog start scripts `StartWD.bat` (Windows) or `./startwd.sh`, `./startwd-screen.sh`, `./startwd-tmux.sh`, `./startwd-nohup.sh` (Linux) instead. See section [WATCHDOG START SCRIPTS](#watchdog-start-scripts-optional) for details. #### 4. Enter basic information - choose your rig's WorkerName [default=rainbowminer] - choose your RunMode: - **standalone** = all config locally and direct connect to pool APIs - **server** = act as server for many Clients, may also run as mining rig - **client** = optionally use server's config files, connect to server for pool API data - enter API port for webinterface at http://localhost: - optionally protect access to the webinterface with username and password - for client-mode: - enter the server's name (or IP) - enter the server's API port - optionally enter username and password, if you have protected the access to the server's webinterface #### 5. Enter your credentials: - your btc-wallet address (one for general use, and one for [Nicehash](https://www.nicehash.com/?refby=c402ea4d-9203-414c-b96e-526e34ad20e1)) - your [MiningRigRentals](https://www.miningrigrentals.com?ref=2598069) credentials, if you plan to use this pool - your region. Valid names are: US, Europe, Asia - your currencies. Valid currencies are: BTC, USD, EUR, GBP, ETC, .. - the pools you want to mine, as a comma separated list. - the algorithms you want to mine, as a comma separated list. - the devices you want to use for mining. Valid descriptors are: gpu, cpu, nvidia, amd (RainbowMiner will show you, which devices are available on your machine) or use your device names (without spaces, without leading geforce): gtx1070, gtx1080ti .. #### 6. Let the downloads and benchmarking finish - **be patient!** This might take a while - Anyway: it will already mine to your wallets ### Done!
Valid poolnames2Miners, 2MinersAE, 2MinersSolo, Abelpool, AccPool, Acepool, BaikalMine, BaikalMinePPS, BaikalMineSolo, Binance, C3pool, CpuPool, Crazypool, DeepMinerZ, DeepMinerZSolo, EpicMine, Ethwmine, F2pool, FlockPool, Gtpool, Hashcryptos, Hashpool, HashVault, Hellominer, HeroMiners, K1Pool, K1PoolSolo, Kryptex, KryptexSolo, LeafPool, LuckPool, LuckyPool, Luxor, MinerRocks, Mining4people, Mining4peopleSolo, MiningDutch, MiningRigRentals, Mintpond, Molepool, MoneroOcean, Nanopool, Neuropool, Nicehash, Pearlhash, Poolin, RaptoreumZone, Ravenminer, RavenminerSolo, RPlant, RPlantSolo, SoloPool, Sunpool, SupportXmr, SuprNova, unMineable, UUpool, ViaBTC, Vipor, ViporSolo, WhatToMine, WoolyPooly, WoolyPoolySolo, XdagOrg, XdagOrgSolo, YadaMiners, Zpool, ZpoolCoins
Valid algorithms Balloon, Bitcore, Blakecoin, Blake2s, BlakeVanilla, C11, Cortex, CryptoNightV8, Cuckaroo29, Cuckaroo29s, Ethash, X11, Decred, Equihash, Equihash144, Equihash192, Equihash-BTG, Groestl, Hex, HMQ1725, HSR, JHA, Keccak, Lbry, Lyra2RE2, Lyra2z, MyriadGroestl, NeoScrypt, Pascal, Phi, Phi2, Polytimos, Quark, Qubit, Scrypt, SHA256, Sib, Skunk, Skein, Tensority, Timetravel, Tribus, Veltor, X11, X12, X11evo, X16R, X16S, X17, X18, X21s, X22i, Yescrypt and many more: https://rbminer.net/algorithms/
## HOTKEYS You can press the following keys, while RainbowMiner is waiting for the next run. - E[**x**]it Miningscript = stop all running miner and exit RainbowMiner ([**Ctrl-C**] does the same) - [**N**]ext round = end the waiting time and start the next round immediately - [**S**]kip switching prevention = immediately start the most profitable miner, without waiting for the switching prevention - [**P**]ause = stop all running miner and wait until user presses P again - [**L**]ock switching = keep the currently running miners on their pools and stop all switching, press L again to unlock (not available during a rental or a donation run) - [**R**]estart = stop all running miner and restart RainbowMiner - [**Q**]uit and reboot = stop all running miner and reboot the computer - start [**D**]ownloader = start the downloader manually (only needed, if you manually updated a miner) - [**C**]onfiguration = goto the configuration setup (after setup all miners will be restarted) - [**V**]erbose off/on = switch the user interface from lite(=off) to full(=on) - [**B**]alances = update the pool balances now, instead of waiting for the next scheduled update - [**W**]atchdog reset = clear all watchdog timers and reset the watchdog levels (this re-enables the miners, algorithms and pools, that the watchdog has put on hold) - clear cach[**E**] = delete the cached pool data and restart the asyncloader - [**Y**]ank asyncloader = restart the asyncloader without clearing the cache (only needed, if the asyncloader got stuck) - [**U**]pdate = if a new release of RainbowMiner is available, this option will show up. Pressing this key will start the automatic update (see [Doc/UPDATE.md](Doc/UPDATE.md)) - [**Ctrl-U**]pdate to prerelease = pressing this key will update RainbowMiner to the current development pre-release (master.zip) - be careful with that! The very same commands are available as buttons on the **Console** page of the web interface. This is the way to control a rig, that runs hidden, as a service or on a headless Linux box. ## RECOMMENDATIONS & HELPERS - Set your Windows virtual memory size to a fixed size, to the sum of your GPU memories x 1.1, e.g. if you have 6x GTX1070 8GB installed, use at least 53000 (Computer Properties->Advanced System Settings->Performance->Advanced->Virtual Memory) - Submit bugs and feature requests here: https://github.com/RainbowMiner/RainbowMiner/issues - Find all documentation in the [Doc](Doc) folder - see the overview in section [DOCUMENTATION](#documentation) - if mining on GeForce GTX 1070/GTX 1070Ti/GTX 1080/GTX 1080Ti, it is recommended to set "Force P2-State" to "Off", so that the card will always operate in P0 state. [The Nvidia P2 state](Doc/OVERCLOCKING.md#the-nvidia-p2-state) - Important: **NEVER EDIT THE "Start.bat" or "StartWD.bat" !** It will break the autoupdate. If you want to add commands to the start, edit .\Config\autoexec.txt - the root directory of RainbowMiner contains the following, additional batch files: | Windows | Linux | Description | | -------------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Start.bat` | `./start.sh` | start RainbowMiner | | - | `./start-screen.sh` | start as Linux `screen`, connect to screen using `./show-screen.sh` or `screen -R RainbowMiner`, `Ctrl+A` then `d` to detach | | - | `./show-screen.sh` | reconnect to current RainbowMiner screen, `Ctrl+A` then `d` to detach | | - | `./start-tmux.sh` | start as Linux `tmux`, connect to tmux session using `./show-tmux.sh` or `tmux attach-session -t RainbowMiner`, `Ctrl+B` then `d` to detach | | - | `./show-tmux.sh` | reconnect to current RainbowMiner tmux session, `Ctrl+B` then `d` to detach | | - | `./start-nohup.sh` | start as background job, run `./stopp.sh` to stop rainbowminer, run `./rbmlog.sh` to follow the Rainbowminer logfile, run `./minerlog.sh` to follow the miner log files | | `StartWD.bat` | `./startwd.sh` | start RainbowMiner with crash watchdog: restarts automatically, if the PowerShell process dies unexpectedly (see section WATCHDOG START SCRIPTS) | | `StartWDHidden.bat` | - | start RainbowMiner with crash watchdog in a hidden window | | `StartWDInWin.bat` | - | start RainbowMiner with crash watchdog in a normal window | | - | `./startwd-screen.sh` | start with crash watchdog as Linux `screen`, connect using `./show-screen.sh` | | - | `./startwd-tmux.sh` | start with crash watchdog as Linux `tmux`, connect using `./show-tmux.sh` | | - | `./startwd-nohup.sh` | start with crash watchdog as background job | | `Setup.bat` | `./setup.sh` | start RainbowMiner configuration | | `Install.bat` | `./install.sh` | install pre-requisites + on linux: update powershell to the newest release with `./install.sh -pu` | | `FixConsole.bat` | - | Windows 11: switch the default terminal to the classic Windows Console Host, needed for `Start.bat`, not for `StartWD.bat` (`/f` = do not ask, `/r` = undo) | | `InitServer.bat` | `sudo ./initserver.sh` | make this rig a server | | `InitClient.bat` | `sudo ./initclient.sh` | make this rig a client | | `InitStandalone.bat` | `sudo ./initstandalone.sh` | make this rig a standalone machine | | `GPUtest.bat` | `sudo ./gputest.sh` | create gputestresults.txt with tech details | | `Updater.bat` | `./updater.sh` | manually update to newest release of RainbowMiner. Make sure, you stop RainbowMiner before running this helper (see [Doc/UPDATE.md](Doc/UPDATE.md)) | | `ListDevices.bat` | - | list all available devices | | `MinerLog.bat` | `./minerlog.sh` | follow the output of the miners | | - | `./rbmlog.sh` | follow the RainbowMiner log (useful if RainbowMiner is running as background job) | | `RemoveLogs.bat` | - | delete all log files to save some disk space | | `RemovePresets.bat` | - | block presets from being written to miners.config.txt (see [Presets](#presets)) | | `ResetBenchmark.bat` | - | reset all benchmarks | | `ResetBenchmarkAMD.bat` | - | reset all AMD benchmarks | | `ResetBenchmarkCPU.bat` | - | reset all CPU benchmarks | | `ResetBenchmarkNVIDIA.bat` | - | reset all NVIDIA benchmarks | | `ResetProfit.bat` | - | reset RainbowMiner's profit calculation | | `TouchBenchmark.bat` | - | avoid benchmark of new miners, will set the timestamp of all miner stat files to now | | `CopyGpuStats.bat` | `./copygpustats.sh` | copy the benchmarks of one GPU to another, e.g. when a card dropped out and the GPU numbers shifted (stop RainbowMiner first) | | `Stopp.bat` | `./stopp.sh` | halt RainbowMiner at once | ## WATCHDOG START SCRIPTS (OPTIONAL) In rare cases the PowerShell process itself may crash (e.g. a native CLR error or an out-of-memory kill on Linux). The regular start scripts will end in this case and the rig stops mining. The watchdog start scripts `StartWD.bat`, `StartWDHidden.bat`, `StartWDInWin.bat` (Windows) and `./startwd.sh`, `./startwd-screen.sh`, `./startwd-tmux.sh`, `./startwd-nohup.sh` (Linux) will restart RainbowMiner automatically after 10 seconds instead. They are a drop-in replacement for the regular start scripts, updates and restarts from within RainbowMiner keep working as usual. How the watchdog decides: - a regular exit (quit from the miner screen, web interface stop, `Stopp.bat`/`./stopp.sh`, `Ctrl+C` or a `SIGTERM` on Linux) ends the script, as before - any other, unexpected end of the PowerShell process is treated as a crash: the event is logged to `Logs\watchdog.txt` and RainbowMiner is restarted after 10 seconds - if RainbowMiner crashes 5 times in a row, each within less than 120 seconds after start, the watchdog gives up (this prevents an endless restart loop on a broken installation). A run of more than 120 seconds resets the counter, so a rig that crashes now and then will be restarted forever. Important: killing the PowerShell process by hand (task manager, `kill -9`) counts as a crash and will trigger a restart. Use `Stopp.bat`/`./stopp.sh` or quit from within RainbowMiner to stop a watchdog-controlled rig. The thresholds can be changed without editing the scripts, using environment variables: `WD_FAILMAX` and `WD_MINRUN` on Windows, `RBM_WD_FAILMAX` and `RBM_WD_MINRUN` on Linux. Note for Windows: the watchdog scripts copy themselves to `StartWD.run.cmd` (etc.) on start and run the copy, so that the automatic update can never touch a running script. These `*.run.cmd` files are recreated on every start and can be ignored. Note for Windows 11: by default, Windows 11 hosts all console windows in Windows Terminal, which has known issues with classic console applications - the RainbowMiner window may not react to move, close or minimize, and the `-windowstyle` of the start scripts is not applied reliably. The watchdog start scripts detect Windows 11 and relaunch themselves under the classic console host (conhost) automatically - a short flash of an extra window on start is expected and harmless. For the regular start scripts, run `FixConsole.bat` once, see the FAQ ("The RainbowMiner window cannot be moved, closed or minimized"). For autostart, the watchdog scripts can be used in place of the regular start scripts in the Windows task scheduler and in the Linux crontab (see FAQ). ## WEB-INTERFACE For your convenience, you can monitor and setup RainbowMiner using your web browser. The web interface very prominently shows RainbowMiner's live profitability and the current BTC exchange rates. To start the web interface, simply open the URL [localhost:4000](http://localhost:4000) in a new browser tab. The pages are grouped in the menu on the left. **Main** - **Dashboard**: the live running miners, the remote workers (if central monitoring is enabled) and the pool balances. The buttons "Pause / Restart", "Lock / Unlock" and "Reboot" control the rig. It will take up to 20 seconds, until the miner script finalizes the pause/restart procedure, so give it some time. - **Console**: the console output of RainbowMiner, plus all [hotkeys](#hotkeys) as buttons - the way to control a rig, that runs hidden, as a service or on a headless Linux box. The output of the running miners is shown below it, which on Windows requires `"ShowMinerWindow": "0"` (on Linux it always works); a few miners write directly to their window and cannot be captured - **Rates**: the rate conversion table of all currencies in use - **Network**: the client/server setup of this rig, plus actions for all rigs of the network - **Support RBM**: referral links and donation addresses **Devices** - **Selected Devices**: the devices preselected for mining, with their live clocks, temperature and power draw - **All Devices**: all devices found in this rig, also the ones not used for mining - **OC Profiles**: view and edit the custom overclocking profiles of `ocprofiles.config.txt` **Pools** - **Best Pools**: the best possible pool for every algorithm - **All Pools**: all available pools vs. all algorithms. The switch in front of a row turns off exactly that one pool/algorithm combination, not the whole pool - to switch a pool off completely, use `ExcludePoolName` - **Pool Earnings**: the balances of all pools and what they earned - **Pool Totals**: the calculated totals per pool - **Pool Payouts**: the payouts, that the pools have made **Miners** - **Miners**: all miners vs. all algorithms. A miner/algorithm can be switched off and on again here (also the ones, that EnableAutoDisableMiners has disabled automatically) - **Active Miners**: the best possible miners for each algorithm - **Benchmarks**: monitor and reset benchmarks of failed and updated miners, reset all benchmarks - **Activity**: the miners, that have been running during the past days (see MaxActivityDays) - **Watchdog**: the current watchdog timers, plus a button to reset them **Config** - **Setup**: the complete configuration of `config.txt` as a form, with a help text for every field (see [Doc/CONFIG.md](Doc/CONFIG.md)) - **Setup Coins**: the settings of `coins.config.txt` - **Setup Pools**: the settings of `pools.config.txt`, one tab per pool - **User Pools**: add your own or other pools, that RainbowMiner does not ship (see [Doc/USERPOOLS.md](Doc/USERPOOLS.md)) - **Custom Miners**: define, import (HiveOS flight sheets) and manage your own miner programs (see [Doc/CUSTOMMINERS.md](Doc/CUSTOMMINERS.md)) - **JSON Editor**: edit any of the config files directly, with a syntax check before saving - **Running Config**: the configuration, that the running RainbowMiner actually uses (config files, presets and - on a client - the server's config, all merged) - **Get setup.json**: download this rig's configuration, to copy it to a new rig (see section [COPY CURRENT CONFIGURATION TO NEW RIGS](#copy-current-configuration-to-new-rigs)) - **Minerstats Backup**: back up all miner benchmarks on the rig, restore or delete a backup, or download a zip of one or all miners (see section [Backing up and restoring benchmarks](#backing-up-and-restoring-benchmarks)) - **Debug File**: download a zip with the miner start scripts, the miner logs, the configuration and the details of your system. This is the fastest way to collect everything that is needed for a bug report - please attach it, when you open an [issue](https://github.com/RainbowMiner/RainbowMiner/issues) **MRR** (only shown, if the pool MiningRigRentals is in use) - **MRR Stats**: the statistics of your rigs at MiningRigRentals - **MRR Rigs**: your rigs at MiningRigRentals, with their current rentals (see [Doc/MININGRIGRENTALS.md](Doc/MININGRIGRENTALS.md)) **Links** - **Github**: the RainbowMiner repository - **API Documentation**: the reference of RainbowMiner's local API. The whole web interface is built on it, and it can be used to read the state of a rig or to control it from your own scripts At the bottom of the menu, **Theme** switches between the daylight and the night color scheme. The web interface is reachable from other machines in your network, if "RemoteAPI" is set to 1 in config.txt. In that case, protect it with "APIauth", "APIuser" and "APIpassword", and restrict the access with "APIallowIPs". ## CLIENT/SERVER NETWORKING Additional hints for this setup are collected in [Doc/NETWORKING.md](Doc/NETWORKING.md). Choose one PC to be the Server (it may be a dusty old notebook). No need to let it mine, just let RainbowMiner start in paused mode. Select all other Rigs to act as Clients. All pool API communication will then be managed by the server: no more being blocked by the pools due to excessive use of their API There is a Network setup built-in the configuration (press [C], then enter [N]) to help with the setup. If you want it quicker, just run one of the following init scripts for very convenient pre-setup: | Windows | Linux | Description | | -------------------- | -------------------------- | ---------------------------------- | | `InitServer.bat` | `sudo ./initserver.sh` | make this rig a server | | `InitClient.bat` | `sudo ./initclient.sh` | make this rig a client | | `InitStandalone.bat` | `sudo ./initstandalone.sh` | make this rig a standalone machine | Of course, you may also edit the `Config\config.txt` directly. If you change the RunMode of a rig, RainbowMiner needs to be restarted. ### Setup as Server - one PC takes the role as Server - it will act as a gateway to the pool APIs for all Clients - enable auth: choose a username and a password. - the server will be running on the API port These are the server-fields to fill in the config.txt (or use the initscripts or the built-in config) "RunMode": "server", "APIport": 4000, "APIauth": "1", "APIuser": "serverusername", "APIpassword": "serverpassword", "EnableServerDiscovery": "1", ### Setup as Client - all other Rigs shall be clients - if you have enabled auth at the server: set the username and password. - the RainbowMiner running on the server will tell you the machinename, ip address and port - use either the machinename or the ip address of the server as servername These are the client-fields to fill in the config.txt (or use the initscripts or the built-in config) "RunMode": "client", "ServerName": "machinenameofserver", "ServerPort": 4000, "ServerUser": "serverusername", "ServerPassword": "serverpassword", "EnableServerConfig": "1", "EnableServerPools": "1", "EnableServerDiscovery": "1", "ServerConfigName": "config,coins,pools", "EnableServerExcludeList": "0", "ExcludeServerConfigVars": "WorkerName,DeviceName,ExcludeDeviceName,Proxy,APIPort,APIUser,APIPassword,APIAuth,MSIApath,NVSMIpath,CPUMiningThreads,CPUMiningAffinity,GPUMiningAffinity,ServerName,ServerPort,ServerUser,ServerPassword,EnableServerConfig,ServerConfigName,ExcludeServerConfigVars,RunMode,StartPaused", If "EnableServerConfig" is set to "1", the client will try to download the config files specified with "ServerConfigName" from the server (config, coins, pools, algorithms, scheduler, mrralgorithms, userpools, customminers, miners, ocprofiles). If you want to provide the individual rig with specific config files, put them into a subdirectory `.\Config\` (linux: `./Config/`) . Use lowercase letters for the subdirectory ``. Setting the field "EnableServerExcludeList" to "1" lets your client use the server's "ExcludeServerConfigVars" field, instead of the local one in config.txt. All variables defined in "ExcludeServerConfig" will not be overwritten by the server's values. If "EnableServerPools" is set to "1", the client will download the server's pool and balance statistics and mine to exactly those pools (except for MiningRigRentals, which will always be handled locally). If "EnableServerDiscovery" is set to "1" on the server and on the clients, the server announces its api address to the local network and the clients learn it from those announcements, so an ip change of the server needs no reconfiguration. The announcements are signed with the server's api password, so auth must be enabled. Details in [Doc/NETWORKING.md](Doc/NETWORKING.md). Clients that reach the server over the internet should not use a forwarded API port: use a VPN, or a TLS proxy in front of the server together with "ServerSSL" on the clients. Both are described step by step in [Doc/NETWORKING.md](Doc/NETWORKING.md). ## POOLS RainbowMiner ships with a module for 70 pools. What each of them pays out, which wallet, username or API key it expects and how to set it up, is documented pool by pool in **[Doc/POOLS.md](Doc/POOLS.md)** - including the notes for NiceHash and for the pools that can pay out in currencies other than BTC. Choose the pools you want with `PoolName` and `ExcludePoolName` in `Config\config.txt`, or with [C]onfiguration->[S]elections. Their wallets and per-pool settings are entered in the configuration setup, on the **Setup Pools** page of the web interface, or in `Config\pools.config.txt` (see [Doc/POOLSCONFIG.md](Doc/POOLSCONFIG.md)). ### User pools A pool that RainbowMiner does not ship can be added as a user pool: open **Config > User Pools** in the web interface at [localhost:4000](http://localhost:4000), enter the stratum host and port, the coin and your wallet and save. The pool then takes part in the profit switching like every built-in pool. Entries with the same name (other coins, algorithms or regions of the same pool) form one pool, the **Duplicate** button creates them quickly. If `PoolName` restricts the pools, the page offers to add the new name. The entries live in `Config\userpools.config.txt`, the wallet in `pools.config.txt`. The fields, the placeholders and how to read profit and statistics from a pool API are explained in [Doc/USERPOOLS.md](Doc/USERPOOLS.md). ## MINERS RainbowMiner contains a list of well approved miners in the directory `Miners`. Every file there describes one miner program: where to download it, which algorithms it can mine on which devices, and how RainbowMiner reads its hashrate. - the binaries are downloaded on demand into a subfolder of `Bin` and updated automatically, as soon as a new version has been added to the miner's file. The downloaded archives are kept in `Downloads` (see **EnableKeepDownloads**), the previous version of a miner is kept as a backup in `Bin` (see **EnableMinerBackups**) - every miner/algorithm/device combination is benchmarked once, before it takes part in the profit switching. Watch the progress on the **Benchmarks** page of the web interface, where single benchmarks can also be reset and repeated (see [Repeating a single benchmark](#repeating-a-single-benchmark)) - select the miners with **MinerName** and **ExcludeMinerName** in config.txt, and bind them to or exclude them from specific devices in `devices.config.txt` and specific algorithms in `algorithms.config.txt` - each miner's algorithm can be fine tuned for each device in your mining rig, using `miners.config.txt`: extra command line parameters, an overclocking profile, a penalty, a static pool difficulty - a miner/algorithm that crashes repeatedly is put on hold by the watchdog, and disabled permanently, if **EnableAutoDisableMiners** is set. Both can be released again on the **Miners** page of the web interface - a GPU miner that keeps reporting a hashrate while its GPUs sit at idle power is stopped and counted as crashed (**EnableStallDetection**, needs measured GPU power readings) - the miner Excavator mines on NiceHash pool, only - miners Excavator & Excavator1.4.4 run in their own miner window, even if you select to hide miner windows ### Repeating a single benchmark The comfortable way is the **Benchmarks** page of the web interface: the list of all benchmarks is sortable and searchable, every row has a re-benchmark button, and several rows can be selected with the checkboxes and re-run together with "Benchmark selected". To re-benchmark one algorithm on all miners, filter for it, use the check-all box at the top of the table and click "Benchmark selected". The same can be done from a shell, which is handy over ssh. Every benchmark is one file in `Stats\Miners`, and deleting it makes RainbowMiner benchmark that combination again: - single algorithm miners: `--__HashRate.txt` - dual mining: `----__HashRate.txt` Examples: NVIDIA-BzMiner-Autolykos2-kHeavyHash-GPU#00-GPU#01-GPU#04_Autolykos2_HashRate.txt NVIDIA-BzMiner-GPU#03_NexaPoW_HashRate.txt So `rm -f *NexaPoW*HashRate.txt` re-benchmarks NexaPoW on every miner, and `rm -f *BzMiner*NexaPoW*HashRate.txt` only on BzMiner. Watch the exact algorithm name - ETC is mined with Etchash, not with Ethash, and deleting the wrong files changes nothing. Related: after a heavy market move the stored pool profits can lag behind. `ResetProfit.bat` starts the profit statistics over, or delete single files in `Stats\Pools` (`__Profit.txt`). Expect more switching for a while afterwards, until the stable price has settled again. ### Backing up and restoring benchmarks Benchmarks take time, so it is worth keeping a copy - before a driver or miner update, before experiments with overclocking, or simply now and then. Open **Config > Minerstats Backup** in the web interface: - **Create Backup now** zips all benchmark files of `Stats\Miners` into `Stats\Backups\minerstats__