This repository allows you run a full bitcoin network. You can run the cluster
in three modes, mainnet, regtest and testnet by linking docker-compose.override.yml
to different files. Communication of JSON-RPC is protected by stunnel
.
- To run this you need both
docker
anddocker-compose
. It was tested on a clean Ubuntu 16.04 with the docker-ce package from Docker. - Create the following bind mounts for data persistence:
/mnt/bitcoin/cluster/1
/mnt/bitcoin/cluster/2
/mnt/bitcoin/cluster/3
Link specific docker-compose file to docker-compose.override.yml
, then simply
run docker-compose up
to start all the containers. This will start the
bitcoin nodes, and expose RPC on all of them. The nodes will run on the
following ports:
Node | P2P port * | RPC port * | RPC Username | RPC Password |
---|---|---|---|---|
master | 18500 | 18400 | bitcoin | bitcoin |
node2 | 18501 | 18401 | bitcoin | bitcoin |
node3 | 18502 | 18402 | bitcoin | bitcoin |
ln -sf docker-compose.mainnet.yml docker-compose.override.yml
docker-compose up
ln -sf docker-compose.testnet.yml docker-compose.override.yml
docker-compose up
Mode | P2P port | RPC port |
---|---|---|
regtest | 18444 | 18443 |
testnet | 18333 | 18332 |
mainnet | 8333 | 8332 |
Mode | JSON-RPC over SSL |
---|---|
regtest | 28443 |
testnet | 28332 |
mainnet | 18332 |