Source: https://github.com/lryanuk/chiadog-docker
This repo has been deprecated as the original maintainer now supports linux/arm64 docker builds. Please use https://hub.docker.com/r/artjacobson/chiadog-docker going forwards.
This repo provides a basic Docker image that can be used to run the Chiadog monitoring daemon for Chia. This repo was originally created by Art Jacobson, all credit to them.
It is recommended to store the Chiadog config.yaml
in persistent storage outside of the Docker container. Chiadog will also need access to the chia-blockchain
logs at INFO
level.
In this example the optional flags mount a persistent directory for Chiadog configuration at /root/.chiadog
and it provides read-only access to Chia logs in the normal location. Your Chia keys are not visable to this container.
docker pull lryanuk/chiadog-docker:latest
docker run --name <container-name> -d lryanuk/chiadog-docker:latest
(optional -v /path/to/config_dir:/root/.chiadog -v path-to-chia-logs:/root/.chia/mainnet/log:ro)
If Chia is also running in a container, sharing a volume between the chia-docker
and chiadog-docker
can be done instead of sharing an absolute path on the host machine.
docker volume create chia-home
docker run --name <container-name> -d lryanuk/chiadog-docker:latest -v chia-home:/root/.chia:ro
docker run --name <container-name> -d ghcr.io/chia-network/chia:latest -v chia-home:/root/.chia <additional args for keys and plots>
version: "3"
services:
chiadog:
container_name: chiadog
image: lryanuk/chiadog-docker:latest
volumes:
- ./config:/root/.chiadog
- /path/to/chia/log:/root/.chia/mainnet/log:ro
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
Ensure that the directory mounted for /root/.chiadog
includes a config.yaml
.
The path to config.yaml
can be passed via the config_dir
environment variable. Ensure that your config.yaml
is on a persistent volume, and the file_log_consumer
has been configured with a correct absolute path within the container.
The timezone can also be set via the TZ
environment variable. A list of available timezones can be found here.
-e config_dir="/root/.chiadog/config.yaml" -e TZ="America/Chicago"
Provided that the configuration is on a persistent volume, updating can be done by deleting the container, fetching the latest image, and relaunching it with the appropriate arguments.
docker stop <container-name>
docker rm <container-name>
docker pull lryanuk/chiadog-docker:latest
docker run --name <container-name> -d lryanuk/chiadog-docker:latest -v /path/to/config_dir:/root/.chiadog -v path-to-chia-logs:/root/.chia/mainnet/log:ro -e config_dir="/root/.chiadog/config.yaml"
docker-compose pull && docker-compose up -d