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:latest
Store 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:latest
Store 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:latest
git 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 -d
Example .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=8332
Available 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.conf
Default: false
WALLET_ENABLE=Y
Config script will automatically create default_wallet
wallet, since bitcoind do not auto create wallets anymore.
Default: mainnet
Possible values: testnet, signet, regtest
NETWORK=mainnet
Default: false
RPC_ENABLE=Y
Default: bitcoinrpc
RPC_USER=user
Default: automatically generated, and will be printed to console
RPC_PASSWORD=pa$$word
Default: none
RPC_PORT=8332
Default: false
TXINDEX_ENABLE=Y
For 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:9050
Default: 125
MAX_CONNECTIONS=30
Simple steps to upgrade to new version of the docker image:
docker compose down \
&& docker compose pull \
&& docker compose up