{"id":1981,"date":"2018-07-24T00:22:45","date_gmt":"2018-07-24T00:22:45","guid":{"rendered":"http:\/\/www.talkcrypto.org\/blog\/?p=1981"},"modified":"2018-07-24T00:22:45","modified_gmt":"2018-07-24T00:22:45","slug":"running-nem-on-a-raspberry-pi-in-5-minutes","status":"publish","type":"post","link":"https:\/\/www.talkcrypto.org\/blog\/2018\/07\/24\/running-nem-on-a-raspberry-pi-in-5-minutes\/","title":{"rendered":"Running NEM on a Raspberry Pi in 5 minutes"},"content":{"rendered":"<p>A raspberry pi is a very neat device and very powerful for its size. Here is a simple guide on getting the NEM blockchain running on it in 5 minutes.<\/p>\n<p>What you&#8217;ll need:<\/p>\n<ul>\n<li>Raspberry Pi. I&#8217;m using the Pi 3 Model B as it has inbuilt wifi and 1Gb ram<\/li>\n<\/ul>\n<h3>Step 1: Download NIS<\/h3>\n<p>Visit:\u00a0https:\/\/nem.io\/downloads\/ and download the NEM Infrastructure Server.<\/p>\n<p>Assuming you have ssh&#8217;d into your Raspberry Pi, I navigated to the Downloads folder and ran wget.<\/p>\n<p><code>wget https:\/\/bob.nem.ninja\/nis-0.6.95.tgz<\/code><br \/>\nYou might encounter a certificate error:<\/p>\n<p class=\"p1\"><span class=\"s1\">ERROR: The certificate of \u2018bob.nem.ninja\u2019 is not trusted.<br \/>\n<\/span><span class=\"s1\">ERROR: The certificate of \u2018bob.nem.ninja\u2019 has expired.<\/span><\/p>\n<p>If you do, run the following:<\/p>\n<p><code>wget --no-check-certificate https:\/\/bob.nem.ninja\/nis-0.6.95.tgz<\/code><\/p>\n<h3>Step 2: Extract NIS<\/h3>\n<p>Extract the file with:<br \/>\n<code>tar -xvf nis-0.6.95.tgz<\/code><\/p>\n<p>You will see a new package folder. cd into this folder and you&#8217;ll see a whole bunch of files.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-1982 size-full\" src=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/Screen-Shot-2018-06-23-at-11.11.18-AM.png\" alt=\"\" width=\"1064\" height=\"128\" srcset=\"https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/Screen-Shot-2018-06-23-at-11.11.18-AM.png 1064w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/Screen-Shot-2018-06-23-at-11.11.18-AM-300x36.png 300w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/Screen-Shot-2018-06-23-at-11.11.18-AM-768x92.png 768w, https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/Screen-Shot-2018-06-23-at-11.11.18-AM-1024x123.png 1024w\" sizes=\"(max-width: 1064px) 100vw, 1064px\" \/><\/p>\n<p>You can actually start the NEM node now if you want to run on mainnet. For testing purposes, let&#8217;s configure it for testnet.<\/p>\n<h3>Step 3: Switching to testnet<\/h3>\n<p>cd into nis and edit config.properties<\/p>\n<p><code>cd nis<br \/>\nnano config.properties<\/code><\/p>\n<p>Look for &#8220;<span class=\"s1\">nem.network = mainnet&#8221; and change to &#8220;<\/span><span class=\"s1\">nem.network = testnet&#8221;<\/span><\/p>\n<h3>Step 4: Start NEM Node<\/h3>\n<p><code>.\/nix.runNis.sh<\/code><\/p>\n<p>You should see the node kick into action. Synchronizing the blockchain will take a long time. I didn&#8217;t go through this process as it would have taken days. I used tip #1 below.<\/p>\n<h3>Tip #1:<\/h3>\n<p>Downloading the entire NEM testnet blockchain on a Raspberry Pi will take potentially days. To speed up the process, install NEM NIS on your laptop going through the same process as above. It should only take around 5~6 hours. Then compress the nem folder in your user directory with:<\/p>\n<p><code>tar -czvf nem.tar.gz nem<\/code><\/p>\n<p>And scp (secure copy) to your Pi.<\/p>\n<p><code>scp nem.tar.gz pi@192.168.x.x:\/home\/pi<\/code><\/p>\n<h3>Tip #2:<\/h3>\n<p>Every time you start up the node, the NEM blockchain has to &#8220;load up&#8221;. On screen you&#8217;ll see the block height scrolling by really fast. This currently takes 5-10 minutes so keep this in mind especially if you want to do a demo.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A raspberry pi is a very neat device and very<\/p>\n","protected":false},"author":1,"featured_media":1984,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1981","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blockchain"],"featured_image_urls":{"full":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/nempi.jpg",200,328,false],"thumbnail":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/nempi-150x150.jpg",150,150,true],"medium":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/nempi-183x300.jpg",183,300,true],"medium_large":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/nempi.jpg",200,328,false],"large":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/nempi.jpg",200,328,false],"1536x1536":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/nempi.jpg",200,328,false],"2048x2048":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/nempi.jpg",200,328,false],"chromenews-featured":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/nempi.jpg",200,328,false],"chromenews-large":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/nempi.jpg",200,328,false],"chromenews-medium":["https:\/\/www.talkcrypto.org\/blog\/wp-content\/uploads\/2018\/06\/nempi.jpg",200,328,false]},"author_info":{"info":["seandotau"]},"category_info":"<a href=\"https:\/\/www.talkcrypto.org\/blog\/category\/blockchain\/\" rel=\"category tag\">Blockchain<\/a>","tag_info":"Blockchain","comment_count":"0","_links":{"self":[{"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/posts\/1981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/comments?post=1981"}],"version-history":[{"count":3,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/posts\/1981\/revisions"}],"predecessor-version":[{"id":2044,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/posts\/1981\/revisions\/2044"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/media\/1984"}],"wp:attachment":[{"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/media?parent=1981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/categories?post=1981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.talkcrypto.org\/blog\/wp-json\/wp\/v2\/tags?post=1981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}