How do I stop mining in monerod?
To stop Monero’s built-in miner, enter stop_mining in the running monerod console and press Enter. This stops mining without shutting down your node, so it can keep downloading and checking new blocks.
Stop mining from the daemon console
monerod is Monero’s daemon: the program that runs your node in the background or in a terminal window. It also includes a built-in solo miner, which mines independently rather than with a pool.
If you started mining with the daemon’s start_mining command, go back to the terminal where monerod is running and enter:
stop_mining
Type this into monerod’s console, not your wallet console or an ordinary operating-system command prompt.
You should see a response indicating that mining has stopped. Leave the daemon running if you still want your node available for your wallet or other local services.
Stopping does not erase your downloaded blockchain, your wallet, or rewards you already earned.
If monerod runs in the background
If you do not have an interactive daemon console, you can use its RPC interface. RPC is a way for another program to send commands to your node.
For a local mainnet node using the default RPC port, run this in your operating system’s terminal:
curl http://127.0.0.1:18081/stop_mining \
-H 'Content-Type: application/json' \
-d '{}'
Here, 127.0.0.1 means your own computer. A successful response normally includes "status": "OK".
This request needs access to the daemon’s unrestricted RPC interface. If you configured a different port or enabled authentication, adjust the request accordingly. A restricted RPC interface will not allow this command.
Do not expose unrestricted RPC access to the public internet just to stop mining. Use your local connection or your existing secure administration setup.
Check that the right miner stopped
Run this in the daemon console for a quick overview:
status
The output should indicate that the built-in miner is not mining. Your computer’s CPU usage should usually drop, although your node may still use processing power while checking blocks.
Importantly, stop_mining controls only monerod’s built-in miner:
- If you run XMRig, a separate mining program, stop XMRig itself.
- If you use P2Pool, a decentralized mining pool, stop whichever miner supplies work to P2Pool.
- If mining happens in a browser, use that miner’s stop control or close its mining tab.
Your node can keep running in all these cases.
Keep mining from restarting
If mining resumes after a restart, check how you launch monerod. Remove any --start-mining startup option, or the corresponding start-mining setting in its configuration file.
Also check whether a script or service automatically sends a mining-start command. Stopping mining now does not remove those startup instructions.
The bottom line
Use stop_mining to stop monerod’s miner while keeping your node online. If a separate program is doing the mining, stop that program instead.
