Command line options


Short optionLong optionDescriptionVersion
-o--url=URLURL of mining serverAll
-a--algo=ALGOmining algorithmAll
--coin=COINspecify coin instead of algorithm3.2.0+
-u--user=USERNAMEusername for mining serverAll
-p--pass=PASSWORDpassword for mining serverAll
-O--userpass=U:Pusername:password pair for mining serverAll
-x--proxy=HOST:PORTconnect through a SOCKS5 proxy5.7.0+
-k--keepalivesend keepalive packet for prevent timeout (needs pool support)All
--nicehashenable nicehash supportAll
--rig-id=IDrig identifier for pool-side statistics (needs pool support)2.6.1+
--tlsenable SSL/TLS support (needs pool support)2.8.0+
--tls-fingerprint=HEXpool TLS certificate fingerprint for strict certificate pinning2.8.0+
--dns-ipv6prefer IPv6 records from DNS responses6.11.0+
--dns-ttl=NN seconds (default: 30) TTL for internal DNS cache6.11.0+
--daemonuse daemon RPC instead of pool for solo mining3.0.0+
--daemon-zmq-port=Ndaemon's zmq-pub port number (only use it if daemon has it enabled)6.14.0+
--daemon-poll-interval=Ndaemon poll interval in milliseconds (default: 1000)3.0.0+
--daemon-job-timeout=Ndaemon job timeout in milliseconds (default: 15000)6.19.0+
--self-select=URLself-select block templates from URL4.4.0+
--submit-to-originalso submit solution back to self-select URL6.9.0+
-r--retries=Nnumber of times to retry before switch to backup server (default: 5)All
-R--retry-pause=Ntime to pause between retries (default: 5)All
--user-agentset custom user-agent string for pool2.3.0+
--donate-level=Ndonate level, default 1% (1 minute in 100 minutes)All
--donate-over-proxy=Ncontrol donate over xmrig-proxy feature3.0.0+

CPU backend

Short optionLong optionDescriptionVersion
--no-cpudisable CPU mining backend3.0.0+
-t--threads=Nnumber of CPU threads. Proper CPU affinity required for some optimizations.All
--cpu-affinity=Nset process affinity to CPU core(s), mask 0x3 for cores 0 and 1All
-v--av=Nalgorithm variation, 0 auto selectAll
--cpu-priority=Nset process priority (0 idle, 2 normal to 5 highest)2.3.0+
--cpu-max-threads-hint=Nmaximum CPU threads count (in percentage) hint for autoconfig4.2.0+
--cpu-memory-pool=Nnumber of 2 MB pages for persistent memory pool, -1 (auto), 0 (disable)4.3.0+
--cpu-no-yieldprefer maximum hashrate rather than system response/stability5.1.1+
--no-huge-pagesdisable huge pages support2.3.0+
--hugepage-size=Ncustom hugepage size in kB (Linux only)2.8.1+
--huge-pages-jitenable huge pages support for RandomX JIT codeAll
--asm=ASMASM optimizations, possible values: auto, none, intel, ryzen, bulldozer2.8.0+
--argon2-impl=IMPLargon2 implementation: x86_64, SSE2, SSSE3, XOP, AVX2, AVX-512F6.3.1+
--randomx-init=Nthread count to initialize RandomX dataset3.0.0+
--randomx-no-numadisable NUMA support for RandomX3.0.0+
--randomx-mode=MODERandomX mode: auto, fast, light5.1.0+
--randomx-1gb-pagesuse 1GB hugepages for RandomX dataset (Linux only)5.2.0+
--randomx-wrmsr=N write custom value(s) to MSR registers or disable MSR mod (-1)5.2.0+
--randomx-no-rdmsr disable reverting initial MSR values on exit5.5.0+
--randomx-cache-qos enable Cache QoS6.3.1+

OpenCL backend

Short optionLong optionDescriptionVersion
--openclenable OpenCL mining backend5.0.0+
--opencl-devices=Ncomma separated list of OpenCL devices to use5.0.0+
--opencl-platform=NOpenCL platform index or name5.0.0+
--opencl-loader=PATHpath to OpenCL-ICD-Loader (OpenCL.dll or
--opencl-no-cachedisable OpenCL cache5.0.0+
--print-platformsprint available OpenCL platforms and exit5.0.0+

CUDA backend

Short optionLong optionDescriptionVersion
--cudaenable CUDA mining backend5.0.0+
--cuda-loader=PATHpath to CUDA plugin (xmrig-cuda.dll or
--cuda-devices=Ncomma separated list of CUDA devices to use5.0.0+
--cuda-bfactor-hint=Nbfactor hint for autoconfig (0-12)5.0.1+
--cuda-bsleep-hintbsleep hint for autoconfig5.0.1+
--no-nvmldisable NVML (NVIDIA Management Library) support5.0.0+


Short optionLong optionDescriptionVersion
--api-worker-id=IDcustom worker-id for API2.4.0+
--api-id=IDcustom instance ID for API2.4.0+
--http-host=HOSTbind host for HTTP API (default:
--http-port=Nbind port for HTTP API5.0.0+
--http-access-token=Taccess token for HTTP API5.0.0+
--http-no-restrictedenable full remote access to HTTP API (only if access token set)5.0.0+


Short optionLong optionDescriptionVersion
-S--sysloguse system log for output messagesAll
-l--log-file=FILElog all output to a fileAll
--print-time=Nprint hashrate report every N secondsAll
--health-print-time=Nprint health report every N seconds5.0.0+
--no-colordisable colored outputAll
--verboseverbose output5.4.0+


Short optionLong optionDescriptionVersion
-c--config=FILEload a JSON-format configuration fileAll
-B--backgroundrun the miner in the backgroundAll
-V--versionoutput version information and exitAll
-h--helpdisplay this help and exitAll
--dry-runtest configuration and exitAll
--export-topologyexport hwloc topology to a XML file and exit3.0.0+
--titleset custom console window title6.0.1+
--no-titledisable setting console window title6.0.1+
--pause-on-batterypause mine on battery power6.3.1+
--pause-on-active=Npause mine when the user is active (resume after N seconds of last activity)6.9.0+
--stressrun continuous stress test to check system stability6.4.0+
--bench=Nrun benchmark, N can be between 1M and 10M6.4.0+
--submit perform an online benchmark and submit result for sharing6.5.0+
--verify=IDverify submitted benchmark by ID6.5.0+
--seed=SEEDcustom RandomX seed for benchmark6.5.0+
--hash=HASHcompare benchmark result with specified hash6.5.0+
--no-dmidisable DMI/SMBIOS reader6.8.0+