In this guide, we show you two methods for automatically restarting you Chia processess upon system reboot.
This is a way to run the Chia node/farmer/harvester on a headless Windows machine. Anytime the machine reboots, this will start it all automatically.
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%\chia-blockchain\app-1.2.5\resources\app.asar.unpacked\daemon\chia.exe start farmer
Exit
and save in any location (eg C:\<Yourlocation>
) as “BootChia.bat
”
The script has 3 components:
Note:
Should you ever upgrade Chia, say to version 1.2.7 then the “app-1.2.5
” part needs to be changed to “app-1.2.7
”.
You can cause plotting to start automatically as well, visit our discord server if you want to learn how.
<Yourlocation>
\BootChia.bat<Yourlocation>
Voilà, next time your PC restarts, Chia will automatically start up.
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.
cd C:\Users\<username>\Downloads\nssm-2.24\win64
nssm.exe
and hit enternssm install Chia-service
and hit enter%LOCALAPPDATA%\chia-blockchain\app-1.2.5\resources\app.asar.unpacked\daemon\chia
%LOCALAPPDATA%\chia-blockchain\app-1.2.5\resources\app.asar.unpacked\daemon
start farmer
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
timeout /t 60 >NUL
powershell -windowstyle hidden C:\Scripts\Farmer.ps1 » C:\Scripts\startup.log
$path = Get-item -Path $ENV:LOCALAPPDATA\chia-blockchain\app*\resources\app.asar.unpacked\daemon\chia.exe
&$path start farmer
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).