Skip to content

Run a Bitgold node with Docker

Resources

The Bitgold node image is published through the official Bitgold Network distribution channels. Check www.bitgold.network for the current image name and tag, and use it wherever ${BITGOLD_IMAGE} appears below.

Supported platforms

Docker runs the Bitgold node on Linux, macOS, and Windows (Docker Desktop on macOS and Windows).

Install Docker

Post-install steps:

systemctl enable docker.service
systemctl enable containerd.service
usermod -aG docker ubuntu

Pull the Bitgold node image

docker pull ${BITGOLD_IMAGE}

Prepare config files

Download genesis.json and config.toml for the network you want to join (mainnet or testnet) from the official Bitgold Network distribution channel, and place them in a local config/ directory.

Run the container

  1. Environment and file locations used by the image:
BITGOLD_HOME=/bitgold
DATA_DIR=/data
  • Config: ${BITGOLD_HOME}/config/config.toml
  • Genesis: ${BITGOLD_HOME}/config/genesis.json

  • Mounts:

Mount Host Container
Blockchain data data/node /bitgold/node
Config files config /bitgold/config
  1. Start the container:
docker run -v $(pwd)/config:/bitgold/config -v $(pwd)/data/node:/bitgold/node \
  -p 8575:8575 --rm --name bitgold -it ${BITGOLD_IMAGE} \
  --http.addr 0.0.0.0 --http.port 8575 --http.vhosts '*' \
  --verbosity 5 --history.logs 576000

Note: Consider adding --history.logs.disable for better performance, but eth_getLogs will be slower.

  • -p 8575:8575 maps the RPC port from the container to the host.
  • --http --http.addr 0.0.0.0 enables RPC and listens on all container interfaces.

NOTE: port 8575 is the default RPC port for testnet; mainnet uses 8545.

Open a Geth console

geth attach http://localhost:8575

Access the container

docker exec -it bitgold bash

Check node status

Check sync status:

geth attach ipc:node/geth.ipc
> eth.syncing

Check logs:

tail -f node/geth.log