LinuxCommandLibrary

bitcoind

Run Bitcoin Core daemon

TLDR

Start the Bitcoin Core daemon (in the foreground)

$ bitcoind
copy

Start the Bitcoin Core daemon in the background (use bitcoin-cli stop to stop)
$ bitcoind -daemon
copy

Start the Bitcoin Core daemon on a specific network
$ bitcoind -chain=[main|test|signet|regtest]
copy

Start the Bitcoin Core daemon using specific configuration file and data directory
$ bitcoind -conf=[path/to/bitcoin.conf] -datadir=[path/to/directory]
copy

SYNOPSIS

bitcoind [options]

PARAMETERS

-daemon
    Run in the background as daemon and disconnect from terminal

-conf=
    Specify path to configuration file (default: bitcoin.conf)

-datadir=


    Specify data directory for blockchain/wallet files

-testnet
    Use the test network

-regtest
    Enter regression test mode (local private blockchain)

-rpcuser=
    Username for JSON-RPC connections

-rpcpassword=
    Password for JSON-RPC connections

-rpcport=
    Port for JSON-RPC connections (default: 8332 mainnet)

-rpcallowip=
    Allow JSON-RPC from specific IP (default: deny remote)

-server
    Accept RPC commands (required for bitcoin-cli)

-rpcbind=[:port]
    Bind RPC server to address/port

-prune=
    Prune blockchain files to save disk space (n=550 default MB)

-txindex
    Maintain index of all transactions (large index file)

-blocksonly
    Do not relay/accept individual transactions

-help
    Print help message with all options

-version
    Print version information

-dbcache=
    Set database cache size in MB

-listen
    Accept connections from outside (default: bind to 0.0.0.0)

-maxconnections=
    Maximum number of inbound/outbound connections

DESCRIPTION

bitcoind is the command-line daemon of Bitcoin Core, the reference implementation for running a full Bitcoin node on Linux and other platforms.

It downloads, verifies, and maintains the entire Bitcoin blockchain, enabling users to validate transactions independently without trusting third parties. The daemon supports P2P networking for block and transaction propagation, optional mining, and a JSON-RPC interface for programmatic control via tools like bitcoin-cli.

Key features include wallet management, transaction signing/broadcasting, address generation, and advanced options like pruning for disk space savings or txindex for full transaction lookup. It operates in mainnet by default but supports testnet and regtest modes for development/testing.

Configuration occurs via command-line flags, a bitcoin.conf file, or RPC commands. Running bitcoind requires substantial resources: hundreds of GB disk space, ongoing bandwidth (up to GB/day initially), and CPU for validation. It's ideal for miners, exchanges, developers, or sovereignty-focused users but not lightweight clients.

Security is critical—expose RPC only locally or via secure setups. bitcoind enforces consensus rules, resisting chain forks unless activated by community upgrades like SegWit or Taproot.

CAVEATS

Requires 500+ GB disk, high bandwidth/CPU initially; secure RPC credentials to avoid theft; full sync takes days/weeks; pruning limits history queries.

CONFIGURATION FILE

Default at ~/.bitcoin/bitcoin.conf; supports sections [main], [test], [regtest]; overrides command-line flags.

RPC INTERFACE

JSON-RPC over HTTP; use bitcoin-cli or curl; methods like getblockchaininfo, sendrawtransaction.

DATA DIRECTORY

Contains blocks/, chainstate/, wallets/; customizable via -datadir; backup regularly.

HISTORY

Developed by Satoshi Nakamoto in 2009 as bitcoin/src/bitcoind; evolved into Bitcoin Core with community maintenance since 2010. Major versions track protocol upgrades (e.g., v0.21 BIP 340). Widely used in production despite alternatives like btcd.

SEE ALSO

bitcoin-cli(1), bitcoin-qt(1), bitcoin-wallet(1)

Copied to clipboard