Home

What are the most useful XMRig command line options?

The most useful XMRig command-line options tell it which pool to use, where to send your rewards, and how much of your computer’s processor it can use. Start with the connection settings, then add a few controls for processor use, troubleshooting, and logging.

Connect to a pool and set your wallet

XMRig is a standalone mining program, not a browser miner. You run these options after xmrig in a terminal, or after xmrig.exe on Windows.

These are the main connection options:

  • -o HOST:PORT or --url=HOST:PORT: Sets your mining pool’s address. A pool combines miners’ work and shares rewards.
  • -u YOUR_XMR_ADDRESS or --user=YOUR_XMR_ADDRESS: Usually sets the Monero wallet address that receives your payouts.
  • -p PASSWORD or --pass=PASSWORD: Supplies the pool’s password field. Many pools use x, while others put worker settings here.
  • --coin=monero: Tells XMRig you want to mine Monero.
  • --tls: Encrypts the connection to your pool. Use the pool’s designated TLS port.
  • --rig-id=NAME: Labels your computer, if your pool supports this option.

A basic command looks like this:

xmrig -o POOL_HOST:TLS_PORT -u YOUR_XMR_ADDRESS -p x --coin=monero --tls

Replace the placeholders with your pool’s published settings and your own wallet address. Pool instructions matter: worker names and login formats are not identical everywhere.

Control processor use

Monero uses RandomX, a mining algorithm designed to favor CPUs—your computer’s main processors.

The most useful controls are:

  • -t N or --threads=N: Requests a specific number of CPU mining threads, or parallel workers. For example, -t 2 requests two.
  • --cpu-max-threads-hint=N: Guides automatic thread selection using a percentage. For example, --cpu-max-threads-hint=50 suggests using roughly half the available CPU threads.
  • --cpu-priority=N: Sets mining’s scheduling priority, from 0 for idle to 5 for highest. Lower priority helps other programs get processor time first.

The threads hint is not a strict CPU-usage percentage limit, and existing CPU settings in your configuration can affect whether it applies.

More threads do not always mean faster mining. RandomX needs about 2 MB of L3 cache—a small, fast memory area inside the CPU—per mining thread. Start conservatively and watch temperatures, responsiveness, and hash rate, meaning mining calculations per second.

Save settings and troubleshoot

These options make repeat runs easier:

  • -c FILE or --config=FILE: Loads a JSON configuration file, a text file containing structured settings.
  • --dry-run: Tests the configuration and exits without mining.
  • -l FILE or --log-file=FILE: Saves program messages to a file.
  • --print-time=N: Sets the interval, in seconds, between hash-rate reports.
  • --help: Lists the options supported by your installed version.

For example:

xmrig -c config.json --log-file=xmrig.log --print-time=30

A successful dry run does not guarantee that your pool login or payout settings are correct. Check the live connection messages too.

The bottom line

Start with -o, -u, --coin=monero, and your pool’s required connection options. Then adjust threads gently and use logs to diagnose problems. Only mine on devices you own or have explicit permission to use; higher mining speed is not worth overheating your computer or making it unusable.

All 1,000 questions

MyAiMiner.com

MyAiMiner.com — Monero mining blog. 1,000 questions. Clear answers.

Monero (XMR) Mining BLOG

Hashes0
Blocks accepted0
Blocks rejected0
Runtime00:00:00