Docker node - bitcoin-black-bcb/btcb GitHub Wiki
The fastest way to set up a Btcb node is via a docker container from DockerHub. You'll need a semi-recent version of Docker, Client Version ~ 1.5.0.
https://docs.docker.com/engine/installation
docker pull btcbcurrency/btcbdocker pull btcbcurrency/btcb-betadocker run -d -p 7075:7075/udp -p 7075:7075 -p [::1]:7076:7076 -v ~:/root --restart=unless-stopped btcbcurrency/btcbdocker run -d -p 54000:54000/udp -p 54000:54000 -p [::1]:55000:55000 -v ~:/root --restart=unless-stopped btcbcurrency/btcb-betaThis command:
- Starts the docker container as a daemon
-d - Maps the network activity port
-p 7075:7075/udp - Maps the bootstrapping TCP port
-p 7075:7075 - Maps the RPC control port to the local adapter only
-p [::1]:7076:7076 - Maps the host's home directory to the guest /root directory
~:/root - Restarts the container if it crashes
--restart=unless-stopped - Specifies the container to execute (
btcbcurrency/btcbfor the Live networkbtcbcurrency/btcb-betafor the Beta network)
This will put the data in a permanent location in your hosts's home directory, outside the docker container.
If you get Error starting userland proxy: port is not a proto:IP:port: 'tcp:[:'. or want to expose IPv4 port, use -p 127.0.0.1:7076:7076.
If you get create ~: volume name is too short, names should be at least two alphanumeric characters. replace the ~ with the full pathname such as /Users/someuser.
You'll need the container ID for the following commands. You can get it with docker ps e.g. d9416b274092. Replace <CONTAINERID> with that ID.
First create a new wallet:
docker exec <CONTAINERID> /usr/bin/btcb_node --wallet_createYou should get a wallet ID which you need in the next step.
docker exec <CONTAINERID> /usr/bin/btcb_node --account_create --wallet=<WALLETID>You get a new Btcb address starting with bcb_1234… back.
To get your seed execute:
docker exec <CONTAINERID> /usr/bin/btcb_node --wallet_decrypt_unsafe --wallet=<WALLETID>More information about the wallet backup is available here: Wallet Backups
You can use the RPC interface on the local host via curl.
For example the version of the node:
curl -d '{ "action" : "version" }' [::1]:7076Or the blockcount:
curl -d '{ "action" : "block_count" }' [::1]:7076All available RPC commands are listed here: RPC protocol
To update your container you need to rebuild it.
Make sure that you have your seed backup up!
First stop your old container:
docker stop <CONTAINERID>Then remove it:
docker rm <CONTAINERID>Then pull the new image and run the image just like you did at first start.
You can find reference material for using docker here: https://docs.docker.com/engine/reference/commandline/
You can create a custom name for your container at the docker runcommand by adding e.g. --name btcbnode.
Once set up, using bashrc to create an alias can save you time.
For example (when btcbnode is the name your docker container):
docker exec btcbnode /usr/bin/btcb_node --diagnostics
Can be shortened to:
btcb-node --diagnostics
By editing ~/.bashrc to add the alias:
alias btcb-node='docker exec btcbnode /usr/bin/btcb_node'