# Chia Network w/ Docker This makes using the Chia network very easy, especially via CLI as Chia have now moved to an electron app. Testing with beta-1.0b8-dev at time of writing. # Prerequisites ## Build the docker image ```sh docker build -t chia . ``` ## Set up ENV Set up a `.env` file, see `.env.example`. You'll want a fast drive for tmp, and a big drive for final. Worst case, just use the same drive. # Config An example `config.yaml` will be added soon, however here is a list of the modifications that need to be made. * Replace `127.0.0.1` with the appropriate host. Since each process runs as a container at a unique hostname (the service name), we need to direct traffic to the correct host. This is generally replacing the key `xxx_peer: 127.0.0.1` to `xxx_peer: xxx`, e.g. `farmer_peer: farmer` since the farmer will be available at the hostname `farmer`. * Set `start_rpc_server: false`. We don't need the rpc server, as it is designed to allow interprocess communication when everything is all running and hidden, and to manage services / processes. We interact directly by running and stopping docker containers instead. * Update `plots.yml` to change your local dir to the mounted dir, i.e. `/plots-final/plot-knn-yyyy-mm-dd-hh-MM-xxxxxxxxxx.dat`. # Running ## Init ```sh # Init your config docker-compose run init # Generate your keys docker-compose run generate_keys ``` ## Plots ```sh # Start Generating some Plots docker-compose up -d create_plots # Alternate invocation docker-compose up -d -e PLOT_K=30 -e PLOT_N=10 create_plots ``` ## Farming ```sh docker-compose up -d full_node docker-compose up -d farmer docker-compose up -d harvester ``` # TODO * `config.yml` with appropriate hosts and ports for running components internally