User Tools

Site Tools


crypto:chia:cli:farm:farming_on_many_machines

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
crypto:chia:cli:farm:farming_on_many_machines [2021/07/01 08:27] – created petercrypto:chia:cli:farm:farming_on_many_machines [2021/07/01 09:58] (current) – [Create Plots] peter
Line 1: Line 1:
 ====== Crypto - Chia - CLI - Farm - Farming on many machines ====== ====== Crypto - Chia - CLI - Farm - Farming on many machines ======
 +
 +Run a harvester on each machine, without having to run a full node, wallet, and farmer on each one.
 +
 +This keeps the system simpler, uses less bandwidth, space, CPU, and also keeps the keys safer.
 +
 +This should also make the overall farming process quicker and more efficient when replying to challenges.
  
 {{:crypto:chia:cli:farm:chia_-_farming_on_many_machines.png?600|}} {{:crypto:chia:cli:farm:chia_-_farming_on_many_machines.png?600|}}
 +
 +----
 +
 +===== On Main PC =====
 +
 +
 +==== Shut down Chia on the main computer ====
 +
 +<code bash>
 +chia stop -d all
 +</code>
 +
 +----
 +
 +==== Find the IP address on the main computer ====
 +
 +<code bash>
 +ip a
 +</code>
 +
 +----
 +
 +==== Make a copy of the main machine CA directory ====
 +
 +The CA directory is located in **~/.chia/mainnet/config/ssl/ca**.
 +
 +<WRAP info>
 +**NOTE:** Copy the CA file.
 +
 +This file can be shared via USB stick, or through a network copy to each harvester.
 +
 +The new ssl/ca directory must be copied with each version of chia-blockchain.
 +
 +</WRAP>
 +
 +<WRAP important>
 +**WARNING:**  Do not copy the entire config/ssl directory from one machine to another.
 +
 +Each harvester must have a different set of TLS certificates for your main machine to recognize it as different harvesters.
 +
 +</WRAP>
 +
 +----
 +
 +===== In the new Harvester =====
 +
 +==== Install Chia ====
 +
 +<WRAP info>
 +**NOTE:**  Use the regular 24 word mnemonic key from the main PC.
 +</WRAP>
 +
 +----
 +
 +==== Shut down Chia ====
 +
 +<code bash>
 +chia stop -d all
 +</code>
 +
 +----        
 +
 +==== Modify Chia Config ====
 +
 +Edit the ~/.chia/mainnet/config/config.yaml file.
 +
 +Search for **enable_upnp**:
 +
 +<file bash ~/.chia/mainnet/config/config.yaml>
 +enable_upnp: true
 +</file>
 +
 +and change to 
 +
 +<file bash ~/.chia/mainnet/config/config.yaml>
 +enable_upnp: false
 +</file>
 +
 +----
 +
 +Search for **harvester:** and the **farmer_peer** section:
 +
 +<file bash ~/.chia/mainnet/config/config.yaml>
 +harvester:
 +  farmer_peer:
 +    host: localhost
 +</file>
 +
 +and change the **localhost** to the IP address of the main PC.
 +
 +<file bash ~/.chia/mainnet/config/config.yaml>
 +harvester:
 +  farmer_peer:
 +    host: 192.168.1.51
 +</file>
 +
 +<WRAP info>
 +**NOTE:**  The **192.168.1.51** is the IP address of the main PC.
 +</WRAP>
 +
 +----
 +
 +==== Initialize Chia ====
 +
 +<code bash>
 +chia init -c [directory]
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  This creates a new certificate signed by the CA of the main machine.
 +
 +  * **[directory]** is the **copy** of the main machine CA directory and its network location. <WRAP important>
 +**WARNING:** DO NOT replace the /ca directory on the harvester with this copy of the CA from the main machine!
 +
 +  * Place the copy of the main machine /ca directory into a temp directory on the harvester. 
 +  * The harvester will use these files temporarily.
 +  * This temporary directory can then be deleted.
 +
 +</WRAP>
 +
 +For example, assuming the main PC CA was placed into \main_ca:
 +
 +<code bash>
 +chia init -c \main_ca
 +</code>
 +</WRAP>
 +
 +----
 +
 +===== Start Chia on the main PC =====
 +
 +<code bash>
 +chia start farmer
 +</code>
 +
 +----
 +
 +===== Start the new harvester =====
 +
 +On the new PC.
 +
 +<code bash>
 +chia start harvester -r
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  The new harvester may take up to 20 minutes to start the sync process.
 +
 +It will make a full copy of the blockchain to get to normal sync.
 +
 +Ensure that firewall rules allow the harvester to connect to the main machine.
 +</WRAP>
 +
 +----
 +
 +===== Check the new harvester is working =====
 +
 +On the main PC:
 +
 +  * Navigate to the **Farm** tab.
 +  * At the bottom select **Hide Advanced Options**.
 +  * The **Your Harvester Network** should show additional Node IDs for each harvester.
 +
 +<WRAP info>
 +**NOTE:**  Another method to check:
 +
 +On the main PC **Farm** tab:
 +
 +  * **Last Attempted Proof**:  The number of plots on the harvester will also be included in the **Plots Passed Filter** total.
 +
 +</WRAP>
 +
 +
 +----
 +
 +===== Create Plots =====
 +
 +New plots can now be created on the new machine.
 +
 +<code bash>
 +chia plots create -f farmer_key -p pool_key
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  
 +
 +  * **farmer_key**:  From the main machine.
 +  * **pool_key**:  From the main machine.
 +
 +Plots can also be copied over.
 +
 +Farming will only happen once full sync is completed.
 +
 +</WRAP>
 +
 +<WRAP info>
 +**NOTE:**  After creating a plot, check everything is working correctly:
 +
 +<code bash>
 +chia plots check
 +</code>
 +
 +</WRAP>
 +
 +
 +----
 +
 +===== References =====
 +
 +https://github.com/Chia-Network/chia-blockchain/wiki/Farming-on-many-machines
crypto/chia/cli/farm/farming_on_many_machines.1625128022.txt.gz · Last modified: 2021/07/01 08:27 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki