Main goal of this project is to dockerize blockchain nodes so we could run them in pure DevOps fashion: dockerized, cluster-ready, manageable.
This is a dockerized built from sources bitcoin node.
docker run -d -p 8332:8332 -p 8333:8333 --restart unless-stopped ghcr.io/xorde/bitcoin-node:latestStore all settings and blockchain outside docker container:
docker run -d --name bitcoin-node -v /data/bitcoin:/home/bitcoin/.bitcoin -p 8332:8332 -p 8333:8333 --restart always -e "ENABLE_WALLET=1" -e "RPC_SERVER=1" ghcr.io/xorde/bitcoin-node:latestStore all settings and blockchain outside docker container and run node on testnet:
docker run -d --name bitcoin-node -v /data1/bitcoin:/home/bitcoin/.bitcoin -p 8332:8332 -p 8333:8333 --restart always -e "TESTNET=1" -e "RPC_SERVER=1" ghcr.io/xorde/bitcoin-node:latestgit clone https://github.com/xorde-nodes/bitcoin-node.git
cd bitcoin-node
cp example.env .env
# now please edit .env file to your choice, save it, and continue:
# you can skip editing .env file, and leave it unchanged
# as it is pre-configured to run on testnet
docker compose up -dExample .env:
WALLET_ENABLE=1
NETWORK=testnet
MAX_CONNECTIONS=50
RPC_ENABLE=1
RPC_USER=rpc-user
RPC_PASSWORD=rpc-password
RPC_ALLOW=0.0.0.0/0
PORT=8333
RPC_PORT=8332Available environment variables (to use with docker "-e" argument):
Default: ${HOME}/.bitcoin/bitcoin.conf
Please note, that startup sequence scripts will create specified config file if it doesn't exist
CONFIG_FILE=/path/bitcoin.confDefault: false
WALLET_ENABLE=YConfig script will automatically create default_wallet wallet, since bitcoind do not auto create wallets anymore.
Default: mainnet
Possible values: testnet, signet, regtest
NETWORK=mainnetDefault: false
RPC_ENABLE=YDefault: bitcoinrpc
RPC_USER=userDefault: automatically generated, and will be printed to console
RPC_PASSWORD=pa$$wordDefault: none
RPC_PORT=8332Default: false
TXINDEX_ENABLE=YFor more info see this: https://bitcoin.stackexchange.com/questions/35707/what-are-pros-and-cons-of-txindex-option
Default: empty
SOCKS5_PROXY=127.0.0.1:9050Default: 125
MAX_CONNECTIONS=30Simple steps to upgrade to new version of the docker image:
docker compose down \
&& docker compose pull \
&& docker compose up