BITCOIND(1)

πŸ“¦ version 0.18.0, in nixpkgs unstable

🌸 NAME 🌸

bitcoind β€” manual page for bitcoind v0.21.2.0. Welcome to the BITCOIND(1) era, bestie πŸ’– this is the main-character manual page for the Bitcoin Core daemon.


✨ SYNOPSIS ✨

bitcoind [options]                     Start Bitcoin Core

πŸ¦‹ DESCRIPTION πŸ¦‹

Bitcoin Core version v0.21.2.0. That’s the vibe. No cap.


πŸ’… OPTIONS πŸ’…

Okay so here’s the full option menu, and yes we’re going through all of it. Grab a strawberry drink πŸ“ and let’s go.

  • -? β€” Print this help message and exit. Short, sweet, iconic.
  • -alertnotify=<cmd> β€” Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message).
  • -assumevalid=<hex> β€” If this block is in the chain, assume that it and its ancestors are valid and potentially skip their script verification (0 to verify all). Defaults are: mainnet 0000000000000000000b9d2ec5a352ecba0592946514a92f14319dc2b367fc72, testnet 000000000000006433d1efec504c53ca332b64963c425395515b01977bd7b3b0, signet 0000002a1de0f46379358c1fd09906f7ac59adf3712323ed90eb59e4c183c020.
  • -blockfilterindex=<type> β€” Maintain an index of compact filters by block (default: 0, values: basic). If <type> is not supplied or if <type> = 1, indexes for all known types are enabled.
  • -blocknotify=<cmd> β€” Execute command when the best block changes (%s in cmd is replaced by block hash).
  • -blockreconstructionextratxn=<n> β€” Extra transactions to keep in memory for compact block reconstructions (default: 100).
  • -blocksdir=<dir> β€” Specify directory to hold blocks subdirectory for *.dat files (default: <datadir>).
  • -blocksonly β€” Whether to reject transactions from network peers. Automatic broadcast and rebroadcast of any transactions from inbound peers is disabled, unless the peer has the 'forcerelay' permission. RPC transactions are not affected. (default: 0).
  • -conf=<file> β€” Specify path to read-only configuration file. Relative paths will be prefixed by datadir location. (default: bitcoin.conf).
  • -daemon β€” Run in the background as a daemon and accept commands. Main character background-process energy.
  • -datadir=<dir> β€” Specify data directory.
  • -dbcache=<n> β€” Maximum database cache size <n> MiB (4 to 16384, default: 450). In addition, unused mempool memory is shared for this cache (see -maxmempool).
  • -debuglogfile=<file> β€” Specify location of debug log file. Relative paths will be prefixed by a net-specific datadir location. (-nodebuglogfile to disable; default: debug.log).
  • -includeconf=<file> β€” Specify additional configuration file, relative to the -datadir path (only useable from configuration file, not command line).
  • -loadblock=<file> β€” Imports blocks from external file on startup.
  • -maxmempool=<n> β€” Keep the transaction memory pool below <n> megabytes (default: 300).
  • -maxorphantx=<n> β€” Keep at most <n> unconnectable transactions in memory (default: 100).
  • -mempoolexpiry=<n> β€” Do not keep transactions in the mempool longer than <n> hours (default: 336).
  • -par=<n> β€” Set the number of script verification threads (-6 to 15, 0 = auto, <0 = leave that many cores free, default: 0).
  • -persistmempool β€” Whether to save the mempool on shutdown and load on restart (default: 1).
  • -pid=<file> β€” Specify pid file. Relative paths will be prefixed by a net-specific datadir location. (default: bitcoind.pid).
  • -prune=<n> β€” Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks, and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex and -rescan. Warning: reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >=550 = automatically prune block files to stay under the specified target size in MiB).
  • -reindex β€” Rebuild chain state and block index from the blk*.dat files on disk.
  • -reindex-chainstate β€” Rebuild chain state from the currently indexed blocks. When in pruning mode or if blocks on disk might be corrupted, use full -reindex instead.
  • -settings=<file> β€” Specify path to dynamic settings data file. Can be disabled with -nosettings. File is written at runtime and not meant to be edited by users (use bitcoin.conf instead for custom settings). Relative paths will be prefixed by datadir location. (default: settings.json).
  • -startupnotify=<cmd> β€” Execute command on startup.
  • -sysperms β€” Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality).
  • -txindex β€” Maintain a full transaction index, used by the getrawtransaction rpc call (default: 0).
  • -version β€” Print version and exit.

