Bitcoin Regtest
This page provides information on installing and running bitcoin core in regtest mode.
Step 1: Install Bitcoin Core
Follow the installation instructions for your operating system provided on the Bitcoin Core download page.
To verify the installation: Open a terminal or command prompt and verify that bitcoind
and bitcoin-cli
are installed correctly:
bitcoind --version
bitcoin-cli --version
Step2: Configure and start Bitcoin Core
Ensure that the Bitcoin data directory exists. The default locations for different operating systems are:
- Linux: ~/.bitcoin/
- macOS: ~/Library/Application\ Support/Bitcoin/
- Windows: %APPDATA%\Bitcoin\
Create or edit the bitcoin.conf
file in the Bitcoin data directory and add the following configuration to enable regtest, your own local network. The contents of the bitcoin.conf
file should be:
regtest=1
server=1
rpcuser=user
rpcpassword=pass
rpcallowip=127.0.0.1
fallbackfee=0.00003
paytxfee=0.00003
listen=1
txindex=1
You can replace user
and pass
with your desired username and password (in which case you will have to change these values for each validator and user of this demo — this documentation will guide you).
Start Bitcoin Core daemon:
bitcoind --printtoconsole
To verify bitcoind is running:
bitcoin-cli getblockchaininfo
The output should show the chain
as regtest
.
Last updated