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


OK, enough smalltalk, lets get your feet wet!

Tutorial tested on:


  • 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 reboots 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: and configure it to auto start and allow remote access
  4. create a user without password that logs in automatically:
  5. download xmr-stak from (the miner)
  6. download Visual Studio libraries from (used by xmr-stak)
  7. download MinerMonitor from (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)
  13. edit the monitoring script
    1. around line 24 ($minername= …) and change the name to „xmr-stak*“  (this helps the script to identify the miner process)
    2. around line 25 ($Minerpath = …) and change the path to your AutoRun folder location („C:\MinerMonitor\jkcrypto minermon“ ). (On my rigs it was sufficient to change the username part of the path [after „C:\Users\“] to the one im logged in atm)
    3. for testing purposes set the delay to 0 (delivered with 180s)
  14. 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.,])
  15. deactivate windows annoyances like error messages
    1. deactivate windows auto updates: (to prevent windows from occasionally rebooting. BEWARE! this will lead to security risks, so close all unnecessary ports)
    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“
    4. deactivate User Access Control to avoid dialogs asking the user if a program should be launched
      1. open the start menu , type „uac“ and move the slider on the left all the way down to deactivate UAC
    5. deactivate Windows Defender which assumes miners are malware and will not let you run it.
      1. open the start menu
      2. type „defender“
      3. deactivate live checking and everything else in this config dialog
    6. enable powershell script execution
  16. if possible, set your computer’s BIOS to restart on power failure
  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. get another coffee 🙂
  19. visit jkcrypto’s blog for more modifications of the miner and email alerts etc. at

Cheers, nk0der

Schreibe einen Kommentar