Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
MINERD(1)		     General Commands Manual		       MINERD(1)

NAME
     minerd - CPU miner for Bitcoin and Litecoin

SYNOPSIS
     minerd [OPTION]...

DESCRIPTION
     minerd  is a multi-threaded CPU miner for Bitcoin, Litecoin and other cryp-
     tocurrencies.  It supports the getwork and getblocktemplate (BIP 22)  meth-
     ods, as well as the Stratum mining protocol.

     In its normal mode of operation, minerd connects to a mining server (speci-
     fied  with  the  -o  option), receives work from it and starts hashing.  As
     soon as a solution is found, it is submitted to  the  same  mining  server,
     which  can  accept  or  reject it.  When using getwork or getblocktemplate,
     minerd can take advantage of long polling, if the server  supports  it;  in
     any case, fresh work is fetched as needed.  When using the Stratum protocol
     this  is not possible, and the server is responsible for sending fresh work
     at least every minute; if it fails to do so, minerd may drop the connection
     and try reconnecting again.

     By default, minerd writes all its messages to standard error.   On  systems
     that have a syslog, the --syslog option can be used to write to it instead.

     On  start, the nice value of all miner threads is set to 19.  On Linux, the
     scheduling policy is also changed to SCHED_IDLE, or to SCHED_BATCH if  that
     fails.  On multiprocessor systems, minerd automatically sets the CPU affin-
     ity  of  miner threads if the number of threads is a multiple of the number
     of processors.

EXAMPLES
     To connect to a Litecoin mining pool that provides a Stratum server at  ex-
     ample.com on port 3333, authenticating as worker "foo" with password "bar":

	    minerd -o stratum+tcp://example.com:3333 -O foo:bar

     To  mine to a local Bitcoin testnet instance running on port 18332, authen-
     ticating with username "rpcuser" and password "rpcpass":

	    minerd -a sha256d -o http://localhost:18332 -O rpcuser:rpcpass \
		 --coinbase-addr=mpXwg4jMtRhuSpVq4xS3HFHmCmWp9NyGKt

     To connect to a Litecoin P2Pool node running on  my.server  on  port  9327,
     mining  in  the  background  and having output sent to the syslog facility,
     omitting the per-thread hashmeter output:

	    minerd -BSq -o http://my.server:9327

OPTIONS
     -a, --algo=ALGORITHM
	    Set the hashing algorithm to use.  Default is scrypt.  Possible val-
	    ues are:

		scrypt	  scrypt(1024, 1, 1) (used by Litecoin)

		scrypt:N  scrypt(N, 1, 1) (N must be a power of 2  greater  than
			  1)

		sha256d   SHA-256d (used by Bitcoin)

     --benchmark
	    Run in offline benchmark mode.

     -B, --background
	    Run in the background as a daemon.

     --cert=FILE
	    Set  an  SSL  certificate  to use with the mining server.  Only sup-
	    ported when using the HTTPS protocol.

     --coinbase-addr=ADDRESS
	    Set a payout address for solo mining.  This is  only  used	in  get-
	    blocktemplate  mode, and only if the server does not provide a coin-
	    base transaction.  It can be either a base-58 address, or  a  bech32
	    address (BIP 173).

     --coinbase-sig=TEXT
	    Set  a  string  to	be  included  in the coinbase (if allowed by the
	    server).  This is only used in getblocktemplate mode.

     -c, --config=FILE
	    Load options from a configuration file.  FILE must	contain  a  JSON
	    object  mapping  long options to their arguments (as strings), or to
	    true if no argument is required.  Sample configuration file:

		 {
		      "url": "stratum+tcp://example.com:3333",
		      "userpass": "foo:bar",
		      "retry-pause": "10",
		      "quiet": true
		 }

     -D, --debug
	    Enable debug output.

     -h, --help
	    Print a help message and exit.

     --no-gbt
	    Do not use the getblocktemplate RPC method.

     --no-getwork
	    Do not use the getwork RPC method.

     --no-longpoll
	    Do not use long polling.

     --no-redirect
	    Ignore requests from the server to switch to a different URL.

     --no-stratum
	    Do not switch to Stratum, even if the server advertises support  for
	    it.

     -o, --url=[SCHEME://][USERNAME[:PASSWORD]@]HOST:PORT[/PATH]
	    Set  the  URL of the mining server to connect to.  Supported schemes
	    are http, https, stratum+tcp and  stratum+tcps.   If  no  scheme  is
	    specified, http is assumed.  Specifying a PATH is only supported for
	    HTTP and HTTPS.  Specifying credentials has the same effect as using
	    the -O option.

	    By	default, on HTTP and HTTPS, the miner tries to use the getblock-
	    template RPC method, and falls back to using getwork if getblocktem-
	    plate is unavailable.  This behavior can be modified  by  using  the
	    --no-gbt and --no-getwork options.

     -O, --userpass=USERNAME:PASSWORD
	    Set the credentials to use for connecting to the mining server.  Any
	    value previously set with -u or -p is discarded.

     -p, --pass=PASSWORD
	    Set  the  password	to use for connecting to the mining server.  Any
	    password previously set with -O is discarded.

     -P, --protocol-dump
	    Enable output of all protocol-level activities.

     -q, --quiet
	    Disable per-thread hashmeter output.

     -r, --retries=N
	    Set the maximum number of times to retry if a  network  call  fails.
	    If not specified, the miner will retry indefinitely.

     -R, --retry-pause=SECONDS
	    Set how long to wait between retries. Default is 30 seconds.

     -s, --scantime=SECONDS
	    Set  an  upper  bound  on the time the miner can go without fetching
	    fresh work.  This setting has no effect in Stratum mode or when long
	    polling is activated.  Default is 5 seconds.

     -S, --syslog
	    Log to the syslog facility instead of standard error.

     -t, --threads=N
	    Set the number of miner threads.  If not specified, the  miner  will
	    try to detect the number of available processors and use that.

     -T, --timeout=SECONDS
	    Set a timeout for long polling.

     -u, --user=USERNAME
	    Set  the  username	to use for connecting to the mining server.  Any
	    username previously set with -O is discarded.

     -V, --version
	    Display version information and quit.

     -x, --proxy=[SCHEME://][USERNAME:PASSWORD@]HOST:PORT
	    Connect to the mining server through  a  proxy.   Supported  schemes
	    are:  http, socks4, socks5.  Since libcurl 7.18.0, the following are
	    also supported: socks4a, socks5h (SOCKS5 with  remote  name  resolv-
	    ing).   If	no  scheme is specified, the proxy is treated as an HTTP
	    proxy.

ENVIRONMENT
     The following environment variables can be specified in lower case or upper
     case; the lower-case version has precedence. http_proxy is an exception  as
     it is only available in lower case.

	    http_proxy [SCHEME://]HOST:PORT
		   Sets the proxy server to use for HTTP.

	    HTTPS_PROXY [SCHEME://]HOST:PORT
		   Sets the proxy server to use for HTTPS.

	    ALL_PROXY [SCHEME://]HOST:PORT
		   Sets the proxy server to use if no protocol-specific proxy is
		   set.

     Using an environment variable to set the proxy has the same effect as using
     the -x option.

AUTHOR
     Most  of  the  code  in the current version of minerd was written by Pooler
     <pooler@litecoinpool.org> with contributions from others.

     The original minerd was written by Jeff Garzik <jeff@garzik.org>.

cpuminer 2.5.1			    June 2020			       MINERD(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=minerd&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help