Why does XMRig crash immediately after starting?
XMRig usually crashes right after starting because of a bad setting, a blocked file, an incompatible download, or trouble getting the memory it needs. Your best first step is to run it from a terminal so you can read the last error instead of watching the window disappear.
Keep the error message on screen
XMRig is a standalone mining program, not a browser miner. If you double-click it and its window closes, that does not always mean it crashed. It may have detected a problem and exited normally.
Open a terminal in the folder containing XMRig, then run:
- Windows PowerShell:
.\xmrig.exe - Linux:
./xmrig - macOS:
./xmrig
The terminal should stay open afterward. Look at the last few lines for clues such as a configuration error, failed memory allocation, or “illegal instruction.”
If you normally start XMRig through a script or shortcut, check that too. It may point to a missing file or pass an invalid option.
Check the download and configuration
A configuration file tells XMRig which pool to connect to and how to use your processor. XMRig commonly uses config.json, where a missing comma or quotation mark can stop startup.
Try these checks:
- Read any reported line number in the configuration error.
- Undo your most recent changes.
- Start with a clean copy of the configuration supplied with your trusted download.
- Confirm that your startup command points to the intended configuration file.
Make sure the program matches your operating system and processor type. An incompatible build can fail before mining begins. An “illegal instruction” error often points to a processor instruction the downloaded build expects but your CPU does not support.
Use the official XMRig project’s releases rather than repackaged “boosted” miners. A promise of unusually high earnings is a warning sign, not a reason to install a modified executable.
Look for blocked files or missing permissions
Security software may block or quarantine XMRig because mining programs are also used by attackers. Check your antivirus protection history before assuming there is a hardware fault.
Do not turn off your antivirus or add broad folder exclusions just to make the miner run. First verify where the file came from and whether you intentionally installed it. On a work or school device, do not bypass security controls.
On Linux or macOS, “permission denied” may mean the file lacks permission to run. Administrator access is not a universal fix. XMRig can mine without some privileged performance features, so a warning about those features alone does not prove why it exited.
Check memory and processor stability
Monero uses RandomX, a mining method designed to favor CPUs. Its fast mode uses a 2,080 MB dataset plus a 256 MB cache, with additional memory needed by the program and operating system.
If the error mentions memory allocation:
- Close memory-heavy applications.
- Check available RAM and virtual memory, which uses disk space to supplement RAM.
- Undo unusually aggressive memory or mining settings.
Warnings about unavailable huge pages, a memory performance feature, usually mean slower mining rather than a fatal error.
If XMRig closes as mining starts, return any processor overclock or undervolt to default settings. These changes alter speed or voltage and can cause instability under mining load.
The bottom line
Keep the terminal open and follow the last error message before changing settings. If you need help, share your operating system, CPU model, XMRig version, and final log lines—after removing passwords and other private details.
