In this guide, we show you two methods for automatically restarting you Chia processes upon system reboot.
This is a way to run the Chia node/farmer/harvester on a headless Windows machine by using Windows Task Scheduler. Anytime the machine reboots, this will start the Chia farmer automatically. Windows Task Scheduler will facilitate Chia farmer to run in a user context without having to log on to the system.
What you need is a batchfile in some location (eg
C:\<Yourlocation>\BootChia.bat). You will also need to create a task through Task Scheduler.
Open Notepad and copy the following lines:
timeout /t 60 >NUL
START “Daemon” /b /normal %LOCALAPPDATA%\Programs\Chia\Chia.exe start farmer
and save in any location (eg
C:\<Yourlocation>) as “
BootChia.bat”. You might need to check / manually replace the pasted double quote characters in the bat file as the wiki converts them to an incompatible type it seems.
The script has 3 components:
Note: The chia.exe path was changed in a 1.6.x release to a more convenient structure where the version reference was removed from the full path. On older client versions you will need to fetch and change the version specific path to chia.exe in the .bat file.
You can cause plotting to start automatically as well, visit our discord server if you want to learn how.
Voilà, next time your PC restarts, Chia will automatically start up. To ensure everything is working as intended you can open a Powershell window and run the following command to verify the farmer is processing incoming challenges correctly
Get-Content ~\.chia\mainnet\log\debug.log -wait -tail 50 | Select-String “eligible”
nssm.cc (Non-Sucking Service Manager) allows you to start Chia as a service. Note that this requires to download (unmaintained) third-party software, so use at your own risk.
nssm.exeand hit enter
nssm install Chia-serviceand hit enter
Go to the Windows Start button look for the “Services” app. Here you will find “Chia-service”. You can rightclick and press “Start” to test if it works (make sure you have no other instances of Chia running).
Now when your system reboots, chia.exe will automatically start. For more information, visit https://nssm.cc/usage and https://www.youtube.com/watch?v=96OtET8HmA0
If you want to disable Windows automatic update, you can follow this guide: https://www.windowscentral.com/how-stop-updates-installing-automatically-windows-10.
Note that stalling updates for too long is not recommended (there's a reason for the updates).