bitcoin.conf file (without the leading -).
Usage
Command-line options override values set in the configuration file, and configuration file options override values set in the GUI.
General Options
Print help message and exit
Print help message with all options and exit
Print version and exit
Specify path to read-only configuration file. Relative paths are prefixed by datadir location.
Specify data directory. Cannot be negated.
Specify path to dynamic settings data file. Can be disabled with
-nosettings.Specify PID file. Relative paths are prefixed by datadir location.
Chain Selection Options
Use the specified chain:
main, test, testnet4, signet, or regtestUse the test network (testnet3)
Use the testnet4 test network
Use the signet test network
Enter regression test mode, which uses a special chain for testing
Database Options
Maximum database cache size in MiB (minimum 4). Unused memory is shared with mempool.
Specify directory to hold blocks subdirectory for *.dat files
Maintain a full transaction index, used by the getrawtransaction RPC
Maintain a transaction output spender index, used by the gettxspendingprevout RPC
Maintain coinstats index used by the gettxoutsetinfo RPC
Maintain an index of compact filters for blocks. Supported types:
basicReduce storage by pruning old blocks. Value is target size in MiB (minimum 550). 0 = disable pruning.
Rebuild chain state and block index from block files on disk
Rebuild chain state from block index
Network Options
Accept connections from outside (default: 1 if no -proxy or -connect)
Listen for connections on specified port. Default: 8333 (mainnet), 18333 (testnet3), 18444 (testnet4), 38333 (signet), 18444 (regtest)
Bind to given address and always listen on it. Use [host]:port notation for IPv6.
Maintain at most this many connections to peers. Does not apply to manual connections via -addnode.
Add a node to connect to and attempt to keep the connection open. Can be specified multiple times.
Connect only to the specified node(s).
-noconnect disables automatic connections.Connect to a node to retrieve peer addresses, then disconnect. Can be specified multiple times.
Connect through SOCKS5 proxy. Format:
<ip:port|path>[=<network>]Use separate SOCKS5 proxy to reach peers via Tor onion services. Set
-noonion to disable.I2P SAM proxy to reach I2P peers and accept I2P connections
Make automatic outbound connections only to specified network. Can be specified multiple times. Values:
ipv4, ipv6, onion, i2p, cjdnsAllow DNS lookups for -addnode, -seednode and -connect
Query for peer addresses via DNS lookup if low on addresses
Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)
Specify your own public address
Keep outbound traffic under given target per 24h. 0 = no limit. Suffix units: k|K|m|M|g|G|t|T
Specify socket connection timeout in milliseconds (minimum: 1)
RPC Server Options
Accept command line and JSON-RPC commands
Accept public REST requests
Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6.
Listen for JSON-RPC connections on specified port. Default: 8332 (mainnet), 18332 (testnet3), 18443 (regtest)
Allow JSON-RPC connections from specified source. Can specify IP, network/netmask, or network/CIDR. Can be specified multiple times.
Username for JSON-RPC connections
Password for JSON-RPC connections
Username and HMAC-SHA-256 hashed password. Format:
<USERNAME>:<SALT>$<HASH>. Can be specified multiple times.Location of the auth cookie. Relative paths are prefixed by datadir location.
Set the number of threads to service RPC calls
Set the depth of the work queue to service RPC calls
Set a whitelist to filter incoming RPC calls. Format:
<USERNAME>:<rpc 1>,<rpc 2>,...Mempool Options
Keep the transaction memory pool below specified megabytes
Do not keep transactions in the mempool longer than specified hours
Whether to save the mempool on shutdown and load on restart
Reject transactions from network peers. Disables automatic broadcast and rebroadcast.
Transaction Relay Options
Fees (in BTC/kvB) smaller than this are considered zero fee for relaying, mining, and transaction creation
Relay and mine data carrier transactions
Maximum size of data-carrying raw scriptPubKeys to relay and mine
Notification Options
Execute command when the best block changes. %s in cmd is replaced by block hash.
Execute command when an alert is raised. %s in cmd is replaced by message.
Execute command on startup
Execute command immediately before beginning shutdown
ZeroMQ Options
ZeroMQ Publishing Options
ZeroMQ Publishing Options
Enable publish hash block in specified address
Enable publish hash transaction in specified address
Enable publish raw block in specified address
Enable publish raw transaction in specified address
Enable publish hash block and tx sequence in specified address
Debugging and Testing Options
Debug Options
Debug Options
Output debugging information. Can be specified multiple times. Categories:
net, tor, mempool, http, bench, zmq, walletdb, rpc, estimatefee, addrman, selectcoins, reindex, cmpctblock, rand, prune, proxy, mempoolrej, libevent, coindb, qt, leveldb, validation, i2p, ipcExclude debugging information for a category. Can be negated to exclude all debugging.
Include IP addresses in debug output
Prepend debug output with timestamp
Send trace/debug info to console instead of debug.log
Shrink debug.log file on client startup
Append comment to the user agent string
Daemon Options (Unix only)
Run in the background as a daemon and accept commands
Wait for initialization to be finished before exiting. Implies
-daemon.Example Usage
Start a Full Node with RPC
Start a Pruned Node
Start Testnet Node
Start with Custom Data Directory
Connect to Specific Peers Only
Notes
All command-line options (except
-?, -help, -version, and -conf) may be specified in the configuration file.See Also
- bitcoin.conf Configuration File - Configuration file format and options
- Data Directory Structure - File and directory layout