Home
A multi-arch docker image for running a bitcoin-core daemon (including wallet).
Bitcoin Core is a reference client that implements the Bitcoin protocol for remote procedure call (RPC) use.
Learn more about Bitcoin development at the bitcoin dev guide.
Learn more about Bitcoin Core development in the docs folder of the Github repository
Learn more about this docker image at:
- Docker Hub Repository: https://hub.docker.com/repository/docker/barneybuffet/bitcoin-core
 - Documentation: https://BarneyBuffet.github.io/docker-bitcoin-core
 - Source Code Repository: https://github.com/BarneyBuffet/docker-bitcoin-core
 
What does this image do?
This runs a Ubuntu server for the bitcoin-core daemon with wallet. The image does not include the gui.
The dockerfile for this image does the following:
- Download pre-compiled binaries from https://bitcoincore.org/bin/
 - Verify binary download against developer keys
 - Install dependencies
 - Add nonroot user to container
 - Create data folders
 - Copy download binaries into /usr/local
 - Copy rpcauth, entrypoint and health check scripts to /usr/local
 - Copy blank 
bitcoin.confto/bitcoin/bitcoin.confand template out based on environmental settings - Start the container
 
Using this image
Given the current (Sep 2021) size of the blockchain (~450Gb) it is best if this image is run with persistent volumes. For most people this will be docker volume that you bind to you local machine storage.
To run a detached docker container with no env settings enter the below command.
docker run -d  --it \
  --name bitcoin-core \
  -v /local/path/to/bitcoin:/bitcoin \
  barneybuffet/bitcoin-core:latest
For more complicated configurations check the docker-compose folder.
Bitcoin core configuration
This image persists the Bitcoin core configuration the /bitcoin/bitcoin.conf file. The /bitcoin folder can be mounted -v /local/path/to/bitcoin:/bitcoin and the file changed with a text editor, after which the changes are persisted with the next reset of the container. Otherwise you can set you configuration options using docker environmental variables on the first run of the container or if /bitcoin/bitcoin.conf is deleted or the env variable CONFIG_OVERWRITE=true set.
For a full list of environmental variables used to template the configuration can be found inenvironmental documentation page
Checking it is working
To check the server is running open a terminal window within your running container and run the following command:
bitcoin-cli getblockchaininfo
When “bitcoind” is still starting, you may get an error message like “verifying blocks”. That’s normal, just give it a few minutes.
Among other infos, the “verificationprogress” is shown. Once this value reaches almost 1 (0.999…), the blockchain is up-to-date and fully validated.
To confirm your connections to the network, check active connections with the below command:
bitcoin-cli getconnectioncount 
Check your node on https://bitnodes.earn.com