How do I set up XMRig to start automatically on boot in Windows?
You can make XMRig start automatically when Windows boots by creating a task in Task Scheduler, Windows’ built-in tool for running programs on a schedule. Use an At startup trigger if you want mining to begin before you sign in; the Startup folder only runs programs after you sign in.
Put XMRig in a permanent folder
XMRig is a mining program that runs directly on your computer, rather than inside your browser. Before automating it, make sure it mines successfully when you start it yourself.
Keep the program and its settings in a stable location, such as:
C:\Mining\XMRig\xmrig.exe
C:\Mining\XMRig\config.json
Your config.json file should already contain your mining pool details and Monero wallet address. A mining pool combines your mining work with other people’s work and shares rewards.
Use an official XMRig release. Only set this up on a computer you own or have explicit permission to use. Avoid folders that other users can freely modify, especially if you later allow the task to run with administrator rights.
Create an “At startup” task
Search for Task Scheduler in the Windows Start menu and open it. Select Create Task, not Create Basic Task, so you can access all the settings.
In the General tab:
- Give the task a clear name, such as
XMRig at boot. - Select your Windows user account.
- Choose Run whether user is logged on or not for mining before sign-in.
Leave Run with highest privileges unchecked unless your tested XMRig setup needs administrator access. Some performance features require extra permissions, but automatic startup itself does not.
In the Triggers tab:
- Select New.
- Set Begin the task to At startup.
- Add a delay of around one minute to let Windows and your network get ready.
- Make sure Enabled is checked.
Set the program, folder, and power options
In Actions, select New, then Start a program.
Enter:
- Program/script:
C:\Mining\XMRig\xmrig.exe - Add arguments:
--config="C:\Mining\XMRig\config.json" --log-file="C:\Mining\XMRig\xmrig.log" - Start in:
C:\Mining\XMRig
The starting folder helps XMRig find supporting files. The log file records activity because a task running before sign-in generally will not show a console window.
Under Conditions, review the power settings. On a laptop, keeping Start the task only if the computer is on AC power enabled protects your battery.
Under Settings:
- Enable Allow task to be run on demand.
- Disable Stop the task if it runs longer than if you want continuous mining.
- Select Do not start a new instance if the task is already running.
Save the task. Windows may request your account password; your Windows Hello PIN is not the same credential.
Test it and know how to stop it
Right-click the task and select Run. Check Task Manager for xmrig.exe, then open xmrig.log to confirm mining starts. Restart Windows and check again.
If it fails, inspect the task’s Last Run Result, file paths, account permissions, and log. If Windows Security blocks XMRig, verify the download rather than disabling protection broadly.
To stop automatic startup, right-click the task and select Disable. To stop the current run, select End.
The bottom line
Use Task Scheduler’s At startup trigger, explicit file paths, and a log file. Test after a reboot, and monitor heat, electricity use, and responsiveness before leaving mining enabled continuously.
