{"id":626,"date":"2021-05-22T19:06:35","date_gmt":"2021-05-23T00:06:35","guid":{"rendered":"https:\/\/www.onebyte.org\/blog\/?p=626"},"modified":"2021-07-16T16:01:33","modified_gmt":"2021-07-16T21:01:33","slug":"farming-chia-xch-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.onebyte.org\/blog\/2021\/05\/22\/farming-chia-xch-on-ubuntu\/","title":{"rendered":"Beginners Guide to Farming CHIA XCH on Ubuntu"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"385\" src=\"https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner.png\" alt=\"\" class=\"wp-image-682\" srcset=\"https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner.png 900w, https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner-300x128.png 300w, https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner-768x329.png 768w, https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner-187x80.png 187w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Chia-The encrypted project of\u2705Bittorrent creator and \u2705Steam game distribution protocol developer Bram Cohen! Received institutional investment from \u2705A16Z\u2705DCM\u2705Danhua Capital<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\/\/ UPDATE \/\/ <\/strong><\/p>\n\n\n\n<p class=\"has-white-color has-text-color has-background wp-block-paragraph\" style=\"background-color:#ff3838\">Please read this <a href=\"https:\/\/www.backblaze.com\/blog\/chia-analysis-to-farm-or-not-to-farm\/\" data-type=\"URL\" data-id=\"https:\/\/www.backblaze.com\/blog\/chia-analysis-to-farm-or-not-to-farm\/\" target=\"_blank\" rel=\"noreferrer noopener\">writeup from BackBlaze<\/a> regarding the profitability of Chia. After mining on 8TB for ~2 months I never saw any wins. Pools are just now starting up, but it&#8217;s becoming harder and harder to win as the storage pool rises.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Index<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>Installed OS<\/li><li><a href=\"#configstorage\" data-type=\"internal\" data-id=\"#configstorage\">Configured storage (temp\/plot)<\/a><\/li><li><a href=\"#installchia\">Installed CHIA<\/a><\/li><li>Activated CHIA<\/li><li><a href=\"#createplot\">Create plot<\/a><\/li><li><a href=\"#startchiafarmer\">Start CHIA farmer<\/a><\/li><li><a href=\"#tips\">Troubleshooting, Tips, and Links<\/a><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;re going to walk through some of the basics of how to setup CHIA farm on Ubuntu and mining for XCH.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"configstorage\">Configure Storage<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This step I completed when installing the Ubuntu LTS OS. My setup consists of:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>2x \u2013 4TB Western Digital Purple<\/li><li>1x 480GB SSD<\/li><li>1x HP RAID controller<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installchia\">Install Chia<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I ended up configuring my two 4TB into a RAID-0 to form 8TB storage mapped to \/chia_plot. My SSD storage was mounted and mapped to \/chia_temp. This will be referenced later on.<\/p>\n\n\n<pre class=\"lang:sh decode:true urvanov-syntax-highlighter-selected\">sudo apt-get update\nsudo apt-get upgrade -y \n\n# Checkout the source and install \ngit clone https:\/\/github.com\/Chia-Network\/chia-blockchain.git -b latest --recurse-submodules\ncd chia-blockchain\n\nchmod +x .\/install.sh\n.\/install.sh\n. .\/activate\n\n(venv) root@chia:\/home\/moo\/chia-blockchain# chia start farmer\ncan't find \/root\/.chia\/mainnet\/config\/config.yaml\n** please run `chia init` to migrate or create new config files **\n\n(venv) root@chia:\/home\/moo\/chia-blockchain# chia init\nChia directory \/root\/.chia\/mainnet\nCan't find private CA, creating a new one in \/root\/.chia\/mainnet to generate TLS certificates\nNo keys are present in the keychain. Generate them with 'chia keys generate' To see your keys, run 'chia keys show'\n\n(venv) root@chia:\/home\/moo\/chia-blockchain# chia keys generate\nGenerating private key\nAdded private key with public key fingerprint 111111111111 and mnemonic\nSetting the xch destination address for coinbase fees reward to XXXXXXXX\nSetting the xch destination address for coinbase reward to XXXXXXX\n\n<\/pre>\n\n\n<h2><a id=\"createplot\"><\/a>Create plot<\/h2>\n<pre class=\"lang:sh decode:true\">(venv) root@chia:\/home\/moo\/chia-blockchain# chia plots create -k 32 -b 22000 -t \/chia_temp -d \/chia_plot<\/pre>\n\n\n\n<h2><a id=\"startchiafarmer\"><\/a>Start Chia Farmer<\/h2>\n<pre class=\"lang:default decode:true \">(venv) root@chia:\/home\/moo\/chia-blockchain# chia start farmer\nDaemon not started yet\nStarting daemon\nchia_harvester: started\nchia_farmer: started\nchia_full_node: started\nchia_wallet: started<\/pre>\n\n\n\n<h2><a id=\"tips\"><\/a>Troubleshooting, Tips, and Links<\/h2>\n<ul>\n<li><a href=\"https:\/\/chialinks.com\/\" target=\"_blank\" rel=\"noopener\">CHIA Links Portal<\/a><\/li>\n<li><a href=\"https:\/\/chiacalculator.com\/\" target=\"_blank\" rel=\"noopener\">Chia Calculator \u2013 How much can I earn farming Chia (XCH)?<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Chia-Network\/chia-blockchain\/wiki\/Quick-Start-Guide\" target=\"_blank\" rel=\"noopener\">Quick Start Guide \u00b7 Chia-Network\/chia-blockchain Wiki \u00b7 GitHub<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Chia-Network\/chia-blockchain\/wiki\/INSTALL#ubuntudebian\" target=\"_blank\" rel=\"noopener\">INSTALL \u00b7 Chia-Network\/chia-blockchain Wiki \u00b7 GitHub<\/a><\/li>\n<li><a href=\"https:\/\/chia.foxypool.io\/\" target=\"_blank\" rel=\"noopener\">CHIA Pool FOXY<\/a>\n<ul>\n<li><a href=\"https:\/\/plot-plan.chia.foxypool.io\/\" target=\"_blank\" rel=\"noopener\">k32\/k33\/k34 calculator<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/t.me\/ChiaEnglish\" target=\"_blank\" rel=\"noopener\">Chia Telegram Group &#8211; English<\/a><\/li>\n<\/ul>\n<p><strong>Access Logs and Mainnet files<\/strong><\/p>\n<pre class=\"lang:default decode:true urvanov-syntax-highlighter-selected\">CD ~\/.chia\/<\/pre>\n<p><strong>View the log file output<\/strong><\/p>\n<pre class=\"lang:default decode:true\" title=\"View the log file output\">tail -f ~\/.chia\/mainnet\/log\/debug.log<\/pre>\n<p><strong>Run command in background<br \/><\/strong><\/p>\n<pre class=\"lang:default decode:true\" title=\"Run command in background\">nohup chia plots create -k 32 -b 22000 -t \/chia_temp -d \/chia_plot &amp;\ntail -f nohup.out<\/pre>\n<p>Alternatively, you can install and run TMUX to manage multiple instances. <em>See TMUX Cheatsheet<span class=\"footnote_referrer\"><a role=\"button\" tabindex=\"0\" onclick=\"footnote_moveToReference_626_1('footnote_plugin_reference_626_1_1');\" onkeypress=\"footnote_moveToReference_626_1('footnote_plugin_reference_626_1_1');\" ><sup id=\"footnote_plugin_tooltip_626_1_1\" class=\"footnote_plugin_tooltip_text\">[1]<\/sup><\/a><span id=\"footnote_plugin_tooltip_text_626_1_1\" class=\"footnote_tooltip\"><a href=\"https:\/\/tmuxcheatsheet.com\/\" target=\"_blank\" rel=\"noopener\">Tmux Cheat Sheet &amp; Quick Reference<\/a><\/span><\/span><script type=\"text\/javascript\"> jQuery('#footnote_plugin_tooltip_626_1_1').tooltip({ tip: '#footnote_plugin_tooltip_text_626_1_1', tipClass: 'footnote_tooltip', effect: 'fade', predelay: 0, fadeInSpeed: 200, delay: 400, fadeOutSpeed: 200, position: 'top center', relative: true, offset: [-7, 0], });<\/script><\/em><\/p>\n<p><strong>Continuously run<\/strong><\/p>\n<p>When a plot finishes, it doesn&#8217;t automatically get added to the farmer. You must restart the farmer. When a plot finishes, you must also create a new plot. I&#8217;m not sure if there is a better way, but I simply added &amp;&amp; between my commands.\u00a0\u00a0<\/p>\n<pre class=\"lang:default decode:true\" title=\"Run multiple commands &amp;&amp; or ;\">chia plots create -k 32 -b 22000 -t \/chia_temp -d \/chia_plot &amp;&amp; chia plots create -k 32 -b 22000 -t \/chia_temp -d \/chia_plot &amp;&amp; chia plots create -k 32 -b 22000 -t \/chia_temp -d \/chia_plot &amp;&amp; chia plots create -k 32 -b 22000 -t \/chia_temp -d \/chia_plot<\/pre>\n<p>To restart your farmer\/node:<\/p>\n<pre class=\"lang:default decode:true\" title=\"To restart your farmer\/node:\">chia farmer start -r<\/pre>\n<p>\u00a0<\/p>\n<p><strong>Notes<\/strong><br \/>All in all it takes roughly 6-12 hours to complete a single plot. As I continue to make progress and win some of the blocks, I&#8217;ll update this post.<\/p>\n<div class=\"speaker-mute footnotes_reference_container\"> <div class=\"footnote_container_prepare\"><p><span role=\"button\" tabindex=\"0\" class=\"footnote_reference_container_label pointer\" onclick=\"footnote_expand_collapse_reference_container_626_1();\">Notes & References<\/span><span role=\"button\" tabindex=\"0\" class=\"footnote_reference_container_collapse_button\" style=\"display: none;\" onclick=\"footnote_expand_collapse_reference_container_626_1();\">[<a id=\"footnote_reference_container_collapse_button_626_1\">+<\/a>]<\/span><\/p><\/div> <div id=\"footnote_references_container_626_1\" style=\"\"><table class=\"footnotes_table footnote-reference-container\"><caption class=\"accessibility\">Notes & References<\/caption> <tbody> \r\n\r\n<tr class=\"footnotes_plugin_reference_row\"> <th scope=\"row\" class=\"footnote_plugin_index_combi pointer\"  onclick=\"footnote_moveToAnchor_626_1('footnote_plugin_tooltip_626_1_1');\"><a id=\"footnote_plugin_reference_626_1_1\" class=\"footnote_backlink\"><span class=\"footnote_index_arrow\">&#8593;<\/span>1<\/a><\/th> <td class=\"footnote_plugin_text\"><a href=\"https:\/\/tmuxcheatsheet.com\/\" target=\"_blank\" rel=\"noopener\">Tmux Cheat Sheet &amp; Quick Reference<\/a><\/td><\/tr>\r\n\r\n <\/tbody> <\/table> <\/div><\/div><script type=\"text\/javascript\"> function footnote_expand_reference_container_626_1() { jQuery('#footnote_references_container_626_1').show(); jQuery('#footnote_reference_container_collapse_button_626_1').text('\u2212'); } function footnote_collapse_reference_container_626_1() { jQuery('#footnote_references_container_626_1').hide(); jQuery('#footnote_reference_container_collapse_button_626_1').text('+'); } function footnote_expand_collapse_reference_container_626_1() { if (jQuery('#footnote_references_container_626_1').is(':hidden')) { footnote_expand_reference_container_626_1(); } else { footnote_collapse_reference_container_626_1(); } } function footnote_moveToReference_626_1(p_str_TargetID) { footnote_expand_reference_container_626_1(); var l_obj_Target = jQuery('#' + p_str_TargetID); if (l_obj_Target.length) { jQuery( 'html, body' ).delay( 0 ); jQuery('html, body').animate({ scrollTop: l_obj_Target.offset().top - window.innerHeight * 0.2 }, 380); } } function footnote_moveToAnchor_626_1(p_str_TargetID) { footnote_expand_reference_container_626_1(); var l_obj_Target = jQuery('#' + p_str_TargetID); if (l_obj_Target.length) { jQuery( 'html, body' ).delay( 0 ); jQuery('html, body').animate({ scrollTop: l_obj_Target.offset().top - window.innerHeight * 0.2 }, 380); } }<\/script>","protected":false},"excerpt":{"rendered":"<p>Chia-The encrypted project of\u2705Bittorrent creator and \u2705Steam game distribution protocol developer Bram Cohen! Received institutional investment from \u2705A16Z\u2705DCM\u2705Danhua Capital \/\/ UPDATE \/\/ Please read this writeup from BackBlaze regarding the profitability of Chia. After mining on 8TB for ~2 months I never saw any wins. Pools are just now starting [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":682,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[25,3,2,21],"tags":[],"class_list":["post-626","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-crypto","category-linux","category-server","category-software"],"uagb_featured_image_src":{"full":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner.png",900,385,false],"thumbnail":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner-150x150.png",150,150,true],"medium":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner-300x128.png",300,128,true],"medium_large":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner-768x329.png",768,329,true],"large":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner.png",900,385,false],"1536x1536":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner.png",900,385,false],"2048x2048":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner.png",900,385,false],"post-thumbnail":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner.png",900,385,false],"modality-logo":["https:\/\/www.onebyte.org\/blog\/wp-content\/uploads\/2021\/05\/chia_banner-187x80.png",187,80,true]},"uagb_author_info":{"display_name":"Mr-Moo","author_link":"https:\/\/www.onebyte.org\/blog\/author\/ahess\/"},"uagb_comment_info":0,"uagb_excerpt":"Chia-The encrypted project of\u2705Bittorrent creator and \u2705Steam game distribution protocol developer Bram Cohen! Received institutional investment from \u2705A16Z\u2705DCM\u2705Danhua Capital \/\/ UPDATE \/\/ Please read this writeup from BackBlaze regarding the profitability of Chia. After mining on 8TB for ~2 months I never saw any wins. Pools are just now starting [&hellip;]","_links":{"self":[{"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/posts\/626","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/comments?post=626"}],"version-history":[{"count":2,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/posts\/626\/revisions"}],"predecessor-version":[{"id":1053,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/posts\/626\/revisions\/1053"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/media\/682"}],"wp:attachment":[{"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/media?parent=626"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/categories?post=626"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.onebyte.org\/blog\/wp-json\/wp\/v2\/tags?post=626"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}