Bitcoin Signet provides a sandboxed environment for Bitcoin, allowing developers and testers to simulate the Bitcoin network without the risks associated with the main or test networks. This Docker image facilitates the deployment and configuration of a Signet node, offering a range of customizable options through environment variables.
Versions prior to 29.0 were using BDB wallet, system will automaticly update your wallet to new descriptor format.
PRIVKEY
prior to 29.0 was a WIF, now is descriptor on new wallets.
BLOCKPRODUCTIONDELAY
: Sleep period between mining blocks. Defaults to a specified value. (mining mode only)- If
~/.bitcoin/BLOCKPRODUCTIONDELAY.txt
is present, this value will be used, allowing dynamic changes.
- If
MINERENABLED
: Flag to enable the mining chain. (mining mode only)NBITS
: Sets the minimum difficulty in mining. (mining mode only)PRIVKEY
: Private key of the Signet signer. IfMINERENABLED=1
and not provided, it will be generated. (mining mode only)PRIVKEY_MODE
:descriptor
- provide descriptors (wallets from >=v29.0) orlegacy
- provide WIF (method used prior to <v29.0 to init signet challenge)MINETO
: Address to mine to. If not provided, a new address will be generated for each block. (mining mode only)SIGNETCHALLENGE
: Sets the valid block producer for this Signet. Required for client-mode.- If
MINERENABLED=1
and not provided, it will be generated. If provided,PRIVKEY
must also be populated. CHAIN_TIP_AGE
: 7200s (2hrs), will not start miner until chain-tip timestamp vs local is <= this value, allows things to sync up before trying to mine bad blacks.MINE_GENESIS
: set to 1 if you are starting a new chain, will mine first block so passesCHAIN_TIP_AGE
check.
RPCUSER
: bitcoind RPC User.RPCPASSWORD
: bitcoind RPC password.RPCTHREADS
: # of work threads (default 16)RPCSERVERTIMEOUT
: RPC timeout (default 600s)RPCWORKQUEUE
: RPC queue lenght (50)
ONIONPROXY
: Tor SOCK5 endpoint.TORPASSWORD
: Tor control port password.TORCONTROL
: Tor control port endpoint.I2PSAM
: I2P control endpoint.UACOMMENT
: UA Comment displayed onbitcoin-cli -netinfo
printout.
ZMQPUBRAWBLOCK
: bitcoind setting.ZMQPUBRAWTX
: bitcoind setting.ZMQPUBHASHBLOCK
: bitcoind setting.
RPCBIND
: bitcoind setting.RPCALLOWIP
: bitcoind setting.WHITELIST
: bitcoind setting.ADDNODE
: Add seeding node location. Use comma-separation for multiple nodes. Needed for client-mode.EXTERNAL_IP
: Add public IP/onion endpoint information. Use comma-separation for multiple IPs.
-
Building the Docker Image:
docker build -t bitcoin-signet .
-
Running the Docker Image:
docker run -d --name bitcoin-signet-instance bitcoin-signet
Note: Ensure you have Docker installed and running on your machine before executing the above commands. Adjust configurations as needed for your specific use case.
To make the most out of the Bitcoin Signet Docker image, here are some essential Docker commands:
-
View running containers:
docker ps
-
View all containers (including stopped ones):
docker ps -a
-
Stop a running container:
docker stop bitcoin-signet-instance
-
Start a stopped container:
docker start bitcoin-signet-instance
-
Remove a container:
docker rm bitcoin-signet-instance
-
View logs of a container:
docker logs bitcoin-signet-instance
-
Execute a command inside a running container:
docker exec -it bitcoin-signet-instance /bin/bash
-
Pull the latest version of the image:
docker pull bitcoin-signet
-
Remove an image:
docker rmi bitcoin-signet
-
View all Docker images:
docker images
Remember to replace bitcoin-signet-instance
with the name of your container if you've named it differently.
This project is licensed under the terms of the MIT License.