How to setup a Cryptonight(cryptonight-light) (AEON/Monero/…) XMR-STAK mining rig with monitoring and auto restart

Hi,

OK, enough smalltalk, lets get your feet wet!

Tutorial tested on:

Goals

  • setup a regular Windows 10 PC with XMR-Stak to be almost maintenance-free
  • remote rig control
  • miner auto recovery and reboot on failures
  • auto startup of PC if supported by BIOS
  • windows configured to not suddenly shutdown or detect XMR-STAK as a virus
  • disabled windows update that suddenly reboot the PC

Not covered:

  • any loss of network connection

How To Set up the rig

  1. get a coffee.
  2. install graphics drivers (xmr-stak only supports AMD or NVIDIA atm)
  3. install anyDesk to remote control your rig: https://anydesk.com/download and configure it to auto start and allow remote access
  4. create a user without password that logs in automatically: https://www.tenforums.com/tutorials/3539-sign-user-account-automatically-windows-10-startup.html
  5. download xmr-stak from https://github.com/fireice-uk/xmr-stak/releases (the miner)
  6. download Visual Studio libraries from https://go.microsoft.com/fwlink/?LinkId=746572 (used by xmr-stak)
  7. download MinerMonitor from http://jkcrypto.com/wp-content/uploads/2017/12/MinerMonitor.zip (the miner monitoring script. It’s a PowerShell script using Open Hardware monitor to check GPU temps. The script restarts miner or PC if temps are too low for too long – it assumes the miner crashed)
  8. unzip everything and install the Visual Studio Libs
  9. move/copy the extracted folder „MinerMonitor“ to C:\MinerMonitor
  10. open AutoRun folder by pressing ALT+F2 to open the Run… Dialog and enter shell:startup which opens a new explorer window
  11. move „C:\MinerMonitor\script auto restart“ into the AutoRun folder (to automatically start the monitor after reboot or startup)
  12. create a link from xmr-stak.exe in autostart and to make things easy, rename the link to „jkcrypto“ (same reason as 6. plus the miner monitor script uses the jkcrypt command to restart the miner)mo
  13. edit the monitoring script „C:\MinerMonitor\jkcrypto minermon“ and go to line 25 („$Minerpath = …“) and change the path to your AutoRun folder location. (On my rigs it was sufficient to change the username part of the path [after „C:\Users\“] to the one im logged in atm)
  14. edit the line 24 „$minername=“…“ and change the name to „xmr-stak*“
  15. double click on xmr-stak.exe (opens a terminal to let xmr-stak create working config files for xmr-stak. You’ll get 4 config files after entering all data you are asked for by xmr-stak. Have your wallet address and pool addresses [e.G. aeon.magiclobster.de:7777, mine.durinsmine.com:7777])
  16. deactivate windows updates and error messages
    1. deactivate windows auto updates: https://www.windowscentral.com/how-stop-updates-installing-automatically-windows-10 (to prevent windows from occasionally rebooting. BEWARE! this will lead to security risks)
    2. deactivate „Program has stopped working“ dialog (to make restarting crashed miner possible)
      1. Start gpedit.msc
      2. Navigate to Computer Configuration > Administrative Templates > Windows Components > Windows Error Reporting.
      3. Double-click the Prevent display of the user interface for critical errors policy, and set it to Enabled.
    3. deactivate standby
      1. open up Power Options in the Control Panel. In Windows 10 you can get there from right clicking on the start menu and going to Power Options
      2. click change plan settings next to your current power plan
      3. change „Put the computer to sleep“ to never
      4. click „Save Changes“
  17. Test your setup by starting the miner monitor script with the AutoRun link. On first start It will show an error message that it can’t find Open Hardware Monitor. The script starts that tool after the error message, so don’t worry.
    1. you should see the script checking the GPU temps every 30 secs. After three times with low temps it should start xmr-stak
    2. reboot the rig
      1. xmr-stak should run automatically
      2. miner monitor should run, too
  18. if possible, set your computer’s BIOS to restart on power failure
  19. get another coffee 🙂
  20. visit jkcrypto’s blog for more modifications of the miner and email alerts etc. at http://jkcrypto.com/automatically-restart-mining-if-stopped/

Cheers, nk0der

Schreibe einen Kommentar