Skip to main content

Installer reference

oneclick.sh [subcommand] [options]

The default subcommand is install when a wallet is given and status when it is not.

Subcommands​

SubcommandWhat it does
installdependencies, build, tune, config, service, self-check (default)
buildcompile only; keeps the previous binary until the new one links
tunehuge pages, THP, governor, MSR — root only
config(re)generate /etc/zmrig/config.json without touching the service
start, stop, restart, status, logsservice control
benchreproducible RandomX measurement (--bench=20000)
reportmeasure and print a ZMRIG1. code for the calculator
verifyself-test, then audit the developer fee (rate, address, off switch)
planprint every automatic decision and change nothing
updatefetch the configured branch, rebuild, restart
uninstallstop, remove service and binaries, keep the config
purgeremove everything the tool ever created

Options​

Pool and identity​

FlagMeaning
--wallet ADDRwallet address or pool login (asked for if omitted)
--pass VALUEpool password, default x
--rig-id NAMEworker name on the pool dashboard and in report codes
--pool HOST:PORTendpoint; a preset also works: moneroocean, supportxmr, c3pool, herominers, xmrpool, p2pool, p2pool-nano
--failover LISTcomma-separated backups, written to config.json
--algo NAMEpin one algorithm; auto advertises the RandomX family
--engine xmrig|zmrigC++ engine or Zig engine

Network​

FlagMeaning
--tlsTLS for the pool connection
--cloudflare[=HOST[:PORT]]pool over wss:// on 443; switches to zmrig
--transport tcp|tls|ws|wssoverride the scheme
--ws-path PATHWebSocket path (default /stratum)
--ws-origin URLOrigin header for the upgrade
--proxy URLhttp://user:pass@host:port or socks5://host:port
--connect-to HOST:PORTdial a different address, keep the pool's SNI and Host
--tls-ca FILEtrust a private CA, or pin a relay certificate
--idle-timeout Ndrop the connection after N silent seconds (0 disables)
--ban-cooldown Nseconds to leave a pool alone after it bans the IP (default 900)

Machine​

FlagMeaning
--profile free|wattmaximum hashrate, or maximum hashes per watt
--mode fast|light|autodataset size; light needs about 300 MB
--cpu-hint Nmax-threads-hint percentage (default 100)
--no-autotunekeep the default thread count
--no-tunedo not touch huge pages, THP, governor or MSR
--msr, --no-msrforce or forbid MSR writes
--nicehashmask the nonce for a rental pool
--http-port PORTmonitoring API port (default 18080)
--http-token TOKENrequire Authorization: Bearer TOKEN
--no-httpdisable the monitoring API
--power Wwall power of this machine, used in report codes

Behaviour​

FlagMeaning
--forceoverwrite an existing config
--yesnever prompt (unattended installs)
--no-serviceinstall and configure, do not create a unit
--all-backendsalso build OpenCL/CUDA support
--build-dir DIRwhere to compile (default /usr/local/src/zmrig-build)

What it installs​

PathWhat
/usr/local/bin/zmrigthe Zig miner
/usr/local/bin/xmrigthe C++ miner, when that engine is selected
/usr/local/bin/zmrig-tunehost tuning (--status, --hugepages 1G, --algo panthera sizes the reservation for that coin, …)
/usr/local/bin/zmrig-benchreproducible hashrate measurement
/usr/local/bin/zmrig-verifythe developer-fee audit
/etc/zmrig/config.jsonconfiguration, mode 600
/var/lib/zmrig/state and the report file
zmrig.servicethe miner: Restart=always, RestartSec=5, Nice=-10, LimitMEMLOCK=infinity, PrivateTmp=true
zmrig-tune.serviceoneshot tuner, runs before the miner at boot
http://127.0.0.1:18080/1/summaryread-only monitoring API

Migration from the old name​

Up to installer 1.2 the tool installed itself as xmrig-ocean. A new install does not silently leave the old one behind:

  1. /etc/xmrig-ocean/config.json is copied to /etc/zmrig/config.json (mode 600) if the new path does not exist yet.
  2. /var/lib/xmrig-ocean is moved to /var/lib/zmrig.
  3. The old unit is stopped, disabled and removed, so the machine does not end up running two miners after a reboot.
  4. purge removes both name sets, so an upgrade does not leave orphan files.

Branches​

ALPHA ──► BETA ──► master
newest default upstream history

Every command in these pages uses BETA. To try ALPHA once:

MINER_BRANCH=ALPHA sudo -E ./oneclick.sh install --wallet 4YourMoneroAddress
sudo ./oneclick.sh update # back to the default branch

update fetches the configured branch before checking it out, and stops with the branch name if it does not exist. That used to fail quietly.