-
Notifications
You must be signed in to change notification settings - Fork 70
Docker
The project is still in beta, join the Discord for support and to help out.
2021-06-19: Use test image ghcr.io/guydavis/machinaris:test
for MadMax and Workers, full release version coming soon...
As Machinaris is a pure-Docker solution for running the Chia™ either as full-node, farmer-only, harvester-only, or plotter-only, the following general guidelines for Docker's run
command are generally applicable. However, we have platform-specific guides for Windows, Linux, MacOS, Unraid, Portainer, and others.
The following guide covers a standalone install on a single machine.
Machinaris also supports monitoring and controlling multiple worker installs on your local-area-network.
You'll need a recent Docker installed.
Most users will want to run a full-node with all components started. If you are running a distributed setup, see the other modes below. Details on differences can be found in this architecture overview.
docker run -d --name='machinaris' -p 8444:8444 -p 8926:8926 -e TZ="America/Edmonton" -v '/home/USER/.machinaris':'/root/.chia':'rw' -v '/path/to/plots':'/plots':'rw' -v '/path/to/temp':'/plotting':'rw' -t 'ghcr.io/guydavis/machinaris'
Change the following host paths and variables highlighted in bold, before running the command above:
- /home/USER/.machinaris: Will hold the application data, config, and logs for Chia, Plotman, and Machinaris.
- /path/to/plots: Will hold the finished plot files after plotting and when farming.
- /path/to/temp: Should be your fast temporary plotting space.
- America/Edmonton: Change to your local timezone.
This will pull the Machinaris image from Docker Hub and launch it on your system in the background. Browse to http://localhost:8926 to view the WebUI. To stop Machinaris container, you can run docker rm machinaris
or similar.
Here's an example config for use with Docker Compose, if you prefer that to docker run
:
machinaris:
container_name: machinaris
image: ghcr.io/guydavis/machinaris
restart: always
tty: true
ports:
- "8444:8444"
- "8926:8926"
volumes:
- "/home/USER/.machinaris:/root/.chia:rw"
- "/path/to/plotting:/plotting:rw"
- "/path/to/plots:/plots:rw"
environment:
- TZ=$TZ
As above, change the following host paths and variables highlighted in bold, before running the command above:
- /home/USER/.machinaris: Will hold the application data, config, and logs for Chia, Plotman, and Machinaris.
- /path/to/plots: Will hold the finished plot files after plotting and when farming.
- /path/to/temp: Should be your fast temporary plotting space.
- America/Edmonton: Change to your local timezone.
docker run -d --name='machinaris' -p 8926:8926 -e TZ="America/Edmonton" -e mode=plotter -e farmer_pk=YOUR_FARMER_PK -e pool_pk=YOUR_POOL_PK -v '/home/user/.machinaris':'/root/.chia':'rw' -v '/path/to/plots':'/plots':'rw' -v '/path/to/temp':'/plotting':'rw' -t 'ghcr.io/guydavis/machinaris'
Change the following host paths and variables highlighted in bold, before running the command above:
- /home/USER/.machinaris: Will hold the application data, config, and logs for Chia, Plotman, and Machinaris.
- /path/to/plots: Will hold the finished plot files after plotting and when farming.
- /path/to/temp: Should be your fast temporary plotting space.
- America/Edmonton: Change to your local timezone.
- YOUR_FARMER_PK and YOUR_POOL_PK: Provide your wallet's public farmer and pool keys, else provide mnemonic.txt as usual.
It's possible to run only as a farmer.
docker run -d --name='machinaris' -p 8444:8444 -p 8926:8926 -e TZ="America/Edmonton" -e mode=farmer -v '/home/USER/.machinaris':'/root/.chia':'rw' -v '/path/to/plots':'/plots':'rw' -t 'ghcr.io/guydavis/machinaris'
Change the following host paths and variables highlighted in bold, before running the command above:
- /home/USER/.machinaris: Will hold the application data, config, and logs for Chia, Plotman, and Machinaris.
- /path/to/plots: Will hold the finished plot files after plotting and when farming.
- /path/to/temp: Should be your fast temporary plotting space.
- America/Edmonton: Change to your local timezone.
It's possible to run only as a harvester.
docker run -d --name='machinaris' -p 8926:8926 -e TZ="America/Edmonton" -e mode=harvester -e farmer_address=myfarmer -e farmer_port=myfarmerport -v '/home/USER/.machinaris':'/root/.chia':'rw' -v '/path/to/plots':'/plots':'rw' -t 'ghcr.io/guydavis/machinaris'
Change the following host paths and variables highlighted in bold, before running the command above:
- /home/USER/.machinaris: Will hold the application data, config, and logs for Chia, Plotman, and Machinaris.
- /path/to/plots: Will hold the finished plot files after plotting and when farming.
- /path/to/temp: Should be your fast temporary plotting space.
- America/Edmonton: Change to your local timezone.
- myfarmer: Hostname or IP of your local farmer node.
- myfarmerport: Port number harvester will connect to your farmer on, default is 8447.
Before running the container, create the .machinaris
directory and place a export of your farmer's CA in .machinaris/farmer_ca
which should then contain:
- chia_ca.crt
- chia_ca.key
- private_ca.crt
- private_ca.key
Once you have launched Machinaris, be sure to do the following, regardless of which platform you are using. For fullnode (default) and farmer modes, you'll need to either import a key or generate a new one as described below. Plotter and harvester modes DO NOT require key import or generation (see steps above).
If you have an existing key mnemonic to use, you can place the single into a text file named mnemonic.txt
in above /home/user/.machinaris
or similar (/mnt/user/appdata/machinaris
on Unraid) host volume. In-container, this will be found at /root/.chia/mnemonic.txt
.
If you want to use more than one mnemonic key file, you can pass them as a colon-separated list of in-container paths for example:
-e keys="/root/.chia/mnemonic1.txt:/root/.chia/mnemonic2.txt"
If you don't have an existing private key to import, just launch Machinaris and browse to the WebUI on port 8926. You'll be presented with this screen where you can choose to have one generated for you:
For your full-node, you should port-forward your router back to your Docker container on port tcp/8444. This is required to stay synced and thus participating in farming challenges.
Here's an example port-forward config from my Unifi-router:
CHIA NETWORK INC, CHIA™, the CHIA BLOCKCHAIN™, the CHIA PROTOCOL™, CHIALISP™ and the “leaf Logo” (including the leaf logo alone when it refers to or indicates Chia), are trademarks or registered trademarks of Chia Network, Inc., a Delaware corporation. There is no affiliation between the Machinaris project and the main Chia Network project.