Learning objectives
- Understand what Bitcoin Core is and how it differs from wallets or Lightning nodes
- Install and configure bitcoind in regtest mode
- Use bitcoin-cli to connect, query, and control your node
- Set up a persistent Bitcoin Core environment for future modules
What is Bitcoin Core?
It is the reference implementation of the Bitcoin protocol. It includes:- bitcoind: the daemon that runs the full node
- bitcoin-cli: the command-line tool to interact with it
Unlike wallet apps or exchanges, Bitcoin Core gives you full control and visibility over the network.
Preparing your system
Dependencies:- Linux/macOS (Ubuntu preferred)
- 2–4GB RAM minimum
- Disk space: ~500MB for regtest; ~800GB+ for full mainnet node
- Use a clean VPS or local Linux machine
- Optional: Use Docker for sandboxing (we’ll cover later)
Downloading Bitcoin Core
Visit: https://bitcoincore.org/en/download/ Choose the binary for your OS (Linux, Mac, Windows). Verify the GPG signature (optional but best practice).Launching in Regtest mode
Regtest = “Regression Test” mode = your own private Bitcoin network.- Starts the node in the background
- Creates a local chain with zero blocks
- No external network connection required
Connecting via bitcoin-cli
Once the daemon is running, connect using:- Chain: regtest
- Blocks: 0
- Headers: 0
- VerificationProgress: 1.000000
Setting up a bitcoin.conf file (optional)
Located at ~/.bitcoin/bitcoin.confbitcoind as a daemon
By default, bitcoind runs in the foreground. To run it in the background (as a daemon), simply add the -daemon flag:- Start the Bitcoin Core node in regtest mode
- Fork it into the background so you can continue using the terminal
- Create and use the default data directory at ~/.bitcoin/regtest
Basic node health checks
After launching your node, verify it’s functioning properly with these checks: Check the blockchain state:blocks: should be 0 initiallyinitialblockdownload:trueuntil you mine the first block, thenfalsechain: should beregtest
- Version
- Local relay status
- Reachable networks (ipv4, ipv6, onion)
- Connection count (should be 0 in regtest)
Activity
Run this sequence:-
Start bitcoind in regtest mode.
-
Query the chain info with bitcoin-cli.
-
Generate your first block
Ensure to replace <your_address> with the actual address from getnewaddress
-
Confirm you now have spendable coins in your wallet with: