Guide

The bot tunes the overclock of every NVIDIA card on HiveOS (AMD support is coming) by itself, verifies it for two hours, handles reboots after card drops and protects the power supply. Installation takes a few minutes, the rest it does on its own.

Type the name, for example config.rig1.json: it is inserted into every command below. With a single rig, leave it as is.

Installation

Four steps. The bot changes the overclock and reboots the rig: for the first hours stay nearby, or at least in Telegram.

  1. Prepare the rig in the Hive panel

    Clear the overclock in the panel (the worker's OC tab), otherwise Hive applies its own on top of the bot. Turn off the hashrate-based reboot in Watchdog during tuning: hashrate drops on test points. The miner must be running and reporting hashrate.

    Worker in the panelOverviewOverclockWatchdogclear itturn offreboot on low hashrate
  2. Install the bot

    No files to download to your computer and upload to the rig. Open the rig's Hive Shell (the >_ icon) and paste one command — it downloads the bot, unpacks it and starts the setup wizard itself. The wizard finds the cards, the miner and the rig name itself and asks about the power supply, the tuning goal and Telegram.

    cd /root && wget -qO ocbot.zip https://raw.githubusercontent.com/ocbotauto/ocbot-dist/main/ocbot.zip && unzip -qo ocbot.zip -d /root && cd /root/ocbot && bash install.sh
    1. Rig's Hive Shellone command, the >_ icondownload and unpack2. Setup wizardfinds cards itself, asks about the PSU
  3. Start the trial or activate a key

    Right after install the bot changes nothing yet, until a licence is active. Free, no card needed — 3 days per rig, once:

    cd /root/ocbot && python3 -m ocbot --config config.json --trial

    Bought a key on the purchase page? Activate it with one command — no file to copy anywhere, use your own key instead of OC-...:

    cd /root/ocbot && python3 -m ocbot --config config.json --activate OC-XXXXX-XXXXX-XXXXX-XXXXX

    One key works for one rig: each rig needs its own key and its own activation.

  4. Connect Telegram

    Create a bot with @BotFather, take its token, and get your numeric ID from @userinfobot. The wizard asks for both; you can set them later with a command. Never share the token and never paste it into a chat.

    cd /root/hive-oc-bot && python3 -m ocbot --config config.json --telegram-set 'TOKEN' 123456789

    Use your own token and ID. If Telegram is unreachable from the rig, see Troubleshooting.

    1@BotFathercreate a bot, get a token2@userinfobotget your numeric ID3Hive Shellenter token and ID in the wizardNever share the token.
  5. See what the bot is doing

    The bot starts in about a minute (a pause after boot) and reports every step in Telegram. Send /status to see what each card is doing. Tuning takes several hours, and every preset found goes through a two-hour verification.

    systemctl status ocbot --no-pager | head -n 5; tail -n 10 /root/hive-oc-bot/ocbot.log

    If Telegram does not work, the state is visible here.

    /statusRig rig01 · goal compromiseautomation: runningGPU 0 RTX 3070 Ti [ok]68°C · 85.4 TH/s · 222 WGPU 1 RTX 3080 [ok]69°C · 104.9 TH/s · 201 Wsample bot reply (illustrative values)

How it works

What the bot does with a card from the first start to a working preset.

Searchcore · mem · PLVerify2 hoursPresetsaved to the DBfailed: search againA card dropssafe profile, reboot, the point becomes a limit

Search core · mem · PL

The bot looks for the core offset, the memory offset and the power limit. Every point is measured in a window; a drop turns the point into a boundary and the rig reboots.

Verification 2 hours

The best preset found runs under load for two hours. If it fails, a spare one is taken and the search continues with a larger safety margin.

Goal /mode

efficiency: maximum hashrate per watt. compromise: maximum hashrate while efficiency stays within the given tolerance of the best. hashrate: maximum hashrate, power is split within the PSU budget.

4 parameters /params

On top of the offsets, core and memory clocks are locked. It is enabled per card and tuned on a ready preset. With the hashrate goal and a PSU-limited rig the lock usually gives no gain; with efficiency and compromise the gain is noticeable. For rgminer the bot then raises the core offset under the lock.

Card drops

A drop at the overclock boundary: safe profile and reboot. A drop on mild settings: a ladder of reboots, then the card is marked suspect or faulty.

Power supply /psu

The sum of the cards' PL limits stays within the PSU budget. With several PSUs you can say which slots sit on which. The hashrate goal splits the limit by the cards' potential.

Note. Presets are tied to a specific card, algorithm, miner and miner version. If you change the miner or the algorithm, the bot tunes again; old presets stay in the database.

Telegram commands

A card can be given by slot number, label or the last characters of its UUID: /card 3. The full list is always available through /help. The bot's messages are in Russian.

1. Status

  • /statusState of all cards and presets
  • /cardOne card in detail: /card 3
  • /profilesReady presets
  • /historyCard history: /history 3
  • /slotsPer-slot statistics
  • /tableRig summary table (max, min, best efficiency), CSV file

2. Tuning and verification

  • /tuneRe-tune one card: /tune 3
  • /newsearchNew search: /newsearch 3 (one card) or /newsearch all (whole rig)
  • /restoreRestore the previous preset without a new search: /restore 3 or /restore all
  • /verifyTwo-hour verification of a card: /verify 3
  • /optimizeDetailed search around a ready preset: /optimize 3, /optimize all, /optimize cancel

3. Goal and modes

  • /modeTuning goal: efficiency, compromise, hashrate; one card: /mode 3 hashrate
  • /paramsCard mode: /params 3 4 (adds core and memory clock locks), /params all 4, /params 3 2

4. Control

  • /safeApply safe settings to the cards
  • /stopStop the automation
  • /resumeResume the automation
  • /faultyMark a card as faulty: /faulty 3 [off]

5. Power

  • /plPower lock: /pl 3 150 or /pl 3 off
  • /psuPSU load; change inputs: /psu 1400 1200 [base]
  • /balancePower limit split: /balance (show), /balance run (distribute), /balance deep (dense search)

6. Catalog and sharing

  • /exportExport presets as a file
  • /modelsCatalog of best presets by card model
  • /modelPresets of one model: /model 3070
  • /catalogCatalog file to share (no UUIDs or rig names)

7. Help

  • /helpList of commands

Console commands

The same without Telegram. Run each command from the bot folder:

cd /root/hive-oc-bot && python3 -m ocbot --config config.json --table
--service installinstall autostart and start the bot; stop / start / restart / status / remove to manage it
--mode compromise --tolerance 3change the goal: efficiency, compromise (tolerance in %), hashrate; show prints the current one
--mode hashrate --card 3goal for one card; --mode rig returns it to the common goal
--params all 4"4 parameters" mode (core and memory clock lock); --params 3 2 returns to two parameters
--tablerig summary table: max, min and best efficiency of every card
--restore 3restore the previous verified preset of a card without a new search (no argument: all cards)
--optimize 3detailed search around a ready preset; --opt-gain 2 sets the gain threshold in %
--balance showhow cards hit the PSU limit; run distributes the limit, deep searches denser
--telegram-set 'TOKEN' 123456789store the bot token and your Telegram ID (never paste the token in a chat)
--telegram-proxy http://192.168.3.5:8080proxy for Telegram if it is blocked; '' disables it
--fix-external-gpusThunderbolt cards invisible to X: add AllowExternalGpus to the Hive script (then reboot)
--catalog 3070catalog of best presets by model; --catalog-export / --catalog-import to share a file
--repairfix false drops recorded when the bot was restarted (stop the bot first)
--uninstall --yesremove the bot from the rig completely; --keep-data keeps configs, database and log

Update and removal

The config, the database and the presets are not touched by an update. Do not update a rig during a two-hour verification: restarting the bot interrupts it.

Update

cd /root/hive-oc-bot && python3 -m ocbot --config config.json --service stop && cd /root && wget -qO hive-oc-bot.zip https://github.com/makar2186/ocbot-dist/raw/main/hive-oc-bot.zip && unzip -qo hive-oc-bot.zip -d /root && cd /root/hive-oc-bot && python3 -m unittest discover -s tests > /tmp/t.log 2>&1 && tail -n 3 /tmp/t.log && python3 -m ocbot --config config.json --service install

The output should end with OK.

Stop and resume

cd /root/hive-oc-bot && python3 -m ocbot --config config.json --service stop
cd /root/hive-oc-bot && python3 -m ocbot --config config.json --service start

After stop the bot does not start after a reboot either.

Remove completely

cd /root/hive-oc-bot && python3 -m ocbot --config config.json --uninstall --yes

Removes the service, the autostart and the folder. Add --keep-data to keep the configs and the database.

Troubleshooting

Common cases and what to do.

The bot did not start after the rig rebooted

Wait a minute: there is a pause before the start. Then check the service and the autostart.

systemctl status ocbot --no-pager | head -n 8; crontab -l | grep ocbot

If the service is missing or was stopped with --service stop, run --service install.

Telegram does not respond from the rig

Telegram may be blocked by your provider. Set a proxy, and read the state from the log until it works.

cd /root/hive-oc-bot && python3 -m ocbot --config config.json --telegram-proxy http://192.168.3.5:8080
cd /root/hive-oc-bot && python3 -m ocbot --config config.json --telegram-test
A card is marked suspect

The bot could not find a stable preset for it and stopped the automation so as not to torture the card. Check power, riser and temperature, then start the search again with /tune 3.

Thunderbolt cards are invisible to X, offsets are not applied

X disables external GPUs by default (/var/log/Xorg.0.log says "external GPUs have not been enabled"). The bot can add the needed option to the Hive script. Reboot the rig afterwards.

cd /root/hive-oc-bot && python3 -m ocbot --config config.json --fix-external-gpus
nvidia-smi -L | wc -l; DISPLAY=:0 nvidia-settings -q gpus | grep -c "\[gpu:"

The two numbers must match the number of cards.

A Hive image update overwrites the script: repeat the command.

Settings disappeared after the miner restarted

Hive may have applied its own overclock on top. Make sure the overclock is cleared in the panel and check /status.

Disclaimer

Terms of use. Read before installing.

  1. No warranty. The bot is provided "as is". The author does not guarantee that it fits your purposes, runs without interruption or is free of errors.
  2. Risk to hardware. The bot changes clock offsets, clock locks and power limits by itself and reboots the rig. This can cause unstable operation, dropped cards, overheating, accelerated wear or failure of GPUs, power supplies, risers and other hardware, loss of hashrate and income, loss of data, and loss of the manufacturer's warranty.
  3. You are responsible for the result. By installing and running the bot you accept all risks and all responsibility for any consequences of its operation, including direct and indirect losses and lost profit. The author and distributors are not liable for them to the extent permitted by law.
  4. What stays with you. Cooling, power, risers, temperatures and supervising the rig. PSU data (the /psu command) is entered by the owner and its accuracy is the owner's responsibility. Do the first runs while you are near the rig. Always check any preset before applying it, especially one from the catalog or from other people.
  5. Presets and catalog. During the trial, verified presets from your rig are submitted anonymously (no rig name, card UUIDs or IP) to the shared catalog; this is a condition of the trial and cannot be turned off during it. With a purchased key you can turn sharing off at any time with /share off. Catalog presets are submitted by third-party users. They do not fit every card or rig, are not verified by the author and come without any warranty.
  6. Third-party software. HiveOS, the NVIDIA driver, miners (including rgminer), pools and Telegram are developed by third parties and are not affiliated with the author of the bot. Their names belong to their owners. You comply with their licenses and terms of use yourself.
  7. Access and data. The Telegram token and, if you enable catalog publishing, the GitHub token are stored in the config on your rig. Keeping them safe is on you: do not publish them or paste them into chats. The catalog contains no card UUIDs or rig names, but you are the one who publishes it.
  8. Law. You are responsible for complying with the laws of your country (mining, electricity, taxes, etc.) and for making sure that using the bot does not breach warranty or other obligations to third parties.
  9. Changes. Functionality and these terms may change. The current version is always on this page.
  10. Acceptance. If you do not agree with these terms, do not install the bot; if it is already installed, remove it with --uninstall --yes.