{"id":22096545,"url":"https://github.com/uphold/docker-bitcoin-gold","last_synced_at":"2025-09-10T21:38:27.761Z","repository":{"id":71675799,"uuid":"112223308","full_name":"uphold/docker-bitcoin-gold","owner":"uphold","description":"A Bitcoin Gold docker image.","archived":false,"fork":false,"pushed_at":"2024-03-26T17:20:34.000Z","size":21,"stargazers_count":8,"open_issues_count":2,"forks_count":4,"subscribers_count":57,"default_branch":"master","last_synced_at":"2025-03-24T00:57:38.903Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/uphold.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2017-11-27T16:55:56.000Z","updated_at":"2024-08-12T19:34:21.000Z","dependencies_parsed_at":"2024-03-26T18:42:26.605Z","dependency_job_id":null,"html_url":"https://github.com/uphold/docker-bitcoin-gold","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fdocker-bitcoin-gold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fdocker-bitcoin-gold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fdocker-bitcoin-gold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fdocker-bitcoin-gold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uphold","download_url":"https://codeload.github.com/uphold/docker-bitcoin-gold/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125613,"owners_count":21051770,"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","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-12-01T04:11:34.216Z","updated_at":"2025-04-09T23:10:19.109Z","avatar_url":"https://github.com/uphold.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uphold/bitcoin-gold\n\nA Bitcoin Gold docker image.\n\n[![uphold/bitcoin-gold][docker-pulls-image]][docker-hub-url] [![uphold/bitcoin-gold][docker-stars-image]][docker-hub-url] [![uphold/bitcoin-gold][docker-size-image]][docker-hub-url] [![uphold/bitcoin-gold][docker-layers-image]][docker-hub-url]\n\n## Tags\n\n- `0.17.3-alpine`, `0.17-alpine`, `alpine`, `latest` ([0.17/alpine/Dockerfile](https://github.com/uphold/docker-bitcoin-gold/blob/master/0.17/alpine/Dockerfile))\n- `0.17.3`, `0.17`  ([0.17/Dockerfile](https://github.com/uphold/docker-bitcoin-gold/blob/master/0.17/Dockerfile))\n- `0.15.2-alpine`, `0.15-alpine`, `alpine`, `latest` ([0.15/alpine/Dockerfile](https://github.com/uphold/docker-bitcoin-gold/blob/master/0.15/alpine/Dockerfile))\n- `0.15.2`, `0.15`  ([0.15/Dockerfile](https://github.com/uphold/docker-bitcoin-gold/blob/master/0.15/Dockerfile))\n\n## What is Bitcoin Gold?\n\nBitcoin Gold is a fork of the Bitcoin blockchain. At block 491407, Bitcoin Gold miners began creating blocks with a new proof-of-work algorithm, and this caused a bifurcation of the Bitcoin blockchain. The new branch is a distinct blockchain with the same transaction history as Bitcoin up until the fork, but then diverges from it. As a result of this process, a new cryptocurrency was born. Learn more about [Bitcoin Gold](https://bitcoingold.org).\n\n## Usage\n\n### How to use this image\n\nThis image contains the main binaries from the Bitcoin Gold project - `bgoldd`, `bgold-cli` and `bitcoin-tx`. It behaves like a binary, so you can pass any arguments to the image and they will be forwarded to the `bgoldd` binary:\n\n```sh\n❯ docker run --rm -it uphold/bitcoin-gold \\\n  -printtoconsole \\\n  -regtest=1 \\\n  -rpcallowip=172.17.0.0/16 \\\n  -rpcpassword=bar \\\n  -rpcuser=foo\n```\n\nBy default, `bgoldd` will run as user `bitcoingold` for security reasons and with its default data dir (`~/.bitcoingold/`). If you'd like to customize where `bitcoin-gold` stores its data, you must use the `BITCOIN_GOLD_DATA` environment variable. The directory will be automatically created with the correct permissions for the `bitcoingold` user and `bitcoin-gold` automatically configured to use it.\n\n```sh\n❯ docker run --env BITCOIN_GOLD_DATA=/var/lib/bgold --rm -it uphold/bitcoin-gold \\\n  -printtoconsole \\\n  -regtest=1\n```\n\nYou can also mount a directory it in a volume under `/home/bitcoingold/.bitcoingold` in case you want to access it on the host:\n\n```sh\n❯ docker run -v ${PWD}/data:/home/bitcoingold/.bitcoingold -it --rm uphold/bitcoin-gold \\\n  -printtoconsole \\\n  -regtest=1\n```\n\nYou can optionally create a service using `docker-compose`:\n\n```yml\nbitcoin-gold:\n  image: uphold/bitcoin-gold\n  command:\n    -printtoconsole\n    -regtest=1\n```\n\n### Using RPC to interact with the daemon\n\nThere are two communications methods to interact with a running Bitcoin Gold daemon.\n\nThe first one is using a cookie-based local authentication. It doesn't require any special authentication information as running a process locally under the same user that was used to launch the Bitcoin Gold daemon allows it to read the cookie file previously generated by the daemon for clients. The downside of this method is that it requires local machine access.\n\nThe second option is making a remote procedure call using a username and password combination. This has the advantage of not requiring local machine access, but in order to keep your credentials safe you should use the newer `rpcauth` authentication mechanism.\n\n#### Using cookie-based local authentication\n\nStart by launching the Bitcoin Gold daemon:\n\n```sh\n❯ docker run --rm --name bitcoin-gold-server -it uphold/bitcoin-gold \\\n  -printtoconsole \\\n  -regtest=1\n```\n\nThen, inside the running `bitcoin-gold-server` container, locally execute the query to the daemon using `bgold-cli`:\n\n```sh\n❯ docker exec --user bitcoingold bitcoin-gold-server bgold-cli -regtest getmininginfo\n\n{\n  \"blocks\": 0,\n  \"currentblocksize\": 0,\n  \"currentblockweight\": 0,\n  \"currentblocktx\": 0,\n  \"difficulty\": 4.656542373906925e-10,\n  \"errors\": \"\",\n  \"networkhashps\": 0,\n  \"pooledtx\": 0,\n  \"chain\": \"regtest\"\n}\n```\n\nIn the background, `bgold-cli` read the information automatically from `/home/bitcoingold/.bitcoingold/regtest/.cookie`. In production, the path would not contain the regtest part.\n\n#### Using rpcauth for remote authentication\n\nBefore setting up remote authentication, you will need to generate the `rpcauth` line that will hold the credentials for the Bitcoin Gold daemon. You can either do this yourself by constructing the line with the format `\u003cuser\u003e:\u003csalt\u003e$\u003chash\u003e` or use the official `rpcuser.py` script to generate this line for you, including a random password that is printed to the console.\n\nExample:\n\n```sh\n❯ curl -sSL https://raw.githubusercontent.com/BTCGPU/BTCGPU/master/share/rpcuser/rpcuser.py | python - \u003cusername\u003e\n\nString to be appended to bitcoin.conf:\nrpcauth=foo:7d9ba5ae63c3d4dc30583ff4fe65a67e$9e3634e81c11659e3de036d0bf88f89cd169c1039e6e09607562d54765c649cc\nYour password:\nqDDZdeQ5vw9XXFeVnXT4PZ--tGN2xNjjR4nrtyszZx0=\n```\n\nNote that for each run, even if the username remains the same, the output will be always different as a new salt and password are generated.\n\nNow that you have your credentials, you need to start the Bitcoin Gold daemon with the `-rpcauth` option. Alternatively, you could append the line to a `bitcoin.conf` file and mount it on the container.\n\nLet's opt for the Docker way:\n\n```sh\n❯ docker run --rm --name bitcoin-gold-server -it uphold/bitcoin-gold \\\n  -printtoconsole \\\n  -regtest=1 \\\n  -rpcallowip=172.17.0.0/16 \\\n  -rpcauth='foo:e1fcea9fb59df8b0388f251984fe85$26431097d48c5b6047df8dee64f387f63835c01a2a463728ad75087d0133b8e6'\n```\n\nTwo important notes:\n\n1. Some shells require escaping the rpcauth line (e.g. zsh), as shown above.\n2. It is now perfectly fine to pass the rpcauth line as a command line argument. Unlike `-rpcpassword`, the content is hashed so even if the arguments would be exposed, they would not allow the attacker to get the actual password.\n\nYou can now connect via `bgold-cli` or any other [compatible client](https://github.com/uphold/bitcoin-gold). You will still have to define a username and password when connecting to the Bitcoin Gold RPC server.\n\nTo avoid any confusion about whether or not a remote call is being made, let's spin up another container to execute `bgold-cli` and connect it via the Docker network using the password generated above:\n\n```sh\n❯ docker run --link bitcoin-gold-server --rm uphold/bitcoin-gold bgold-cli -rpcconnect=bitcoin-gold-server -regtest -rpcuser=foo -rpcpassword='j1DuzF7QRUp-iSXjgewO9T_WT1Qgrtz_XWOHCMn_O-Y=' getmininginfo\n\n{\n  \"blocks\": 0,\n  \"currentblocksize\": 0,\n  \"currentblockweight\": 0,\n  \"currentblocktx\": 0,\n  \"difficulty\": 4.656542373906925e-10,\n  \"errors\": \"\",\n  \"networkhashps\": 0,\n  \"pooledtx\": 0,\n  \"chain\": \"regtest\"\n}\n```\n\nDone!\n\n## Images\n\nThe `uphold/bitcoin-gold` image comes in multiple flavors:\n\n### `uphold/bitcoin-gold:latest`\n\nPoints to the latest release available of Bitcoin Gold. Occasionally pre-release versions will be included.\n\n### `uphold/bitcoin-gold:\u003cversion\u003e`\n\nBased on a slim Debian image, targets a specific version branch or release of Bitcoin Gold.\n\n### `uphold/bitcoin-gold:\u003cversion\u003e-alpine`\n\nBased on Alpine Linux with Berkeley DB 4.8 (cross-compatible build), targets a specific version branch or release of Bitcoin Gold.\n\n## Supported Docker versions\n\nThis image is officially supported on Docker version 17.09.0-ce, with support for older versions provided on a best-effort basis.\n\n## License\n\n[License information](https://github.com/BTCGPU/BTCGPU/blob/master/COPYING) for the software contained in this image.\n\n[License information](https://github.com/uphold/docker-bitcoin-gold/blob/master/LICENSE) for the [uphold/bitcoin-gold][docker-hub-url] docker project.\n\n[docker-hub-url]: https://hub.docker.com/r/uphold/bitcoin-gold\n[docker-layers-image]: https://img.shields.io/imagelayers/layers/uphold/bitcoin-gold/latest.svg?style=flat-square\n[docker-pulls-image]: https://img.shields.io/docker/pulls/uphold/bitcoin-gold.svg?style=flat-square\n[docker-size-image]: https://img.shields.io/imagelayers/image-size/uphold/bitcoin-gold/latest.svg?style=flat-square\n[docker-stars-image]: https://img.shields.io/docker/stars/uphold/bitcoin-gold.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fdocker-bitcoin-gold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuphold%2Fdocker-bitcoin-gold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fdocker-bitcoin-gold/lists"}