To setup a new regtest network you have 2 main  options.

  • Use a docker Container
  • Manually Install a bitcoin full node.

Using a Docker Container

This is perhaps the easiest option if you are a regular docker user as there is no install, but you will still need to configure it as a regtest network.

The same configuration applies to the docker image as to the snap install below but the file locations will vary.

Manual Install

Again you have two options.

  • Install from Source
  • Install using Snap (Linux)

Currently I use a snap install as it is easier, and for a beginner then this is important  I will be covering a full manual install at a later date.

Snap Install on Linux

There is a Bitcoin snap package that you simply install via the Software manager on Ubuntu or the snap store manager on Linux mint.

bitcoin-core-snap-install

Once installed then you will have a bitcoin-qt icon on your desktop.

If you simply start Bitcoin by clicking on this icon then the software will start as a node on the mainnet network and attempt to synchronise the blockchain.

So before you start Bitcoin you will need to:

  1. Create the bitcoin.conf file if it doesn’t exist
  2. Edit the bitcoin.conf file to configure the software as a regtest node.

 

Install File Locations for Snap

The snap package manager place the Bitcoin core software files in  the ~/snap/bitcoin-core/common/.bitcoin folder and not the ~/.bitcoin folder.

Configuration File Settings for regtest

In the bitcoin.conf file, add the following lines:

regtest=1
server=1
rpcuser=<your_username>
rpcpassword=<your_password>

Replace <your_username> and <your_password> with the desired user name and password for RPC (Remote Procedure Call) authentication.

These credentials will be used to interact with the Bitcoin Core software via the API.

bitcoin-core-iconYou can now start Bitcoin by clicking on the desktop icon.

 

 

Remember that the Regtest network is local and isolated, so the coins and transactions created there have no value on the main Bitcoin network. It’s solely for testing and development purposes.

 

Related Resources and Tutorials

 

How to Set Up a Bitcoin Regtest Test Network

Post navigation


Leave a Reply

Your email address will not be published. Required fields are marked *