🌈 Connection options 🌈

This is the networking section, and it’s giving very plugged-in πŸ’…βœ¨

  • -addnode=<ip> β€” Add a node to connect to and attempt to keep the connection open (see the addnode RPC command help for more info). This option can be specified multiple times to add multiple nodes.
  • -asmap=<file> β€” Specify asn mapping used for bucketing of the peers (default: ip_asn.map). Relative paths will be prefixed by the net-specific datadir location.
  • -bantime=<n> β€” Default duration (in seconds) of manually configured bans (default: 86400).
  • -bind=<addr>[:<port>][=onion] β€” Bind to given address and always listen on it (default: 0.0.0.0). Use [host]:port notation for IPv6. Append =onion to tag any incoming connections to that address and port as incoming Tor connections (default: 127.0.0.1:8334=onion, testnet: 127.0.0.1:18334=onion, signet: 127.0.0.1:38334=onion, regtest: 127.0.0.1:18445=onion).
  • -connect=<ip> β€” Connect only to the specified node; -noconnect disables automatic connections (the rules for this peer are the same as for -addnode). This option can be specified multiple times to connect to multiple nodes.
  • -discover β€” Discover own IP addresses (default: 1 when listening and no -externalip or -proxy).
  • -dns β€” Allow DNS lookups for -addnode, -seednode and -connect (default: 1).
  • -dnsseed β€” Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect used).
  • -externalip=<ip> β€” Specify your own public address.
  • -forcednsseed β€” Always query for peer addresses via DNS lookup (default: 0).
  • -listen β€” Accept connections from outside (default: 1 if no -proxy or -connect).
  • -listenonion β€” Automatically create Tor onion service (default: 1).
  • -maxconnections=<n> β€” Maintain at most <n> connections to peers (default: 125).
  • -maxreceivebuffer=<n> β€” Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000).
  • -maxsendbuffer=<n> β€” Maximum per-connection send buffer, <n>*1000 bytes (default: 1000).
  • -maxtimeadjustment β€” Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: 4200 seconds).
  • -maxuploadtarget=<n> β€” Tries to keep outbound traffic under the given target (in MiB per 24h). Limit does not apply to peers with 'download' permission. 0 = no limit (default: 0).
  • -networkactive β€” Enable all P2P network activity (default: 1). Can be changed by the setnetworkactive RPC command.
  • -onion=<ip:port> β€” Use separate SOCKS5 proxy to reach peers via Tor onion services, set -noonion to disable (default: -proxy).
  • -onlynet=<net> β€” Make outgoing connections only through network <net> (ipv4, ipv6 or onion). Incoming connections are not affected by this option. This option can be specified multiple times to allow multiple networks.
  • -peerblockfilters β€” Serve compact block filters to peers per BIP 157 (default: 0).
  • -peerbloomfilters β€” Support filtering of blocks and transaction with bloom filters (default: 0).
  • -permitbaremultisig β€” Relay non-P2SH multisig (default: 1).
  • -port=<port> β€” Listen for connections on <port>. Nodes not using the default ports (default: 8333, testnet: 18333, signet: 38333, regtest: 18444) are unlikely to get incoming connections.
  • -proxy=<ip:port> β€” Connect through SOCKS5 proxy, set -noproxy to disable (default: disabled).
  • -proxyrandomize β€” Randomize credentials for every proxy connection. This enables Tor stream isolation (default: 1).
  • -seednode=<ip> β€” Connect to a node to retrieve peer addresses, and disconnect. This option can be specified multiple times to connect to multiple nodes.
  • -timeout=<n> β€” Specify connection timeout in milliseconds (minimum: 1, default: 5000).
  • -torcontrol=<ip>:<port> β€” Tor control port to use if onion listening enabled (default: 127.0.0.1:9051).
  • -torpassword=<pass> β€” Tor control port password (default: empty).
  • -upnp β€” Use UPnP to map the listening port (default: 0).
  • -whitebind=<[permissions@]addr> β€” Bind to the given address and add permission flags to the peers connecting to it. Use [host]:port notation for IPv6. Allowed permissions: bloomfilter (allow requesting BIP37 filtered blocks and transactions), noban (do not ban for misbehavior; implies download), forcerelay (relay transactions that are already in the mempool; implies relay), relay (relay even in -blocksonly mode, and unlimited transaction announcements), mempool (allow requesting BIP35 mempool contents), download (allow getheaders during IBD, no disconnect after maxuploadtarget limit), addr (responses to GETADDR avoid hitting the cache and contain random records with the most up-to-date info). Specify multiple permissions separated by commas (default: download,noban,mempool,relay). Can be specified multiple times.
  • -whitelist=<[permissions@]IP address or network> β€” Add permission flags to the peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR-notated network (e.g. 1.2.3.0/24). Uses the same permissions as -whitebind. Can be specified multiple times.

