Skip to main content

The tool, file by file

The miner is zmrig/. Everything else a rig owner runs — install, tune, supervise, update, the container — is the tool, and it has one index: tool/README.md. This page is the same map for the docs, with the reason each file is where it is.

You runIt isChange it whenTested by
oneclick.shbuild, tune, install, supervise, update, purgethe install does the wrong thing on a clean machinetests/oneclick/
zmrig-osthe appliance CLI: setup, plan, doctor, hugepages, update, rollback, runa decision the image makes at boot is wrongos/tests/
os/plan.shthe arithmetic: threads, pages, memory budget, restart delaya number has to be computed differentlyos/tests/plan.sh
zmrig-tunehuge pages, THP, governor, IRQ steering, MSRthe host is not being prepared for RandomXtests/oneclick/tune-targets.sh
deploy/docker/entry.jsenvironment → miner flags, and the args/plan/check/pool verbsa container gets a different answer than a hostdeploy/docker/tests/
deploy/docker/Dockerfilethe two-stage image behind ghcr.io/molik-labs/zmrigthe image is bigger or slower than it needs to bedeploy/docker/tests/dockerfile.test.js
os/build-iso.shthe bootable appliancethe ISO should differ from the installtests/oneclick/plan.sh

Why they are not in one directory​

They cannot be. zmrig-os has to live at /usr/local/bin/zmrig-os inside the image, oneclick.sh has to sit at the repository root for the documented curl … | sudo bash install to work, and the container files have to be where docker build copies them from. Moving them into one folder would mean wrappers, and a wrapper changes which file a curl | bash actually reads — the one thing a one-line install must not be ambiguous about.

So the layout is by audience, and the index is what makes it one place:

TreeForNot to be confused with
oneclick.sh, scripts/, os/, deploy/running a rigthe miner
zmrig/, src/the hash engine and its front endanything a user configures
pool/, proxy/, serve/, fleet/services you can hostthe rig's tool
doc/, site/, web/documentation in two languagesdocs/ and vi/, the built copies Pages serves

The two rules​

tests/lint/tool-layout.sh runs in CI on every push, and it enforces what a list like this is worth:

  1. Every path on the index exists, and every top-level script is on it. A new entry point does not get to appear unannounced.
  2. Every entry point it names has a test directory that exists. A tool with no test breaks on somebody else's machine, silently, at 3 a.m.

Branches​

ALPHA → BETA → master, three branches that matter:

BranchWhat it carriesHow to install from it
ALPHAthe next release; it may break between commitsMINER_BRANCH=ALPHA sudo -E ./oneclick.sh install
BETAwhat is being installed today; every merged change lands here firstthe default
masterthe last released versionMINER_BRANCH=master …

The tool is the same code on all three: a release is a commit that survived BETA, not a second copy of the tool.