{"id":17052866,"url":"https://github.com/zquestz/docker-bitcoin","last_synced_at":"2025-08-31T08:42:22.693Z","repository":{"id":45996598,"uuid":"146132366","full_name":"zquestz/docker-bitcoin","owner":"zquestz","description":"Bitcoin Cash full node images for Docker.","archived":false,"fork":false,"pushed_at":"2024-12-30T03:03:56.000Z","size":359,"stargazers_count":79,"open_issues_count":1,"forks_count":22,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-08-30T14:58:11.364Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zquestz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["zquestz"]}},"created_at":"2018-08-25T21:58:04.000Z","updated_at":"2025-07-19T00:32:35.000Z","dependencies_parsed_at":"2023-12-14T05:26:15.833Z","dependency_job_id":"b0c09d1e-a081-4dbd-9689-6a004ef41e43","html_url":"https://github.com/zquestz/docker-bitcoin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zquestz/docker-bitcoin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zquestz%2Fdocker-bitcoin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zquestz%2Fdocker-bitcoin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zquestz%2Fdocker-bitcoin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zquestz%2Fdocker-bitcoin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zquestz","download_url":"https://codeload.github.com/zquestz/docker-bitcoin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zquestz%2Fdocker-bitcoin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272959404,"owners_count":25022056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T10:10:45.073Z","updated_at":"2025-08-31T08:42:22.634Z","avatar_url":"https://github.com/zquestz.png","language":"Dockerfile","funding_links":["https://github.com/sponsors/zquestz"],"categories":[],"sub_categories":[],"readme":"# Docker-Bitcoin\n\n[![Build Status](https://img.shields.io/travis/com/zquestz/docker-bitcoin.svg)](https://app.travis-ci.com/github/zquestz/docker-bitcoin)\n[![License](https://img.shields.io/github/license/zquestz/docker-bitcoin.svg)](https://github.com/zquestz/docker-bitcoin/blob/master/LICENSE)\n\nIncluded in this repo are docker images for the main Bitcoin Cash full nodes. This includes Bitcoin Cash Node and Bitcoin Unlimited. A huge thanks to Adrian Macneil, and his now unmaintained original [repository](https://github.com/amacneil/docker-bitcoin), which provided the base for this repo.\n\nThis Docker image provides `bitcoind`, `bitcoin-cli` and `bitcoin-tx` which can be used to run and interact with a bitcoin server.\n\nTo see the available versions/tags, please visit the appropriate pages on Docker Hub:\n\n* [Bitcoin Cash Node](https://hub.docker.com/r/zquestz/bitcoin-cash-node/)\n* [Bitcoin Unlimited](https://hub.docker.com/r/zquestz/bitcoin-unlimited/)\n\n### Usage\n\nTo run the latest version of Bitcoin Cash Node:\n\n```\n$ docker run zquestz/bitcoin-cash-node\n```\n\nTo run the latest version of Bitcoin Unlimited:\n\n```\n$ docker run zquestz/bitcoin-unlimited\n```\n\nTo run a container in the background, pass the `-d` option to `docker run`, and give your container a name for easy reference later:\n\n```\n$ docker run -d --rm --name bitcoind zquestz/bitcoin-cash-node\n```\n\nOnce you have the bitcoind service running in the background, you can show running containers:\n\n```\n$ docker ps\n```\n\nOr view the logs of a service:\n\n```\n$ docker logs -f bitcoind\n```\n\nTo stop and restart a running container:\n\n```\n$ docker stop bitcoind\n$ docker start bitcoind\n```\n\n### Configuring Bitcoin\n\nThe best method to configure the server is to pass arguments to the `bitcoind` command. For example, to run bitcoin-unlimited on the testnet:\n\n```\n$ docker run --name bitcoind-testnet zquestz/bitcoin-unlimited bitcoind -testnet\n```\n\nAlternatively, you can edit the `bitcoin.conf` file which is generated in your data directory (see below).\n\n### Data Volumes\n\nBy default, Docker will create ephemeral containers. That is, the blockchain data will not be persisted, and you will need to sync the blockchain from scratch each time you launch a container.\n\nTo keep your blockchain data between container restarts or upgrades, simply add the `-v` option to create a [data volume](https://docs.docker.com/engine/tutorials/dockervolumes/):\n\n```\n$ docker run -d --rm --name bitcoind -v bitcoin-data:/data zquestz/bitcoin-cash-node\n$ docker ps\n$ docker inspect bitcoin-data\n```\n\nAlternatively, you can map the data volume to a location on your host:\n\n```\n$ docker run -d --rm --name bitcoind -v \"$PWD/data:/data\" zquestz/bitcoin-cash-node\n$ ls -alh ./data\n```\n\n### Using bitcoin-cli\n\nBy default, Docker runs all containers on a private bridge network. This means that you are unable to access the RPC port (8332) necessary to run `bitcoin-cli` commands.\n\nThere are several methods to run `bitcoin-cli` against a running `bitcoind` container. The easiest is to simply let your `bitcoin-cli` container share networking with your `bitcoind` container:\n\n```\n$ docker run -d --rm --name bitcoind -v bitcoin-data:/data zquestz/bitcoin-cash-node\n$ docker run --rm --network container:bitcoind zquestz/bitcoin-cash-node bitcoin-cli getinfo\n```\n\nIf you plan on exposing the RPC port to multiple containers (for example, if you are developing an application which communicates with the RPC port directly), you probably want to consider creating a [user-defined network](https://docs.docker.com/engine/userguide/networking/). You can then use this network for both your `bitcoind` and `bitcoin-cli` containers, passing `-rpcconnect` to specify the hostname of your `bitcoind` container:\n\n```\n$ docker network create bitcoin\n$ docker run -d --rm --name bitcoind -v bitcoin-data:/data --network bitcoin zquestz/bitcoin-cash-node\n$ docker run --rm --network bitcoin zquestz/bitcoin-cash-node bitcoin-cli -rpcconnect=bitcoind getinfo\n```\n\n### Kubernetes Configs\n\nThe following directions will walk you through creating a BCH full node within GKE (Google Container Engine).\n\nBy default Bitcoin Cash Node is used, however this can be swapped for any other node quite easily.\n\nIf you wish to run another version of bitcoind, just change the image reference in `bitcoin-deployment.yml`. If you don't trust the pre-built images, build your own. =)\n\nSteps:\n1. Add a new blank disk on GCE called `bitcoin-data` that is 200GB. You can always expand it later.\n2. Save the following code snippets and place them in a new directory `kube`.\n3. Change the `rpcuser` and `rpcpass` values in `bitcoin-secrets.yml`. They are base64 encoded. To base64 a string, just run `echo -n SOMESTRING | base64`.\n4. Run `kubectl create -f /path/to/kube`\n5. Profit!\n\n#### bitcoin-deployment.yml\n```\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  namespace: default\n  labels:\n    service: bitcoin\n  name: bitcoin\nspec:\n  strategy:\n    type: Recreate\n  replicas: 1\n  selector:\n    matchLabels:\n      service: bitcoin\n  template:\n    metadata:\n      labels:\n        service: bitcoin\n    spec:\n      containers:\n      - env:\n        - name: BITCOIN_RPC_USER\n          valueFrom:\n            secretKeyRef:\n              name: bitcoin\n              key: rpcuser\n        - name: BITCOIN_RPC_PASSWORD\n          valueFrom:\n            secretKeyRef:\n              name: bitcoin\n              key: rpcpass\n        image: zquestz/bitcoin-cash-node\n        name: bitcoin\n        volumeMounts:\n          - mountPath: /data\n            name: bitcoin-data\n        resources:\n          requests:\n            memory: \"2Gi\"\n      restartPolicy: Always\n      volumes:\n        - name: bitcoin-data\n          gcePersistentDisk:\n            pdName: bitcoin-data\n            fsType: ext4\n```\n\n#### bitcoin-secrets.yml\n```\napiVersion: v1\nkind: Secret\nmetadata:\n  name: bitcoin\ntype: Opaque\ndata:\n  rpcuser: YWRtaW4=\n  rpcpass: aXRvbGR5b3V0b2NoYW5nZXRoaXM=\n```\n\n#### bitcoin-srv.yml\n```\napiVersion: v1\nkind: Service\nmetadata:\n  name: bitcoin\n  namespace: default\nspec:\n  ports:\n    - port: 8333\n      targetPort: 8333\n  selector:\n    service: bitcoin\n  type: LoadBalancer\n  externalTrafficPolicy: Local\n```\n\n### Complete Example\n\nFor a complete example of running a bitcoin node using Docker Compose, see the [Docker Compose example](/example#readme).\n\n### License\n\nConfiguration files and code in this repository are distributed under the [MIT license](/LICENSE).\n\n### Contributing\n\nAll files are generated from templates in the root of this repository. Please do not edit any of the generated Dockerfiles directly.\n\n* To add a new version, update [versions.yml](/versions.yml), then run `make update`.\n* To make a change to the Dockerfile which affects all current and historical versions, edit [Dockerfile.erb](/Dockerfile.erb) then run `make update`.\n\nIf you would like to build and test containers for all versions (similar to what happens in CI), run `make`. If you would like to build and test all containers for a specific node, run `BRANCH=node make`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzquestz%2Fdocker-bitcoin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzquestz%2Fdocker-bitcoin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzquestz%2Fdocker-bitcoin/lists"}