πŸŽ€ Wallet options πŸŽ€

  • -addresstype
  • -addresstype β€” tells your wallet what flavor of address to make: "legacy", "p2sh-segwit", or "bech32". Default is "bech32" because we're modern like that πŸ’…
  • -avoidpartialspends β€” okay so this one groups outputs by address and selects them all-or-nothing instead of picking per-output. Privacy goes πŸ“ˆ because an address only gets used once (unless someone sends to it after you've spent from it). But ngl it might cost you slightly more in fees, since the extra limitation can make coin selection suboptimal. Default: 0 (and it's always enabled for wallets that have "avoid_reuse" turned on) 🫢
  • -changetype β€” what type of change to use: "legacy", "p2sh-segwit", or "bech32". Default is the same as -addresstype, except when -addresstype=p2sh-segwit, in which case a native segwit output is used when you're sending to a native segwit address. Iconic little exception, honestly ✨
  • -disablewallet β€” do not load the wallet, and disable wallet RPC calls. That's it, wallet's in time-out πŸ’€
  • -discardfee=<amt> β€” the fee rate (in BTC/kB) that says how much you tolerate discarding change by just adding it to the fee. Default: 0.0001. Heads up πŸ“’ an output gets discarded if it's dust at this rate, but we always discard up to the dust relay fee, and any discard fee above that is limited by the fee estimate for the longest target.
  • -fallbackfee=<amt> β€” a fee rate (in BTC/kB) used when fee estimation doesn't have enough data. Set it to 0 to entirely disable the fallbackfee feature. Default: 0.00 πŸ“
  • -keypool=<n> β€” set the key pool size to <n>. Default: 1000. > ⚠️ Warning bestie: smaller sizes may increase the risk of losing funds when restoring from an old backup, if none of the addresses in the original keypool have been used. Like, actually read that one twice 😭
  • -maxapsfee=<n> β€” spend up to this amount in additional (absolute) fees, in BTC, if it unlocks partial spend avoidance. Default: 0.00 πŸ’Έ
  • -mintxfee=<amt> β€” fees (in BTC/kB) smaller than this are treated as zero fee when creating transactions. Default: 0.00001
  • -paytxfee=<amt> β€” fee (in BTC/kB) to add to the transactions you send. Default: 0.00 πŸŽ€
  • -rescan β€” rescan the block chain for missing wallet transactions on startup. Very "let me just double-check the whole entire blockchain real quick" of it πŸ”
  • -spendzeroconfchange β€” spend unconfirmed change when sending transactions. Default: 1 πŸ™ˆ
  • -txconfirmtarget=<n> β€” if paytxfee isn't set, include enough fee that transactions begin confirmation on average within n blocks. Default: 6 ⏳
  • -wallet=<path> β€” specify the wallet path to load at startup. You can use this multiple times to load multiple wallets, because some of us are polygamous with wallets πŸ’… The path points to a directory containing wallet data and log files. If the path isn't absolute, it's interpreted relative to <walletdir>. This only loads existing wallets and does not create new ones. For backwards compatibility it also accepts names of existing top-level data files in <walletdir>. Slay for not breaking old setups.
  • -walletbroadcast β€” make the wallet broadcast transactions. Default: 1 πŸ“‘
  • -walletdir=<dir> β€” specify the directory to hold wallets. Default: <datadir>/wallets if it exists, otherwise <datadir>. πŸ—‚οΈ
  • -walletnotify=<cmd> β€” execute command when a wallet transaction changes. %s in cmd gets replaced by the TxID, and %w gets replaced by the wallet name. Note 🧐: %w is not currently implemented on windows. On systems where %w is supported, it should NOT be quoted, because that would break the shell escaping used to invoke the command. Do not quote it. I'm serious. Periodt.
  • -walletrbf β€” send transactions with full-RBF opt-in enabled (RPC only, default: 0) 🚩

