Module 1: Installing & Running Bitcoin Core

Learning Objectives

By the end of this module, you will:

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

Lesson Outline

1

What Is Bitcoin Core?

It is the reference implementation of the Bitcoin protocol and it Includes:

Includes:

bitcoind: the daemon that runs the full node

bitcoin-cli: the command-line tool to interact with it

Note

Unlike wallet apps or exchanges, Bitcoin Core gives you full control and visibility over the network.


2

Preparing Your System

Dependencies:

Linux/macOS (Ubuntu preferred)

2–4GB RAM minimum

Disk space: ~500MB for regtest; ~500GB+ for full mainnet node

Recommended Setup:

Use a clean VPS or local Linux machine

Optional: Use Docker for sandboxing (we’ll cover later)


3

Downloading Bitcoin Core

Choose the binary for your OS (Linux, Mac, Windows).

Verify the GPG signature (optional but best practice).

Download and Install Bitcoin Core

4

Launching in Regtest Mode

Regtest = “Regression Test” mode = your own private Bitcoin network.

Start bitcoind in regtest mode

This:

Starts the node in the background

Creates a local chain with zero blocks

No external network connection required


5

Connecting via bitcoin-cli

Once the daemon is running, connect using:

Connect with bitcoin-cli

This should return JSON showing:

Chain: regtest

Blocks: 0

Headers: 0

VerificationProgress: 1.000000


6

Setting Up a bitcoin.conf File (Optional)

Located at ~/.bitcoin/bitcoin.conf

Example bitcoin.conf for regtest

Restart with:

Start bitcoind with a config file

7

bitcoind as a Daemon

By default, bitcoind runs in the foreground. To run it in the background (as a daemon), simply add the -daemon flag:

Run bitcoind as a daemon

This will:

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

You can always check whether it’s running with:

Check running processes

To stop the daemon gracefully:

Stop bitcoind

8

Basic Node Health Checks

After launching your node, verify it’s functioning properly with these checks:

Check the blockchain state:

Get blockchain info

Look for:

blocks: Should be 0 (initially)

initialblockdownload: Should be false

{text variant="highlight-01" weight="regular" %}chain: Should be regtest

Check your wallet:

List wallets

If you haven't created a wallet yet, it will return an empty list. You can create one with:

Create a wallet

Check node status:

Get network info

Version

Local relay status

Network type (regtest)

Connection count (should be 0 in regtest)

Check available RPC commands:

Get help for bitcoin-cli

This is useful to explore the full range of bitcoin-cli capabilities.

This shows:

Version

Local relay status

Network type (regtest)

Connection count (should be 0 in regtest)

Check available RPC commands:

Get help for bitcoin-cli

This is useful to explore the full range of bitcoin-cli capabilities.


Activity

Run this sequence:

1

Start bitcoind in regtest mode.

Start bitcoind for activity
2

Query the chain info with bitcoin-cli.

Query chain info
3

Generate your first block

Create wallet and mine blocks
Note

Ensure to replace <your_address> with the actual address from getnewaddress

4

Confirm you now have spendable coins in your wallet with:

Check balance

Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?