Guide

Pools, failover, SOCKS5 and the farm proxy

Backup pools that switch back on their own, mining through SOCKS5, and one pool connection for a whole farm.

A pool line is three things: where, who, and what. This guide is about everything around that — backup pools and how failover behaves, TLS and passwords, routing everything through a SOCKS5 proxy, and the farm proxy that puts thirty rigs behind one pool connection.

A pool, and the flags that go with it

./bzminer -a xelis -p stratum+ssl://us.vipor.net:5177 -w xel:YOUR_WALLET --worker rig1 --pass x
  • -p (also --pool, --url) is the pool URL. stratum+ssl:// is TLS, stratum+tcp:// is plain, and a bare host:port means plain. -p is the pool, not the password, as it was in bzminer 1.x.
  • -w is the wallet and --worker the rig’s name. bzminer joins them as wallet.worker for the login — or wallet/worker for Kryptex, which wants that form. Do not put the worker in the wallet yourself, unless the pool wants a shape bzminer does not build, in which case -u sends a login verbatim.
  • --pass is the password. Most pools ignore it and x is conventional; MoneroOcean reads an algorithm pin out of it.
  • --ssl-verify checks the pool’s certificate chain and hostname on a TLS pool. Off by default, because mining pools self-sign and let certificates lapse; the connection is encrypted either way.

Press u in the console at any time to see every configured pool with its wallet, worker and password, in failover order.

Backups and failover

List as many pools as you like. The first is primary and the rest are backups: bzminer connects to the primary, and on a disconnect rotates through the others until one answers.

./bzminer -a xelis \
  -p stratum+ssl://main-pool:5177   -w xel:YOUR_WALLET --worker rig1 \
  -p stratum+ssl://backup-pool:5177 -w xel:YOUR_WALLET --worker rig1

Each -p starts a new pool, and the flags after it belong to that pool. Anything you put before the first one applies to all of them, so a single -a xelis covers the list.

It comes home on its own. A failed primary is re-probed every five minutes on a second, independent connection that does the real subscribe and authorise — so a pool whose TCP is up but whose stratum is broken is never switched to — and when it verifies, that already-live connection is promoted in place. No reconnect, no gap; the backup keeps mining right up to the switch.

The same in config.txt:

{
  "pools": [
    { "url": "stratum+ssl://main-pool:5177",   "wallet": "xel:YOUR_WALLET", "worker": "rig1", "algo": "xelis" },
    { "url": "stratum+ssl://backup-pool:5177", "wallet": "xel:YOUR_WALLET", "worker": "rig1", "algo": "xelis" }
  ]
}

Backups must be the same algorithm as the primary; one that is not is skipped with a warning. "pool": 0 picks one entry out of the list, "pool": [0, 2] runs a chosen subset, "pool": [] is monitoring mode, and omitting it gives you all of them. On the command line that is --pool 1.

Through a SOCKS5 proxy

One flag covers every outbound connection bzminer makes: your pools, the dev-fee pools, and plugin downloads alike.

./bzminer -a xelis -p stratum+ssl://us.vipor.net:5177 -w xel:YOUR_WALLET \
  --proxy socks5://127.0.0.1:1080

# with authentication
--proxy socks5://user:password@proxy.example.net:1080

In config.txt it is network.proxy. The proxy is applied before the TLS wrap, so it covers plain and TLS pools identically, and the proxy resolves the pool hostname — no DNS lookup for the pool leaves the machine. It does not touch the web dashboard, which is a listening socket rather than an outbound one.

Note

--proxy and --proxy_port are different things. The first routes this rig’s outbound connections through a SOCKS5 server. The second, below, makes this rig a server for other rigs.

The farm proxy: one pool connection for every rig

One bzminer holds the pool connection for an algorithm and serves the work to every other bzminer on your network. They mine the same jobs, and their shares go upstream over that one connection, so the pool sees one worker for the whole farm and the rigs need no route to the internet of their own.

   rig01 --bzproxy://10.0.0.5:4100--+
                                    |   +---------------------+
   rig02 --bzproxy://10.0.0.5:4100--+-->|  bzminer  10.0.0.5  |
                                    |   |  --proxy_port 4100  |
   rig03 --bzproxy://10.0.0.5:4100--+   +---------------------+
                                                   |
                                        one stratum connection,
                                            one worker name
                                                   v
                                                  pool

Why

  • One connection, one login. Pools cap and rate-limit connections per address, and thirty rigs reconnecting at once after a power cut is the kind of thing that earns a site a temporary ban.
  • The rigs need no internet. Only the proxy does. Each rig’s dev fee is tunnelled through the proxy too, so the mining rigs can sit on a network with no gateway at all.
  • The whole farm on one screen. Every connected rig is a light-blue row in the proxy’s tables, device page and dashboard, with its own shares, credited rate, hashrate, power and hottest card, and its own device rows to drill into.
  • Share attribution stays per-rig, and the farm pays the dev fee in one window instead of each rig at its own hour.

How

On the proxy — an ordinary bzminer with one extra flag. It can mine on its own devices too, or on none:

# mines too, and serves the farm on port 4100
./bzminer -a pearl -p stratum+tcp://pool:3333 -w <wallet> --worker farm --proxy_port 4100

# only proxies: no GPU, and for a CPU algorithm no CPU either
./bzminer -a randomx -p stratum+tcp://pool:3333 -w <wallet> --worker farm \
  --proxy_port 4199 --devices none --cpu 0

Those two flags are rig-wide. On a rig that mines one algorithm itself and only proxies another, give the proxied algorithm’s number instead: --devices2 none keeps algorithm 2 off every device here, CPU included, and algorithm 1 is untouched. See which devices mine which algorithm.

./bzminer -a pearl,randomx --p1 <pearl pool> --w1 <wallet> \
  --p2 stratum+tcp://pool:3333 --w2 <wallet> --proxy_port2 4199 --devices2 none

On each rig — the proxy instead of a pool, with the real pool behind it as a backup so the rig fails over on its own if the proxy goes away:

./bzminer -a pearl -p bzproxy://10.0.0.5:4100 -p stratum+tcp://pool:3333 -w <wallet> --worker rig01

A worker needs no wallet for the proxy leg — payout is the proxy’s pool connection — but it needs one for the backup pool. start_proxy_<algo> and start_worker_<algo> in your download are these two lines, filled in.

FlagWhereWhat
--proxy_port<N> <port>proxyServe algorithm N’s work on this port. pools[].proxy_port in config. 0 = off
--proxy_bind <addr>proxyWhich interface the listener binds. Default 0.0.0.0
--proxy_pass <pass>proxyPassword a rig must present as its --pass. Empty accepts anything that can reach the port
--devices noneproxyKeep every GPU out of the run, rig-wide; add --cpu 0 for a CPU algorithm
--devices<N> noneproxyProxy algorithm N without mining it here, CPU included; the rig’s other algorithms keep their devices. "devices": "none" on its pools[] entry in config.txt
-p bzproxy://<host>:<port>rigMine through the proxy
--worker <name>rigThe rig’s name in the proxy’s tables
--pass <pass>rigMust match the proxy’s --proxy_pass if it set one

Worth knowing

  • Set --proxy_pass unless the port is on a private LAN. The port is TLS and a rig will only talk to a genuine bzminer, but that authenticates the proxy to the rig, not the other way round. Without a password, anything that can reach the port can mine on your connection.
  • Both ends must be on the same algorithm and the same bzminer version; a mismatch is refused with a log line saying what the proxy serves.
  • Up to 63 rigs per proxy. A rig that drops keeps its row for a minute, so it is seen to have dropped rather than silently vanishing.
  • Nonce ranges are partitioned automatically, so two rigs never search the same nonces on the one connection.
  • The dev fee is never the proxy’s to take. Each rig keeps its own schedule and pays through a tunnel the proxy carries but cannot read or redirect.
  • Per-rig statistics live in the proxy, not at the pool — that is the price of the pool seeing one worker.

Separately from all this, and needing none of it, every bzminer on a LAN appears in every other’s Farm tab.

Solo mining

For Pearl, Warthog and XELIS, -p can point at your own node instead of a pool — a node’s RPC URL for Pearl (http://127.0.0.1:3000 for a Warthog node, or its stratum port), a WebSocket for XELIS (ws://127.0.0.1:8080). Rewards arrive as whole blocks. Each coin’s guide has the exact line.

Problems

  • Backup pool never used. It is a different algorithm from the primary, and was skipped with a warning at startup.
  • Certificate error on a TLS pool. --ssl-verify is on and the pool self-signs. Turn it off for that pool.
  • A rig will not connect to the proxy. Different version, different algorithm, or a --proxy_pass it did not present. The proxy’s log names which.
  • Kryptex shows all rigs as one. The worker was written into the wallet with a dot. Use -w and --worker separately and bzminer sends the slash Kryptex wants.