🌈 ZeroMQ notification options 🌈

  • -zmqpubhashblock=<address> β€” enable publish hash block in <address> πŸ“¦
  • -zmqpubhashblockhwm=<n> β€” set the publish hash block outbound message high water mark. Default: 1000
  • -zmqpubhashtx=<address> β€” enable publish hash transaction in <address> 🧾
  • -zmqpubhashtxhwm=<n> β€” set the publish hash transaction outbound message high water mark. Default: 1000
  • -zmqpubrawblock=<address> β€” enable publish raw block in <address> 🧱
  • -zmqpubrawblockhwm=<n> β€” set the publish raw block outbound message high water mark. Default: 1000
  • -zmqpubrawtx=<address> β€” enable publish raw transaction in <address> πŸ“œ
  • -zmqpubrawtxhwm=<n> β€” set the publish raw transaction outbound message high water mark. Default: 1000
  • -zmqpubsequence=<address> β€” enable publish hash block and tx sequence in <address> 🌊
  • -zmqpubsequencehwm=<n> β€” set the publish hash sequence message high water mark. Default: 1000

πŸ” Debugging/Testing options πŸ”

  • -debug=<category> β€” output debugging information. Default is -nodebug, and supplying <category> is optional. If <category> isn't supplied, or if <category> = 1, it outputs all debugging information. <category> can be: net, tor, mempool, http, bench, zmq, walletdb, rpc, estimatefee, addrman, selectcoins, reindex, cmpctblock, rand, prune, proxy, mempoolrej, libevent, coindb, qt, leveldb, validation. The whole alphabet of nerdy little categories, we love to see it 🧚
  • -debugexclude=<category> β€” exclude debugging information for a category. Can be used together with -debug=1 to output debug logs for all categories except one or more specified categories. It's giving "everyone's invited except these guys" 🚫
  • -help-debug β€” print help message with debugging options and exit. Sir, this is a help menu 🀲
  • -logips β€” include IP addresses in debug output. Default: 0
  • -logthreadnames β€” prepend debug output with the name of the originating thread (only available on platforms supporting thread_local). Default: 0 🧡
  • -logtimestamps β€” prepend debug output with a timestamp. Default: 1 ⏰
  • -maxtxfee=<amt> β€” maximum total fees (in BTC) to use in a single wallet transaction; setting this too low may abort large transactions. Default: 0.10 > ⚠️ yeah, too low and big transactions just give up. Choose wisely bestie 😬
  • -printtoconsole β€” send trace/debug info to the console. Default: 1 when there's no -daemon. To disable logging to file, set -nodebuglogfile πŸ–₯️
  • -shrinkdebugfile β€” shrink debug.log file on client startup. Default: 1 when there's no -debug 🀏
  • -uacomment=<cmt> β€” append a comment to the user agent string. Little signature on your node, cute πŸ’¬

⛓️ Chain selection options ⛓️

  • -chain=<chain> β€” use the chain <chain>. Default: main. Allowed values: main, test, signet, regtest 🌍
  • -signet β€” use the signet chain. Equivalent to -chain=signet. Note that the network is defined by the -signetchallenge parameter πŸ§ͺ
  • -signetchallenge β€” blocks must satisfy the given script to be considered valid (only for signet networks; defaults to the global default signet test network challenge) πŸ”
  • -signetseednode β€” specify a seed node for the signet network, in the hostname[:port] format, e.g. sig.net:1234 (may be used multiple times to specify multiple seed nodes; defaults to the global default signet test network seed node(s)) 🌱
  • -testnet β€” use the test chain. Equivalent to -chain=test. Go break stuff safely 🧸

