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.
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.
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:
- Create the bitcoin.conf file if it doesn’t exist
- 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
bitcoin.conf file, add the following lines:
<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.
You 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