πŸ“‘ Node relay options πŸ“‘

  • -bytespersigop β€” equivalent bytes per sigop in transactions for relay and mining. Default: 20
  • -datacarrier β€” relay and mine data carrier transactions. Default: 1 πŸ“¨
  • -datacarriersize β€” maximum size of data in data carrier transactions we relay and mine. Default: 83 πŸ“
  • -minrelaytxfee=<amt> β€” fees (in BTC/kB) smaller than this are considered zero fee for relaying, mining and transaction creation. Default: 0.00001 πŸͺ™
  • -whitelistforcerelay β€” add 'forcerelay' permission to whitelisted inbound peers with default permissions. This will relay transactions even if the transactions were already in the mempool. Default: 0 πŸ’ͺ
  • -whitelistrelay β€” add 'relay' permission to whitelisted inbound peers with default permissions. This will accept relayed transactions even when not relaying transactions. Default: 1 🫑

🧱 Block creation options 🧱

  • -blockmaxweight=<n> β€” set maximum BIP141 block weight. Default: 3996000 βš–οΈ
  • -blockmintxfee=<amt> β€” set the lowest fee rate (in BTC/kB) for transactions to be included in block creation. Default: 0.00001 πŸ—οΈ

πŸ”Œ RPC server options πŸ”Œ

  • -rest β€” accept public REST requests. Default: 0 🌐
  • -rpcallowip=<ip> β€” allow JSON-RPC connections from a specified source. Valid values for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times πŸ”“
  • -rpcauth=<userpw> β€” username and HMAC-SHA-256 hashed password for JSON-RPC connections. The field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is included in share/rpcauth. The client then connects normally using the rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This option can be specified multiple times 🐍
  • -rpcbind=<addr>[:port] β€” bind to the given address to listen for JSON-RPC connections. > 🚨 Do not expose the RPC server to untrusted networks such as the public internet! This option is ignored unless -rpcallowip is also passed. Port is optional and overrides -rpcport. Use [host]:port notation for IPv6. This option can be specified multiple times (default: 127.0.0.1 and ::1, i.e. localhost) 🏠
  • -rpccookiefile=<loc> β€” location of the auth cookie. Relative paths will be prefixed by a net-specific datadir location. (default: data dir) πŸͺ
  • -rpcpassword=<pw> β€” password for JSON-RPC connections πŸ”‘
  • -rpcport=<port> β€” listen for JSON-RPC connections on <port>. Default: 8332, testnet: 18332, signet: 38332, regtest: 18443 πŸšͺ
  • -rpcserialversion β€” sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1). Default: 1 🧬
  • -rpcthreads=<n> β€” set the number of threads to service RPC calls. Default: 4 🧢
  • -rpcuser=<user> β€” username for JSON-RPC connections πŸ‘€
  • -rpcwhitelist=<whitelist> β€” set a whitelist to filter incoming RPC calls for a specific user. The field <whitelist> comes in the format: <USERNAME>:<rpc 1>,<rpc 2>,...,<rpc n>. If multiple whitelists are set for a given user, they are set-intersected. See -rpcwhitelistdefault documentation for information on default whitelist behavior πŸ“‹
  • -rpcwhitelistdefault β€” 🫢 (bestie this one's description is literally cut off mid-sentence, so we're picking it back up in the next part β€” no spoilers, no cap)

So yeah, if you leave rpcwhitelistdefault alone (or don't set it to 0) and any -rpcwhitelist is set, the rpc server acts like every single rpc user is on an empty-unless-otherwise-specified whitelist β€” lowkey strict bestie hours. πŸ™ˆ

And if rpcwhitelistdefault is set to 1 and no -rpcwhitelist is set, the rpc server acts like all rpc users are subject to empty whitelists. Literally nobody gets in. It's giving velvet rope with no guest list. πŸ’…

  • -server β€” Accept command line and JSON-RPC commands ✨ (yes, this is the whole point of the whole thing, bestie)

Copyright (C) 2009-2020 The Bitcoin Core developers πŸ’–

Please contribute if you find Bitcoin Core useful β€” fr fr, they're asking nicely. Visit https://bitcoincore.org/ for further information about the software. The source code is available from https://github.com/bitcoin/bitcoin. 🫢

Heads up bestie: this is experimental software. Like, experimental experimental. Distributed under the MIT software license, see the accompanying file COPYING or https://opensource.org/licenses/MIT. πŸŽ€

And that's a wrap on the whole page, mwah πŸ’‹ This was bitcoind version v0.21.2.0, dated August 2021 β€” a true vintage icon, no cap. Go touch some blocks, stay hydrated, and remember: read the man page before you run the daemon 😭🌸

πŸ“¦ where this page comes from