<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[The Micronetia Alternative]]></title><description><![CDATA[How to run your own cloud from your living room]]></description><link>https://micronetia.devtru.st/</link><image><url>https://micronetia.devtru.st/favicon.png</url><title>The Micronetia Alternative</title><link>https://micronetia.devtru.st/</link></image><generator>Ghost 3.42</generator><lastBuildDate>Tue, 09 Sep 2025 01:03:07 GMT</lastBuildDate><atom:link href="https://micronetia.devtru.st/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Updates]]></title><description><![CDATA[<p>One feature of running your own server is that you are responsible for keeping it up to date. This isn't a particularly onerous task but it does need to be done periodically.</p><p>First you should ensure that the operating system and various Raspbian installed packages are updated using <strong>apt update</strong></p>]]></description><link>https://micronetia.devtru.st/updates/</link><guid isPermaLink="false">6048673fdda750048b92a0e7</guid><category><![CDATA[maintenance]]></category><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Thu, 11 Mar 2021 04:05:38 GMT</pubDate><content:encoded><![CDATA[<p>One feature of running your own server is that you are responsible for keeping it up to date. This isn't a particularly onerous task but it does need to be done periodically.</p><p>First you should ensure that the operating system and various Raspbian installed packages are updated using <strong>apt update</strong> and <strong>apt upgrade</strong>.</p><pre><code>server@example:~ $ sudo apt update
Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.8 kB]       
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]      
Get:3 http://archive.raspberrypi.org/debian buster/main armhf Packages [364 kB]
Get:4 https://deb.nodesource.com/node_12.x buster InRelease [4,584 B]
Get:5 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Get:6 https://deb.nodesource.com/node_12.x buster/main armhf Packages [774 B]  
Fetched 13.4 MB in 33s (405 kB/s)                                              
Reading package lists... Done
Building dependency tree       
Reading state information... Done
24 packages can be upgraded. Run 'apt list --upgradable' to see them.
server@example:~ $ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  bind9-host dnsutils libbind9-161 libdns-export1104 libdns1104 libirs161
  libisc-export1100 libisc1100 libisccc161 libisccfg163 libldap-2.4-2
  libldap-common liblwres161 libraspberrypi-bin libraspberrypi-dev
  libraspberrypi-doc libraspberrypi0 libssl1.1 libzstd1 nodejs openssl
  raspberrypi-bootloader raspberrypi-kernel rpi-eeprom
24 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 140 MB of archives.
After this operation, 2,305 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
    .
    .
    .
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
server@example:~ $</code></pre><p>Then you should make sure that ghost is up to date. First update the ghost-cli package with <strong>npm install -g ghost-cli@latest</strong></p><pre><code>server@example:~ $ sudo npm install -g ghost-cli@latest
/usr/bin/ghost -&gt; /usr/lib/node_modules/ghost-cli/bin/ghost
+ ghost-cli@1.16.0
added 11 packages from 5 contributors, removed 26 packages and updated 29 packages in 91.719s
</code></pre><p>You may well also be informed that npm itself needs updating. In which case do as you are told and <strong>npm install -g npm</strong></p><pre><code>server@example:~ $ sudo npm install -g npm
/usr/bin/npm -&gt; /usr/lib/node_modules/npm/bin/npm-cli.js
/usr/bin/npx -&gt; /usr/lib/node_modules/npm/bin/npx-cli.js
+ npm@7.6.2
added 59 packages from 24 contributors, removed 241 packages and updated 194 packages in 31.973s
</code></pre><p>Next cd into the blog directory and do ghost update. If you are running on a Pi 3 this will take some time. If you are running on a Pi 3 and you have other things also on it (like the chat server) then stop them first (<strong>sudo snap stop rocketchat-server</strong>) because you are very likely to run out of resources if you don't and it isn't pretty when that happens*</p><pre><code>server@example:~ $ cd blog
server@example:~/blog $ ghost update
✔ Checking system Node.js version
ℹ Ensuring user is not logged in as ghost user [skipped]
ℹ Checking if logged in user is directory owner [skipped]
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
✔ Checking for available migrations
✔ Checking for latest Ghost version

No user-visible changes in this release.

---

View the changelogs for full details:
* Ghost - https://github.com/tryghost/ghost/compare/3.41.9...3.42.0
* Ghost-Admin - https://github.com/tryghost/admin/compare/3.41.9...3.42.0

✔ Fetched release notes
✔ Downloading and updating Ghost to v3.42.0
✔ Stopping Ghost
✔ Linking latest Ghost and recording versions
✔ Restarting Ghost
ℹ Removing old Ghost versions [skipped]
server@example:~/blog $ </code></pre><p>That's it unless you have added comments. If you did add comments and are using the default caspar theme you'll probably find that they have disappeared during the update. You can get them back by running <strong>edittheme.pl</strong> again. Be sure to use your comment hostname and <u><strong>not the example one </strong></u><strong><u>(commento-example.devtru.st)</u></strong> in the text below.</p><pre><code>server@example:~/blog $ edittheme.pl content/themes/casper/post.hbs commento-example.devtru.st 
Differences between new and old:
117c117
&lt;             
---
&gt;             {{!--
119,120c119
&lt;                 &lt;script defer src="https://commento-example.devtru.st/js/commento.js"&gt;&lt;/script&gt;
&lt;                 &lt;div id="commento"&gt;&lt;/div&gt;
---
&gt;                 If you want to embed comments, this is a good place to do it!
121a121
&gt;             --}}
server@example:~/blog $</code></pre><p>You may also want to update commento++ itself. Currently I'm building commento++ manually from source and making the result available because there's no readily available ARM binary for it but I hope to change that. When I update the commento package on this website I'll update this page with instructions on how to update it on your micronetia instance. In the last week or so there have been two minor bug fixes, one of which was raised by me so it looks like updates will occur fairly often.</p><p>Finally once you've updated everything it is probably a good idea to reboot the pi and make sure that it all comes up again.</p><p>*The alert reader may have noticed this blog was offline for some of March 10. Running out of resources while doing the update was why.</p>]]></content:encoded></item><item><title><![CDATA[Micronetia vs Competitors]]></title><description><![CDATA[<p>I mentioned the Micronetia project on <a href="https://larrysanger.org/community/main-forum/a-decentralized-blog-platform-i-have-created/">Larry Sanger's decentralization forum</a> and was asked there how it compared to a device called "<a href="https://www.thehelm.com/">Helm</a>".</p><h2 id="tl-dr">TL;DR</h2><p>In summary it's quite a similar idea. Certainly we are looking at solving much the same problem, although their product is aimed at email first and</p>]]></description><link>https://micronetia.devtru.st/micronetia-vs-competitors/</link><guid isPermaLink="false">60481433dda750048b929ede</guid><category><![CDATA[micronetia]]></category><category><![CDATA[philosophy]]></category><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Wed, 10 Mar 2021 04:47:17 GMT</pubDate><content:encoded><![CDATA[<p>I mentioned the Micronetia project on <a href="https://larrysanger.org/community/main-forum/a-decentralized-blog-platform-i-have-created/">Larry Sanger's decentralization forum</a> and was asked there how it compared to a device called "<a href="https://www.thehelm.com/">Helm</a>".</p><h2 id="tl-dr">TL;DR</h2><p>In summary it's quite a similar idea. Certainly we are looking at solving much the same problem, although their product is aimed at email first and other things later, while Micronetia is aimed at blogging first and other things later. In the main I'd say the difference is in build vs buy and to a significant degree that shows a difference in philosophy. </p><p>This project is trying to build something from components you get yourself. Helm is buy a device and let someone else do all the hard work. The result is that you can't expand a Helm to do things Helm don't want you to do/haven't implemented yet, but the Micronetia project give users choices and options to expand and tweak to their heart's content.</p><p>A closer competitor to Micronetia is <a href="https://yunohost.org">Yunohost</a>, which I also discuss below.</p><h2 id="vendor-lock-in">Vendor Lock-in</h2><p>The problem with the Helm approach is that you are reliant on Helm. Helm appears to be quite closed and proprietary in terms of OS and hardware so if Helm haven't implemented a particular integration then you can't do that. For example one micronetia user has <a href="https://www.madpoetfiles.com/the-tweakening/">added calibre and an RPG server to his pi</a>. It doesn't look like you could do that on the Helm box - a quick look at the Helm's community shows requests to <a href="https://community.thehelm.com/t/rss-feed-aggregator/175">add things like an RSS feed aggregator</a> are responded to by "we'll look into it" as opposed to here's how you do it: <em>"...</em> <em>sudo apt install..."</em></p><p>The lock-in particularly pronounced on the hardware side. If you buy a helm device and it doesn't work you have to get another one from them. If you want more storage than what is offered then you discover you can't do that. The Micronetia project is based on Raspberry Pi hardware and there are numerous suppliers/resellers of Pis. If you want to add a couple of USB SSD drives then you can, if can only afford a pi3B+ then you can use that. Heck if you are willing to tinker you can run some of the project on a pi zero (I'm using one to test the backup feature to be released real soon now). However nothing in my project requires even a pi, it just requires a debian like OS (and I expect with a small amount of work not even that). It would be very simple to port this to an Intel/AMD CPU platform like a NUC and probably pretty simple to create a jenkins or similar builder that took a vanilla ubuntu or debian server and added all the relevant packages. </p><p>Then there's the internet connectivity part. The Helm project mandates using Helm's cloud for backup and various other things including domain management. Micronetia has no such dependency. You get a domain from any registrar and so on. Yes it uses cloudflare's DNS and caching now but there's nothing that requires cloudflare, it can be moved to a different service like ngrok if/when cloudflare decides to change its offerings. One of my intended near future developments (and by near future I mean in the next week or so) is the ability to have a second pi as an offsite backup (or more than one if you are that paranoid) that you can have a friend put on their network. Unlike helm this remote pi remains under the control of you and your friend so your data isn't exposed to anyone's cloud. And you get to decide what encryption you want etc. etc.</p><h2 id="self-reliance">Self Reliance</h2><p>With the Micronetia approach you are not reliant on anyone. The project is a binding together of a variety of existing open-source software/tools and it is, itself, up on <a href="https://gitlab.com/Hellokittygoatse/micronetia">gitlab</a> for all to see and fork. In fact there's no need to install the ghost blog on a micronetia server. The base server is a solid recent version of Raspbian with a number of server related packages and it makes sense that there will be usecases where you use that for something without ghost. If you want to have a dedicated chat server (say) or a back up server or something else like a DNS server you can do that. Mind you if you haven't set up ghost some of the cloudflare configuration will be need to be tweaked and run manually, but you can do it.</p><p>That self-reliance also extends to the admin and setup processes where the expectation is that the user has to get exposed to some linux sysadmin concepts. That's another intentional difference because I think people should be able to tinker and that they should do some maintenance etc. themselves. Rather like the ability to change a tire, check the battery etc. in a car. </p><p>Another related difference is the use of containers, which helm touts as a feature. Although one of my applications (the <a href="https://micronetia.devtru.st/adding-a-chat-server/">chat server</a>) uses a snap and I recommend building the project using a docker instance, the core functionality (blog, comments (and file storage/backup - when I deliver that)) does not use snaps or dockers or other containers and that is intentional.</p><h2 id="yunohost">Yunohost</h2><p>The use of containers is in fact a key difference between Micronetia and Yunohost, which I looked at before deciding to go my own way. There is a lot to like about Yunohost and I agree with a lot of their philosphy. The problem I have with them is that they too wrap things up too much. Yunohost has a (lovely) web UI and it uses docker a lot and both of these make things simple at the expense of losing control and flexibility.</p><p>The web UI is a problem because it abstracts away the OS and it limits the flexibility of what you can do. I like shell CLIs for administration because they give you the power to do what you want and force you to take responsibility for what you do. The Yunohost install has SSH available but they don't recommend using it except in "advanced" cases or unless the web UI isn't working for some reason. In other words you can do everything in the CLI that you can do in the Web UI but not everything you can do in the CLI can be done using the Web UI. I don't like that because it means that a regular user is forced to undergo a steep learning curve to do things like troubleshooting at precisely the time when the user doesn't want to learn new things, but just get the damn thing working (again). If the user has been exposed to the CLI and running scripts and things from the beginning there's less of a learning curve.</p><p>The catch with containers is that the supply-chain is opaque. I.e. you don't know who built them or what is in them. Now it is true that Micronetia uses node.js and thus installs a ton of npm hosted packages but it is possible to search the lists and directories to see what is installed and to verify versions etc. etc. Containers also have a problem of tending to use more system resources than native installations. Even a 8GB Pi4 is comparatively limited in its resources and it seems to me that it would be better if those resources were not used on handling multiple containers.</p><p>With Micronetia I made a conscious decision to limit the use of containers and make them optional. I also made a deliberate decision to limit the use of different languages and platforms and to try and avoid ones that have a poor history of security (so php is out, as is wordpress). My intent is to have things scripts in node.js only and where possible in compiled applications. These days it seems more and more things are being compiled in go and I like that as a choice.</p><h2 id="commercialization">Commercialization</h2><p>Going back the Helm product. One other difference is that it is a commecrial product. There's nothing wrong with the concept, but it adds a lot more dependencies to the whole tree. The simplest is what happens if the company fails? does your helm become a brick?</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/helm-scripts.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/03/helm-scripts.png 600w, https://micronetia.devtru.st/content/images/2021/03/helm-scripts.png 814w" sizes="(min-width: 720px) 720px"></figure><p>Then there's the number of third party scripts that the helm webpage wants to download. For a company that wants to get people off "the cloud" it certainly includes lots of cloud. This is concerning from a tracking point of view. The Micronetia ghost install may possibly require gstatic.com/googlefonts to deliver fonts (and there's a ghost.org svg somewhere on this site) but that's it. </p>]]></content:encoded></item><item><title><![CDATA[Adding Comments]]></title><description><![CDATA[<p>One of the problems with Ghost is that it doesn't support commenting natively. </p><p>There are plenty of options to add commenting from various commercial and/or ad funded services such as disqus. That is contrary to the ethos of Micronetia because those comments are no longer under your control. </p><p>There</p>]]></description><link>https://micronetia.devtru.st/adding-comments/</link><guid isPermaLink="false">601fcdbef851ac0478d497d5</guid><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Thu, 04 Mar 2021 12:58:28 GMT</pubDate><content:encoded><![CDATA[<p>One of the problems with Ghost is that it doesn't support commenting natively. </p><p>There are plenty of options to add commenting from various commercial and/or ad funded services such as disqus. That is contrary to the ethos of Micronetia because those comments are no longer under your control. </p><p>There is however an alternative - <a href="https://commento.io/">commento</a> - which is relatively simple to <a href="https://docs.commento.io/installation/self-hosting/">host yourself</a> (commento have an option where you can pay them to host it for you). </p><p>This post explains how to add commento to your ghost blog</p><p>Notes:</p><ul><li>these instructions based on <a href="https://blog.maskys.com/installing-self-hosted-commento-onto-your-ghost-blog/">this invaluable guide</a> as well as the <a href="https://docs.commento.io/installation/self-hosting/">commento instructions</a> (which were less useful).</li><li>technically this is <a href="https://github.com/souramoo/commentoplusplus">commento++</a> because the original commento hasn't been updated in a few months and commento++ has a couple of useful features - especially the Moderation Settings/Pending Approvals tab - that haven't been merged into the original</li><li>commento integration is not currently part of the base image. When it is, this page will be updated to note the new support</li></ul><p>To add coments you'll need a browser and an ssh session to your pi. Adding the commento service takes about 20 minutes.</p><p>SSH to your pi and change directory to /tmp (<strong>cd /tmp</strong>) then download and extract the commento files and helper scripts (<strong>curl https://micronetia.devtru.st/content/images/micronetia-comento.tgz | tar xzv</strong>)</p><pre><code>server@micronetia:~ $ cd /tmp
server@micronetia:/tmp $ curl https://micronetia.devtru.st/content/images/micronetia-commento.tgz | tar xzv</code></pre><p>Run the addcommento script as root providing the hostname you want to use for hosting comments (<strong>sudo bin/addcommento.sh commento.domain.com </strong>). The hostname should be part of your domain The script first does a software update and then installs required dependencies (postgres and relatives). You should answer Y when asked "<em>Do you want to continue? [Y/n] </em>". Then it creates a user called commento, a database called commento and sets up systemd to run both postgres and commento services when the pi reboots. </p><pre><code>server@micronetia:/tmp $ sudo bin/addcommento.sh commento-example.devtru.st
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]      
Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.8 kB]         
Get:3 https://deb.nodesource.com/node_12.x buster InRelease [4,584 B]          
Get:4 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Get:5 http://archive.raspberrypi.org/debian buster/main armhf Packages [364 kB]
Get:6 https://deb.nodesource.com/node_12.x buster/main armhf Packages [774 B]  
Fetched 13.4 MB in 24s (552 kB/s)   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
25 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  bind9-host dnsutils libbind9-161 libdns-export1104 libdns1104 libirs161
  libisc-export1100 libisc1100 libisccc161 libisccfg163 libldap-2.4-2
  libldap-common liblwres161 libraspberrypi-bin libraspberrypi-dev
  libraspberrypi-doc libraspberrypi0 libssl1.1 libzstd1 nodejs openssl
  raspberrypi-bootloader raspberrypi-kernel raspi-config rpi-eeprom
25 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 140 MB of archives.
After this operation, 2,305 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
   .
   .
   .
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libllvm7 libpq5 libsensors-config libsensors5 postgresql-11
  postgresql-client-11 postgresql-client-common postgresql-common ssl-cert
  sysstat
Suggested packages:
  lm-sensors postgresql-doc postgresql-doc-11 libjson-perl openssl-blacklist
  isag
The following NEW packages will be installed:
  libllvm7 libpq5 libsensors-config libsensors5 postgresql postgresql-11
  postgresql-client-11 postgresql-client-common postgresql-common
  postgresql-contrib ssl-cert sysstat
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.1 MB of archives.
After this operation, 105 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
   .
   .
   .
Executing: /lib/systemd/systemd-sysv-install enable postgresql
Adding user `commento' ...
Adding new group `commento' (1001) ...
Adding new user `commento' (1001) with group `commento' ...
Creating home directory `/home/commento' ...
Copying files from `/etc/skel' ...
New password: Retype new password: passwd: password updated successfully
Changing the user information for commento
Enter the new value, or press ENTER for the default
	Full Name []: 	Room Number []: 	Work Phone []: 	Home Phone []: Other []: Use of uninitialized value $answer in chop at /usr/sbin/adduser line 582.
Use of uninitialized value $answer in pattern match (m//) at /usr/sbin/adduser line 583.
Is the information correct? [Y/n] ALTER ROLE
Converting /etc/cloudflared/config.yml
Adding hostname commento-example.devtru.st, service http://localhost:8081 to /tmp/config.yml
tunnel: 31391488-d9ca-dead-beef-c4b8c8dc9b88
credentials-file: /root/.cloudflared/31391488-d9ca-dead-beef-c4b8c8dc9b88.json
ingress:
  - hostname: example.devtru.st
    service: http://localhost:2368
  - hostname: commento-example.devtru.st
    service: http://localhost:8081
  - service: http_status:404
Does this look OK? (Y/N):
</code></pre><p>After that has happened you are asked whether the new cloudflare tunnel configuration looks OK. It should look like the one above with an entry for your blog on port 2368 and one for the commento service on port 8081.</p><p>Answer Y (unless it's gone completely nuts) and the script makes the new tunnel configuration live so that visitors can see your comment domain and then asks you to go to it and sign in to create the comment adminstrator/moderator. </p><pre><code>updateding /etc/cloudflared/config.yml
adding commento-example.devtru.st to tunnel example-tunnel
2021-03-04T08:01:13Z INF Added CNAME commento-example.devtru.st which will route to this tunnel tunnelID=31391488-d9ca-dead-beef-c4b8c8dc9b88
reloading clourflared service
Created symlink /etc/systemd/system/multi-user.target.wants/commento.service → /etc/systemd/system/commento.service.
Open a browser to https://commento-example.devtru.st/signup . 
Then create a comment administrator user and add the blog to it
Press ENTER when you have done this to stop other signups
</code></pre><p>Copy and paste the link into your broswer and fill in the account details. I recommend you use the same email and password as you have for your blog (it is likely that your browser will prompt you and/or autifill with that email/password if you saved it in the browser) but if you want to be a rebel go ahead and pick something else.</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image.png" class="kg-image" alt></figure><p>press Sign up and then login using these credentials </p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image-1.png" class="kg-image" alt></figure><p>add your blog by clicking on +New Domain in the management page</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image-2.png" class="kg-image" alt></figure><p>Fill in the relevant details and click ADD DOMAIN</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image-3.png" class="kg-image" alt></figure><p>Note that despite the warning you can just delete the domain and add a new corrected domain if you get the url wrong. You are presented with an "Installation Guide" page which you can just leave open (don't bother copying the HTML) </p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image-4.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/03/image-4.png 600w, https://micronetia.devtru.st/content/images/2021/03/image-4.png 856w" sizes="(min-width: 720px) 720px"></figure><p>Go to back the the SSH terminal session and press Enter and then start answering questions. It is OK to answer N to both choices (email and akismet) because you can run a <strong>modcommento.sh</strong> script later to add either or both. </p><p>The first choice is whether or not you want to add email connectivity. If you have set up email for your domain via something like <a href="https://mailgun.com/">mailgun</a> or <a href="https://elasticemail.com/">elastic email</a> (devtru.st uses elastic email) then say yes and enter the details. It is worth doing this because it allws you to get emails to moderate comments and allows commenters to use a password and get it reset, but it isn't a requirement.</p><p>The second choice is whether to enable the <a href="https://akismet.com/">Akismet</a> integration to clean up spam comments. Akismet is free for non-commercial sites (though you may need to be firm and insist on not donating anything when you sign up) so this seems to me to be a good idea. It also takes about 30 seconds to sign up. When you have signed up and see the page with the akismet key copy the key to paste into the terminal session.</p><pre><code>Do you want to setup email (Y/N): y
Enter SMTP HOST: smtp.example.com
Enter SMTP USERNAME: eggsample@devtru.st
Enter SMTP PASSWORD: SeCuRePa5sW0rD!
Enter SMTP PORT: 2525
Enter SMTP FROM_ADDRESS: eggsample@devtru.st    
Do you have an Akismet key to use (Y/N): y
Enter Akismet key: 123456789
</code></pre><p>Once you have answered the questions you see a systemd config file displayed and you are asked to make sure it is OK. You need to make sure that lines you care about (email, akismet) are uncommented i.e. no # at the front and have the correct information. If you typoed anything then now is a great time to go back and fix it. You should also confirm that the FORBID_NEW_OWNERS line is uncommented. See example below:</p><pre><code>[Unit]
Description=Commento daemon service
After=network.target postgresql.service

[Service]
Type=simple
User=commento
ExecStart=/home/commento/commento-server/commento
Environment=COMMENTO_ORIGIN=https://commento-example.devtru.st
Environment=COMMENTO_PORT=8081
Environment=COMMENTO_POSTGRES=postgres://commento:f3TgK1SZr52b7YJR6ofeVH878qsWIKI3@127.0.0.1:5432/commento?sslmode=disable

# Uncomment after setting up SMTP as specified below.
Environment=COMMENTO_SMTP_HOST=smtp.example.com
Environment=COMMENTO_SMTP_USERNAME=eggsample@devtru.st
Environment=COMMENTO_SMTP_PASSWORD=SeCuRePa5sW0rD!
Environment=COMMENTO_SMTP_PORT=2525
Environment=COMMENTO_SMTP_FROM_ADDRESS=eggsample@devtru.st

# Uncomment after creating your first user on commento.YOURBLOG.com
Environment=COMMENTO_FORBID_NEW_OWNERS=true

# Uncomment after creating Akismet acc and grabbing API Key. Paste it below.
Environment=COMMENTO_AKISMET_KEY=123456789
[Install]
WantedBy=multi-user.target
Please check the settings in the file above for accuracy
Note: if you did not enter either email or an akismet key then just press Y
Are the entries correct  (Y/N):</code></pre><p>When you answer Y the commento service is restarted using these settings and the script ends</p><p>Now go back to the commento admin tab in your broswer. And click on "general settings". You can change the name, but more relevantly you can enable (or not) anonymous comments and email address login. I have not tried the "Single sign-on" option so I have no idea how well that works</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image-14.png" class="kg-image" alt></figure><p>Save changes if you made and and then go to "moderation settings". If you added an Akismet key enabled "Automatic spam filtering". Then depending on your paranoia decide what comments can be posted without moderator approval. Also, if you don't have email enabled be sure to set the email schedule as "do not email".</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image-5.png" class="kg-image" alt></figure><p>Once you've got those settings the way you want (at least to start, this can all be changed later) it's time to edit the ghost theme to enable comments on posts. The proper way to do this is to download the theme, edit the relevant file (post.hbs) and upload it to back to the blog - see the <a href="https://blog.maskys.com/installing-self-hosted-commento-onto-your-ghost-blog/">theme editing instructions part of this page</a> and <a href="https://ghost.org/docs/themes/">Ghost's comprehensive theme documentation</a>.</p><p>However there's a quick a dirty hacky way that works with most official themes and definitely works with the default caspar theme. This is to use a script called edittheme.pl which was included what you downloaded to get commento.</p><p>You need to run that with the path to the post.hbs file, e.g.  /home/server/blog/content/themes/casper/post.hbs, and the hostname of the comments server e.g. commento-example.devtru.st. It does a really simple search and replace for a commented out comment block and reports whether it made a change or not. </p><p>If you are not using caspar then you'll need to replace the caspar part of the path with whatever theme you are using (e.g. for this blog the theme is "editorial" and the path is /home/server/blog/content/themes/Editorial-master/post.hbs)</p><pre><code>server@micronetia:/tmp $ edittheme.pl /home/server/blog/content/themes/casper/post.hbs commento-example.devtru.st
Differences between new and old:
117c117
&lt;             
---
&gt;             {{!--
119,120c119
&lt;                 &lt;script defer src="https://commento-example.devtru.st/js/commento.js"&gt;&lt;/script&gt;
&lt;                 &lt;div id="commento"&gt;&lt;/div&gt;
---
&gt;                 If you want to embed comments, this is a good place to do it!
121a121
&gt;             --}}
</code></pre><p>If you made a mistake with the comment name or you don't like what it did you can revert by doing  <strong>mv /home/server/blog/content/themes/casper/post.hbs.bak /home/server/blog/content/themes/casper/post.hbs</strong></p><p>If you want to enable comments on pages as well as posts then edit the pages.hbs file in the same way (i.e. <strong>edittheme.pl /home/server/blog/content/themes/casper/post.hbs commento-example.devtru.st</strong> )</p><p>When you've made the change to the theme, go check a blog post and confirm there is a comment box at the bottom like this</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image-6.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/03/image-6.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/03/image-6.png 1000w, https://micronetia.devtru.st/content/images/2021/03/image-6.png 1056w" sizes="(min-width: 720px) 720px"></figure><p>If you enabled anonymous comments then you'll see a checkbox to allow it</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image-8.png" class="kg-image" alt></figure><p>And if you check that box and add a comment you'll see it shows up with a pending moderation tag</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image-9.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/03/image-9.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/03/image-9.png 1000w, https://micronetia.devtru.st/content/images/2021/03/image-9.png 1054w" sizes="(min-width: 720px) 720px"></figure><p>You can approve it by going to the Moderation Settings/Pending Approvals tab in the commento dashboard </p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image-10.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/03/image-10.png 600w, https://micronetia.devtru.st/content/images/2021/03/image-10.png 721w" sizes="(min-width: 720px) 720px"></figure><p>Alternatively you can log into the commento system on the page (click on the login link above the comment box) with the moderator email/password </p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image-11.png" class="kg-image" alt></figure><p>Once you are logged in you see the comment and some buttons to approve (green check) or bin (red trash can) it</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image-12.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/03/image-12.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/03/image-12.png 1000w, https://micronetia.devtru.st/content/images/2021/03/image-12.png 1056w" sizes="(min-width: 720px) 720px"></figure><p>Once you approve it one way or the other the blog post updates automatically to show it approved.  </p><p>Comments you make while logged in as the moderator have a neat "moderator" tag</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/03/image-13.png" class="kg-image" alt></figure><p>That's basically it. You have enabled comments on your blog.</p><p>Enjoy!</p><p>PS The Moderation Settings/Pending Approvals tab does not automatically update when new comments that need approval have been left. You need to go somewhere else and then go back to have it refreshed.</p><p></p>]]></content:encoded></item><item><title><![CDATA[Handling the Load]]></title><description><![CDATA[<p>So yesterday two Micronetia hosted sites were "Instalanched" thanks to two different instapundit contributors posting links to them.</p><p>This site was one and it handled the load just fine. The summary stats are below. The peak unique visitors was just under 1000/hour or one every 3-4 seconds.</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-28.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-28.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-28.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-28.png 1013w" sizes="(min-width: 720px) 720px"></figure><p>The site</p>]]></description><link>https://micronetia.devtru.st/handling-the-load/</link><guid isPermaLink="false">601a359df851ac0478d496d5</guid><category><![CDATA[micronetia]]></category><category><![CDATA[eating the dogfood]]></category><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Wed, 03 Feb 2021 09:08:54 GMT</pubDate><content:encoded><![CDATA[<p>So yesterday two Micronetia hosted sites were "Instalanched" thanks to two different instapundit contributors posting links to them.</p><p>This site was one and it handled the load just fine. The summary stats are below. The peak unique visitors was just under 1000/hour or one every 3-4 seconds.</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-28.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-28.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-28.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-28.png 1013w" sizes="(min-width: 720px) 720px"></figure><p>The site is running on a Pi3B so far as I can tell had absolutely no problems handling the load. It is worth noting that this site is heavily textual and the text had mostly been cached by Cloudflare over the preceeding hours and days</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-30.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-30.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-30.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-30.png 1284w" sizes="(min-width: 720px) 720px"></figure><p>As you can see from the graph, traffic went from near zero to ~600MB/hour (the free cloudflare plan doesn't give greater granularity, my guess is that a significant chunk of that 600MB was in the first few minutes after the link was posted). But the vast majority (90%) of that load was cached and the cache is now serving almost 95% of all requests which is precisely what the cloudflare part of the micronetia concept is supposed to be about.</p><p>In brief it all worked exactly as it should have. Yippee!</p><h2 id="uncached-graphics-are-a-problem-with-a-pi3">Uncached Graphics Are a Problem With a Pi3</h2><p>Another site "<a href="https://meme.aho.st/">Glorious Meme Commissary of Proletariat</a>" got hit harder. It is also much, much more graphics heavy - pretty much every page is a meme and there is very little text. It was also initially on a Pi3B but that server struggled to deliver the initial requests so that Cloudflare could cache them. Putting it on a 4GB Pi4 and it handled the load with no problem at all. It too is now at a shade under 95% cached and so could probably be moved back to the Pi3</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-27.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-27.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-27.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-27.png 1026w" sizes="(min-width: 720px) 720px"></figure><p>Looking at the bandwidth is instructive</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-29.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-29.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-29.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-29.png 1291w" sizes="(min-width: 720px) 720px"></figure><p>The first hour the Pi3 had a problem fulfilling requests from about 600 users of about 130MBytes. In fact at one point when I went to take a look, the Cloudflare proxy reported that the site was down although, as I understand it, the pi itself was doing OK if you were logged in via SSH. However it did report very high memory usage. </p><p>Once the Pi3 was shut down and the SD card was plugged into the Pi4 the problems went away. The Pi4 was able to handle over 8000 requests in the hour (15-20% of the total) and deliver over 600MB of data (= 10MB/minute) without any problem at all. However if you look at the graph at 7pm-9pm that was about 10% of the total load so the Cloudflare cacheing really made a difference.</p><h2 id="lessons">Lessons</h2><p>Lesson one is that cacheing in advance of heavy traffic is critical. Once cloudflare can handle most of the load a Pi3 is perfectly fine as a host. However in the initial hit, if things aren't cached a Pi4 with its extra memory and fast processor is needed to be able to serve uncached requests. There's no doubt in my mind that it should be possible to serve more data from the Pi3, my guess is that Ghost isn't very efficient and that if there were a way to have a static blog platform the Pi3 would be fine handling the hundreds of requests and megabytes of data per second that would be required to handle a similar traffic spike.</p><p>Lesson two is that if you have more than one pi, you can swap out your hardware really quickly. It takes maybe 30 seconds to shut one down and no more than a couple of minutes after that to eject the SD card, insert it into a new pi, power that one on and have it up and running. At least that's the case for ghost. It can take a couple of minutes longer for rocket.chat if you have installed that too - as I discovered when trying to do some minimal performance testing.</p><p>The nice bit about swapping out the SD card is that the new hardware keeps the exact same configuration in network etc. terms as the old one so the IP address is the same, SSH still works, cloudlared etc. still connects and so on.</p>]]></content:encoded></item><item><title><![CDATA[Adding a Chat Server]]></title><description><![CDATA[<p>OK so you have your Pi running, hosting a blog, and you want to do more. What can you do?</p><p>One obvious and easy answer is to add a chat server and there's really only one sensible chat server to add, that is Rocket Chat. Rocket chat is available as</p>]]></description><link>https://micronetia.devtru.st/adding-a-chat-server/</link><guid isPermaLink="false">6017945ebf6fcb0322f8b16e</guid><category><![CDATA[Advanced]]></category><category><![CDATA[chat server]]></category><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Mon, 01 Feb 2021 12:19:23 GMT</pubDate><media:content url="https://micronetia.devtru.st/content/images/2021/02/rocketlogo.png" medium="image"/><content:encoded><![CDATA[<img src="https://micronetia.devtru.st/content/images/2021/02/rocketlogo.png" alt="Adding a Chat Server"><p>OK so you have your Pi running, hosting a blog, and you want to do more. What can you do?</p><p>One obvious and easy answer is to add a chat server and there's really only one sensible chat server to add, that is Rocket Chat. Rocket chat is available as a snap package that can be installed in a few minutes. Once you have it installed you can optimize things a bit to improve performance and so on but this is, for the most part, a 15 minute project.</p><p>The one caveat is that rocket chat allegedly really hammers your "disk" drive under load. I have not encountered this personally, but then I only installed rocket chat as a test and my chat server has never had mare than two or three people on it at once. </p><h2 id="installation">Installation</h2><p>Installing up rocket chat requires that you first install snapd and then reboot.</p><pre><code>server@micronetia:~ $ sudo apt install snapd
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  apparmor liblzo2-2 squashfs-tools
Suggested packages:
  apparmor-profiles-extra apparmor-utils zenity | kdialog
The following NEW packages will be installed:
  apparmor liblzo2-2 snapd squashfs-tools
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.5 MB of archives.
...
server@micronetia:~ $ sudo reboot</code></pre><p>Once the pi has rebooted and you can SSH back into it you can install the rocket chat snap</p><pre><code>server@micronetia:~ $ sudo snap install rocketchat-server
2021-01-29T04:56:16Z INFO Waiting for restart...
rocketchat-server 1.3.2 from Rocket.Chat (rocketchat✓) installed
Channel latest/stable for rocketchat-server is closed; temporarily forwarding to stable.
server@micronetia:~ $</code></pre><p>When that has finished (it takes a while) you can check that it works by going to http://pi.add.re.ss:3000/ and following the instructions to setup an initial user etc.</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-9.png" class="kg-image" alt="Adding a Chat Server" srcset="https://micronetia.devtru.st/content/images/2021/02/image-9.png 600w"></figure><p>The setup wizard is pretty obvious. One thing to think about is whether you want to have separate administrators or to make certain users also be admins because that affects what you call this admin user.</p><p>In the next screens the main thing you'll want to do is ensure the server is public (unless you don't want that) </p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-10.png" class="kg-image" alt="Adding a Chat Server"></figure><p>and then decide if you are going to register it with rocket.chat (probably not).</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-11.png" class="kg-image" alt="Adding a Chat Server"></figure><p>After that you are done with the wizard  </p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-12.png" class="kg-image" alt="Adding a Chat Server" srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-12.png 600w, https://micronetia.devtru.st/content/images/2021/02/image-12.png 940w" sizes="(min-width: 720px) 720px"></figure><p>Clicking on the "Go to your workspace" link shows you a basic rocket chat setup with one channel "General" and some hints and tips. To get to more admin sections you need to hover over the vertical dots at the top right of the menu bar</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-13.png" class="kg-image" alt="Adding a Chat Server" srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-13.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-13.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-13.png 1136w" sizes="(min-width: 720px) 720px"></figure><p>The next step is to make it public. </p><p>The next section assumes this is the same server as the micronetia blog server. If it isn't you are going to have to repeat a couple of the steps from that server - specifically you'll need to create a new route and tunnel. If you look at the setupcf.sh script in /usr/local/bin it will probably be fairly clear. If it isn't then contact me and I'll give instructions.</p><p>Login to <a href="https://dash.cloudflare.com/">your cloudflare account</a> and click on the DNS tab</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-14.png" class="kg-image" alt="Adding a Chat Server"></figure><p>In the table below you'll see the record that cloudflared automatically created for your blog. Click edit on that.</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-20.png" class="kg-image" alt="Adding a Chat Server" srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-20.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-20.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-20.png 1025w" sizes="(min-width: 720px) 720px"></figure><p>You'll see the target is some complicated random looking string. If you click in the box you'll see it ends ".cfargotunnel.com". Select and copy the whole thing. I.e. all of "0f7a.....cfargotunnel.com" in the screenshot</p><p>Now click on add record at the top</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-16.png" class="kg-image" alt="Adding a Chat Server"></figure><p>You'll get a form that you should fill in like this</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-21.png" class="kg-image" alt="Adding a Chat Server" srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-21.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-21.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-21.png 1021w" sizes="(min-width: 720px) 720px"></figure><p>Select the Type first as CNAME. Then choose the name for your rocket chat server (it's going to be name.mydomain.com - in my case example-chat.devtru.st) and finally paste in the text you copied from the blog DNS entry (in the example it is "0f7a.....cfargotunnel.com") and click on Save.</p><p>Now go back to the SSH terminal to your server. What we want to do is edit the config.yml file that setupcf.sh created. At some point I'll write this as a script but for now we do this manually (and yes if you are familiar with nano or vi, feel free to use those instead of what I'm doing here). First we check that the file looks correct and that the last two lines are the tunnel and credentials file</p><pre><code>server@micronetia:~ $ cat /etc/cloudflared/config.yml
hostname: example.devtru.st
url: http://localhost:2368
tunnel: 0f7a1303-c386-dead-beef-e78385062e4f
credentials-file: /root/.cloudflared/0f7a1303-c386-dead-beef-e78385062e4f.json
server@micronetia:~ $ tail -n 2 /etc/cloudflared/config.yml 
tunnel: 0f7a1303-c386-dead-beef-e78385062e4f
credentials-file: /root/.cloudflared/0f7a1303-c386-4159-a865-e78385062e4f.json
server@micronetia:~ $</code></pre><p>Now we create a new file in /tmp from those last two lines and then add the word "ingress:" and then two pairs lines. One for the ghost service with the original domain name and a new one for the chat service with the new domain name.</p><pre><code>server@micronetia:~ $ tail -n 2 /etc/cloudflared/config.yml &gt;/tmp/config.yml
server@micronetia:~ $ echo "ingress:" &gt;&gt;/tmp/config.yml 
server@micronetia:~ $ echo "  - hostname: example.devtru.st"  &gt;&gt;/tmp/config.yml
server@micronetia:~ $ echo "    service: http://localhost:2368"  &gt;&gt;/tmp/config.yml
server@micronetia:~ $ echo "  - hostname: example-chat.devtru.st"  &gt;&gt;/tmp/config.yml
server@micronetia:~ $ echo "    service: http://localhost:3000"  &gt;&gt;/tmp/config.yml
server@micronetia:~ $ echo "  - service: http_status:404"  &gt;&gt;/tmp/config.yml
server@micronetia:~ $</code></pre><p>Then check that the new file looks correct. Note the number of indents is important! and run the cloudflared validate command against it</p><pre><code>server@micronetia:~ $ cat /tmp/config.yml 
tunnel: 0f7a1303-c386-dead-beef-e78385062e4f
credentials-file: /root/.cloudflared/0f7a1303-c386-dead-beef-e78385062e4f.json
ingress:
  - hostname: example.devtru.st
    service: http://localhost:2368
  - hostname: example-chat.devtru.st
    service: http://localhost:3000
  - service: http_status:404
server@micronetia:~ $ cloudflared tunnel --config /tmp/config.yml ingress validate
Validating rules from /tmp/config.yml
OK

server@micronetia:~ $</code></pre><p>If you made a mistake then go back and repeat from the command <strong>tail -n 2 /etc/cloudflared/config.yml &gt;/tmp/config.yml</strong></p><p>If it's OK then we can backup the existing .yml file and copy the new one in. Note I do a couple of <strong>ls</strong> commands to make sure it's what it should be</p><pre><code>server@micronetia:~ $ cd /etc/cloudflared/
server@micronetia:/etc/cloudflared $ sudo mv config.yml config.yml.org
server@micronetia:/etc/cloudflared $ sudo mv /tmp/config.yml config.yml
server@micronetia:/etc/cloudflared $ ls -l
total 8
-rw-r--r-- 1 server server 301 Feb  1 08:58 config.yml
-rw-r--r-- 1 root   root   179 Feb  1 02:37 config.yml.org
server@micronetia:/etc/cloudflared $ sudo chown root:root config.yml
server@micronetia:/etc/cloudflared $ sudo cp config.yml /root/.cloudflared/
server@micronetia:/etc/cloudflared $ sudo ls -l /root/.cloudflared/
total 12
-rw------- 1 root root  191 Feb  1 02:35 0f7a1303-c386-dead-beef-e78385062e4f.json
-rw------- 1 root root 1926 Feb  1 02:35 cert.pem
-rw-r--r-- 1 root root  301 Feb  1 09:03 config.yml
server@micronetia:/etc/cloudflared $</code></pre><p>Finally we can restart the cloudflared service and check that it is happy</p><pre><code>server@micronetia:/etc/cloudflared $ sudo service cloudflared restart
server@micronetia:/etc/cloudflared $ sudo service cloudflared status
● cloudflared.service - Argo Tunnel
   Loaded: loaded (/etc/systemd/system/cloudflared.service; enabled; vendor pres
   Active: active (running) since Mon 2021-02-01 09:04:14 GMT; 31s ago
 Main PID: 9586 (cloudflared)
    Tasks: 10 (limit: 2063)
   CGroup: /system.slice/cloudflared.service
           └─9586 /usr/local/bin/cloudflared --config /etc/cloudflared/config.ym

Feb 01 09:04:11 micronetia cloudflared[9586]: 9:04AM INF GOOS: linux, GOVersion:
Feb 01 09:04:11 micronetia cloudflared[9586]: 9:04AM INF Settings: map[config:/r
Feb 01 09:04:11 micronetia cloudflared[9586]: 9:04AM INF Autoupdate frequency is
Feb 01 09:04:11 micronetia cloudflared[9586]: 9:04AM INF Initial protocol h2mux
Feb 01 09:04:11 micronetia cloudflared[9586]: 9:04AM INF Starting metrics server
Feb 01 09:04:14 micronetia cloudflared[9586]: 9:04AM INF Connection 3eadcd87-820
Feb 01 09:04:14 micronetia systemd[1]: Started Argo Tunnel.
Feb 01 09:04:15 micronetia cloudflared[9586]: 9:04AM INF Connection c331d69f-28e
Feb 01 09:04:17 micronetia cloudflared[9586]: 9:04AM INF Connection 18d2ab8f-82d
Feb 01 09:04:17 micronetia cloudflared[9586]: 9:04AM INF Connection 86155d13-2f2
server@micronetia:/etc/cloudflared $</code></pre><p>Now in your browser test that both the original ghost blog and the new chat servers can be loaded (https://example.devtru.st and https://example-chat.devtru.st in this example). Assuming the latter loaded correctly (it may take some time the first time because cloudflare will be loading it from your pi and that can be slow) you can now log in using the email etc. you created when you were accessing it locally</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-22.png" class="kg-image" alt="Adding a Chat Server"></figure><p>Useful things to customize in the admin pages are the site url in the General tab (change it from localhost to your real url)</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-23.png" class="kg-image" alt="Adding a Chat Server" srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-23.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-23.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-23.png 1503w" sizes="(min-width: 720px) 720px"></figure><p>Add relevant the images in the Assets tab </p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-24.png" class="kg-image" alt="Adding a Chat Server" srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-24.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-24.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-24.png 1096w" sizes="(min-width: 720px) 720px"></figure><p>Finally you may want to limit everyone from signing up by editing the Registration section in the Accounts tab </p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-25.png" class="kg-image" alt="Adding a Chat Server" srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-25.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-25.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-25.png 1258w" sizes="(min-width: 720px) 720px"></figure><p>I also recommend figuring out how to send email though so you can have people reset passwords and so on. That requires you to have an account with someone like <a href="https://elasticemail.com/">elastic email</a> or <a href="https://moonmail.io">moon mail</a> and then adding the appropriate details to the Email/SMTP section</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-26.png" class="kg-image" alt="Adding a Chat Server" srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-26.png 600w, https://micronetia.devtru.st/content/images/2021/02/image-26.png 992w" sizes="(min-width: 720px) 720px"></figure><p>Setting up the email forwarder is far beyond the scope of this document because to get it working you'll need to get the magic incantations about SPF and DKIM and the like right and that's very dependent on your mail provider.</p>]]></content:encoded></item><item><title><![CDATA[Micronetia Setup]]></title><description><![CDATA[<p>Here's how to set up your own personal micronetia system, hosted where ever is convenient to you but visible to everyone in the world that you want to allow to visit.</p><p>If you know what you are doing, have a pi and control a suitable domain name then this takes</p>]]></description><link>https://micronetia.devtru.st/micronetia-setup/</link><guid isPermaLink="false">600fc8a917287709931daae3</guid><category><![CDATA[Getting Started]]></category><category><![CDATA[micronetia]]></category><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Mon, 01 Feb 2021 03:44:29 GMT</pubDate><content:encoded><![CDATA[<p>Here's how to set up your own personal micronetia system, hosted where ever is convenient to you but visible to everyone in the world that you want to allow to visit.</p><p>If you know what you are doing, have a pi and control a suitable domain name then this takes under an hour. </p><p>There are links to more details on what to do/get on each item in the quick instructions.</p><h2 id="quick-instructions">Quick Instructions</h2><p>To start with you need to have </p><ul><li>a Raspberry Pi, a Pi 3B+ or Pi 4 is recommended (plus an ethernet cable and microSD card) - see <a href="https://micronetia.devtru.st/micronetia-hardware/">hardware discussion</a></li><li>an computer with an SSH client (see more on <a href="https://micronetia.devtru.st/ssh-clients/">SSH</a>)</li><li>a domain that you are going to use as the hostname (see more on <a href="https://micronetia.devtru.st/registering-a-domain/">registering domains and hostnames</a>).</li></ul><p>When you have those things you are ready to install </p><p>Download the micronetia image from <a href="https://micronetia.devtru.st/content/images/micronetia-lite.zip">https://micronetia.devtru.st/content/images/micronetia-lite.zip</a> (or <a href="https://gitlab.com/Hellokittygoatse/micronetia">build your own</a>).</p><p>Validate that it is the right image by checking that it matches the following:</p><!--kg-card-begin: html--><table><tbody><tr><td>Size</td><td>527,571,269 Bytes</td></tr>
    <tr><td>MD5 Sum</td><td>69c00a1049fb70b064aa0ff6b4d5de30</td></tr>
    <tr><td>Contents</td><td>2021-01-29-micronetia-lite.img<br> Size: 2,227,175,424 Bytes<br>Date: 2021-01-29 14:10</td></tr></tbody></table><!--kg-card-end: html--><p>Use <a href="https://www.balena.io/etcher/">Balena Etcher</a> (or the <a href="https://www.raspberrypi.org/software/">Official Raspberry Pi Imager</a>) put the image you just downloaded onto a micro SD card. Detailed instructions for the download process are <a href="https://micronetia.devtru.st/download-micronetia/">here</a></p><p>Create a netcfg.txt file to save in the boot partition on the SD card <a href="https://micronetia.devtru.st/netcfg-generator/">using this page</a> (or <a href="https://francisturner.github.io/gencfg.html">this one</a>) - see <a href="https://micronetia.devtru.st/creating-network-config/">details here</a></p><p>Put the SD card into the pi, connect the Pi to the LAN and power it up. </p><p>When it has booted up ssh into it as user server/password server then change the password, do a software update and then run the command to setup ghost (node.js and ghost are not preinstalled because they tend to update fairly frequently). </p><pre><code>passwd
sudo apt update &amp;&amp; sudo apt upgrade
sudo installghost.sh</code></pre><p>Fuller <a href="https://micronetia.devtru.st/installing-ghost/">instructions and screen shots here</a>.</p><p>While ghost is installing, create a cloudflare account (if you don't have one) and move the target domain to cloudflare's name servers following <a href="https://micronetia.devtru.st/creating-a-cloudflare-account/">the instructions here</a></p><p>Then visit http://pi.ip.add.ress/ghost/ to add the initial ghost user and perhaps choose an initial theme and so on, <a href="https://micronetia.devtru.st/setting-up-ghost/">more details here</a>. </p><p>Once you are happy with your initial ghost setup you can do the final step and create the cloudflare tunnel and proxy</p><pre><code>sudo setupcf.sh
</code></pre><p>While running setupcf.sh you need to paste a link from the terminal into cloudflare and then verify that the routing works <a href="https://micronetia.devtru.st/setting-up-cloudflare/">as explained here</a>.</p><p>Done. Your micronetia setup is complete.</p><p></p>]]></content:encoded></item><item><title><![CDATA[Setting up Cloudflare]]></title><description><![CDATA[<p>The final step is Setting up Cloudflare to proxy traffic to your pi. It requires running another script on your pi and a couple of browser tabs.</p><p>The script is run by doing <strong>sudo setupcf.sh</strong> which starts off by checking the version of the "cloudflared" program and offering to</p>]]></description><link>https://micronetia.devtru.st/setting-up-cloudflare/</link><guid isPermaLink="false">60176877bf6fcb0322f8b0df</guid><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Mon, 01 Feb 2021 03:37:39 GMT</pubDate><content:encoded><![CDATA[<p>The final step is Setting up Cloudflare to proxy traffic to your pi. It requires running another script on your pi and a couple of browser tabs.</p><p>The script is run by doing <strong>sudo setupcf.sh</strong> which starts off by checking the version of the "cloudflared" program and offering to try and download a new one</p><pre><code>server@micronetia:~/blog $ sudo setupcf.sh 
Current Cloudflared version
cloudflared version 2021.1.5 (built 2021-01-18-1215 UTC)
Do you want to try to download a newer version of cloudflared?</code></pre><p>If you see "Segment fault" at this point you have an older pi and will need to see the pizero discussion in the Hardware page for how to get the right cloudflared. If the version is fairly recent there's no need to try downloading a new one.</p><p>Then it runs cloudflared to print out a link that you copy into your browser</p><pre><code>Do you want to try to download a newer version of cloudflared?n
Connecting to cloudflare to log this device into your account, copy the URL into your browser
Please open the following URL and log in with your Cloudflare account:

https://dash.cloudflare.com/argotunnel?callback=https%3A%2F%2Flogin.argotunnel.com%2FRZEnjI3saggsdfhyXhJl6g9z2Nw2HRb1Y7MmfmUJR1c%3D

Leave cloudflared running to download the cert automatically.
2:34AM INF Waiting for login...
</code></pre><p>In the browser, if you are not already logged in to your account you will need to log in and are then redirected to a page like the one below, if not it shows up immediately. </p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-24.png" class="kg-image" alt></figure><p>Select the domain (for most people there is only one)</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/Screenshot_2021-01-24_20-09-52.png" class="kg-image" alt></figure><p>Confirm that it is what you want and see the following message in the browser:</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-25.png" class="kg-image" alt></figure><p>If your browser offers to download a file called cert.pem at this point you can ignore this.</p><p>Going back to the terminal session you should see the following.</p><pre><code>You have successfully logged in.
If you wish to copy your credentials to a server, they have been saved to:
/root/.cloudflared/cert.pem
Creating Cloudflared tunnel, routing it to this pi and so on.

Blog hostname (e.g. blog.mydomain.com):</code></pre><p>Answer the question and then once you've checked that it is correct hit Y (or hit N and re-enter). Please make sure before you do this that the hostname is not currently pointing to anything. Also it needs to not be the domain you registered. i.e. if you registered mydomain.com your blog can be blog.mydomain.com or www.mydomain.com or somethingverylong.mydomain.com. It cannot be plain mydomain.com (we can point mydomain.com to the ghost hostname later if you want to do that)</p><p>You can choose any name you want, in the example below I use "example.devtru.st" </p><pre><code>Blog hostname (e.g. blog.mydomain.com): example.devtru.st
Blog to be hosted at https://example.devtru.st/
Is this correct? (Y/N): y
2:35AM INF Tunnel credentials written to /root/.cloudflared/0f7a1303-c386-dead-beef-e78385062e4f.json. cloudflared chose this file based on where your origin certificate was found. Keep this file secret. To revoke these credentials, delete the tunnel.
2:35AM INF Created tunnel example-tunnel with id 0f7a1303-c386-4159-a865-e78385062e4f
2:35AM INF Added CNAME example.devtru.st which will route to this tunnel tunnelID=0f7a1303-c386-dead-beef-e78385062e4f
2:35AM INF Starting tunnel tunnelID=0f7a1303-c386-4159-a865-e78385062e4f
2:35AM INF Version 2021.1.5
2:35AM INF GOOS: linux, GOVersion: go1.15.6, GoArch: arm
2:35AM INF Settings: map[hello-world:true hostname:example.devtru.st]
2:35AM INF cloudflared will not automatically update when run from the shell. To enable auto-updates, run cloudflared as a service: https://developers.cloudflare.com/argo-tunnel/reference/service/
2:35AM INF Initial protocol h2mux
2:35AM INF Starting metrics server on 127.0.0.1:46147/metrics
2:35AM INF Starting Hello World server at 127.0.0.1:38593
2:35AM INF Connection 8ab130fa-861f-4046-8333-a0b8d36cc889 registered connIndex=0 location=SIN
2:35AM INF Connection 0b11f5d4-bfa9-4c1e-809c-c8ab607f86f7 registered connIndex=1 location=NRT
2:35AM INF Connection e84a4d59-065b-4c05-a971-0ca79b4bbd2d registered connIndex=2 location=SIN
2:35AM INF Connection 767ff141-e4fd-4b40-9468-0e678fe77374 registered connIndex=3 location=NRT</code></pre><p>Assuming no errors you can now go visit your blog hostname (whatever you entered above) in a browser and hopefully you have a page like this:</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-26.png" class="kg-image" alt></figure><p>Then go back to the terminal and press CRTL-C to end the tunnel</p><pre><code>^C2:36AM INF Initiating graceful shutdown due to signal interrupt ...
2:36AM INF Quitting...
2:36AM INF mux - metrics: Stopping mux metrics updater
2:36AM INF Metrics server stopped
2:36AM INF mux - metrics: Stopping mux metrics updater
2:36AM INF mux - metrics: Stopping mux metrics updater
Check to make sure no errors

config.yml
hostname: example.devtru.st
url: http://localhost:2368
tunnel: 0f7a1303-c386-dead-beef-e78385062e4f
credentials-file: /root/.cloudflared/0f7a1303-c386-dead-beef-e78385062e4f.json
\n 0f7a1303-c386-dead-beef-e78385062e4f.json
{"AccountTag":"14a7a3c4fJHGKJHG1c7fce5ab140fb05","TunnelSecret":"iOVih5N7OGmmfg/pyPVdU5nHASHHASJHAS=","TunnelID":"0f7a1303-c386-dead-beef-e78385062e4f","TunnelName":"example-tunnel"}Install as service?</code></pre><p>Assuming the "You create a tunnel" page showed up and the text in your terminal looks similar to the above answer Y to make it a service that starts up automatically when the pi boots up and runs all the time. </p><p>If it doesn't enter N and refer to the (currently non-existent) troubleshooting section</p><pre><code>Install as service?y
2:37AM INF Using Systemd
2:37AM INF systemctl daemon-reload
updating the ghost config to use https://example.devtru.st/
✔ Restarting Ghost
server@micronetia:~ $ </code></pre><p>The Pi is now up and serving your blog. So go check that by going to the url in the terminal (https://example.devtru.st/ in this case) and seeing that it displays your blog. Finally go to the /ghost/ url on the domain (i.e. https://example.devtru.st/ghost/ ) and login write your first real post.</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-8.png" class="kg-image" alt></figure><p>Congratulations. You have set up your micronetia node. If you want to link it to others drop me a line (micronetia AT devtru  DOT st ) and I'll add it to the <a href="https://micronetia.devtru.st/links/">links</a> page on this blog</p>]]></content:encoded></item><item><title><![CDATA[Setting Up Ghost]]></title><description><![CDATA[<p>When you go to <a href="http://192.168.0.250/ghost/">http://192.168.0.250/ghost/</a> or whatever the local IP address is of your pi you'll see a screen like this</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image.png 600w, https://micronetia.devtru.st/content/images/2021/02/image.png 762w" sizes="(min-width: 720px) 720px"></figure><p>Click on "Create Your Account" and then fill in the details. You can change all of this later if you decide to do different</p>]]></description><link>https://micronetia.devtru.st/setting-up-ghost/</link><guid isPermaLink="false">60175a29bf6fcb0322f8b04a</guid><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Mon, 01 Feb 2021 02:32:58 GMT</pubDate><content:encoded><![CDATA[<p>When you go to <a href="http://192.168.0.250/ghost/">http://192.168.0.250/ghost/</a> or whatever the local IP address is of your pi you'll see a screen like this</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image.png 600w, https://micronetia.devtru.st/content/images/2021/02/image.png 762w" sizes="(min-width: 720px) 720px"></figure><p>Click on "Create Your Account" and then fill in the details. You can change all of this later if you decide to do different things. </p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-1.png" class="kg-image" alt></figure><p>The email address doesn't have to be real, but it probably helps if it is for stuff in the future. When you are satisfied with what you have input click the "Last step" button to move on to the next step.</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-2.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-2.png 600w, https://micronetia.devtru.st/content/images/2021/02/image-2.png 796w" sizes="(min-width: 720px) 720px"></figure><p>Don't bother inviting staff users because email doesn't work in this configuration, just click the "I'll do this later" link</p><p>Now you'll see the admin panel for your blog (and an error display because there's a known misconfiguration that doesn't matter)</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-3.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-3.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-3.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-3.png 1310w" sizes="(min-width: 720px) 720px"></figure><p>The things you are going to want to configure mean that the fact that the site doesn't display inside the admin page is irrelevant. You can just load a new tab with the root http://192.168.0.250/ url to see what's there.</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-5.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-5.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-5.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-5.png 1065w" sizes="(min-width: 720px) 720px"></figure><p>Right now that is half a dozen or so blog items from Ghost explaining how to set your blog up. It is well worth reading all of them.</p><p>If you want to fix the misconfiguration issue then that's three lines in the SSH terminal</p><pre><code>server@micronetia:~ $ H=`hostname -I| sed 's/ //g'`
server@micronetia:~ $ sed "s/localhost:2368/$H/" -i blog/config.development.json 
server@micronetia:~ $ cd blog; ghost restart
✔ Restarting Ghost
server@micronetia:~/blog $  </code></pre><p>The reload the tabs in your browser</p><p>At a guess what you probably want to tinker with are the General and Design pages.</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-4.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-4.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-4.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-4.png 1248w" sizes="(min-width: 720px) 720px"></figure><p>In the General settings page uploading icons and logos is a good thing as is writing something in the Description field (and perhaps changing the title if you had second thoughts).</p><p>In design the most likely thing you'll want to change are the links at the top and then visiting the <a href="https://ghost.org/marketplace/">market place</a> to download a template</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-6.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-6.png 600w, https://micronetia.devtru.st/content/images/size/w1000/2021/02/image-6.png 1000w, https://micronetia.devtru.st/content/images/2021/02/image-6.png 1216w" sizes="(min-width: 720px) 720px"></figure><p>This blog, for example, uses the <a href="https://github.com/TryGhost/Editorial">Editorial theme</a>. Note that when you want to download a theme you need click on the Code button and then the Download ZIP link</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/02/image-7.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/02/image-7.png 600w, https://micronetia.devtru.st/content/images/2021/02/image-7.png 925w" sizes="(min-width: 720px) 720px"></figure><p>You save that to your computer and then click "Upload a Theme" at the bottom of the design settings page.</p><p>Once you have the basics working you can upload your first test post and do as the ghost instructions suggest and delete or hide the ghost user and its guide posts.</p>]]></content:encoded></item><item><title><![CDATA[Installing Ghost]]></title><description><![CDATA[<p>Once the pi has booted, we need to check everything is working. The first thing to check is that it has the IP address you expected. Use ping to check that it is alive. Bear in mind that it can take a minute or so for the pi to boot</p>]]></description><link>https://micronetia.devtru.st/installing-ghost/</link><guid isPermaLink="false">6014e2d9bf6fcb0322f8afcf</guid><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Mon, 01 Feb 2021 01:31:51 GMT</pubDate><content:encoded><![CDATA[<p>Once the pi has booted, we need to check everything is working. The first thing to check is that it has the IP address you expected. Use ping to check that it is alive. Bear in mind that it can take a minute or so for the pi to boot up so you may miss a few pings if you are too eager.</p><pre><code>$ ping 192.168.0.250
PING 192.168.0.250 (192.168.0.250) 56(84) bytes of data. 
64 bytes from 192.168.0.250: icmp_seq=6 ttl=63 time=8.70 ms 
64 bytes from 192.168.0.250: icmp_seq=7 ttl=63 time=5.11 ms 
64 bytes from 192.168.0.250: icmp_seq=8 ttl=63 time=26.3 ms 
64 bytes from 192.168.0.250: icmp_seq=9 ttl=63 time=6.02 ms 
64 bytes from 192.168.0.250: icmp_seq=10 ttl=63 time=5.78 ms</code></pre><p>If ping doesn't work then you'll need to go to the troubleshooting section for hints as to what to do.</p><p>Once ping has worked, ssh to it as user 'server' password 'server' (don't type the quotes) from your terminal or SSH utility.</p><pre><code>$ ssh server@192.168.0.250
The authenticity of host '192.168.0.250 (192.168.0.250)' can't be established.
ECDSA key fingerprint is SHA256:ORkN03LOdHWi1V5r3/Lu/z0138vJcfWxaP0HyPBAcuE.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.250' (ECDSA) to the list of known hosts.
server@192.168.0.250's password:
Linux micronetia 5.4.83-v7+ #1379 SMP Mon Dec 14 13:08:57 GMT 2020 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.

server@micronetia:~ $</code></pre><p>change the password to something other than server with the <strong>passwd</strong> command:</p><pre><code>server@micronetia:~ $ passwd
Changing password for server.
Current password:
New password:
Retype new password:
passwd: password updated successfully
server@micronetia:~ $</code></pre><p>update the software with <strong>sudo apt update &amp;&amp; sudo apt upgrade</strong> answer Y when you are asked to agree to the update. If you get messages about the LOCALE not being set you can ignore them.</p><pre><code>server@micronetia:~ $ sudo apt update &amp;&amp; sudo apt upgrade
Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]         
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]      
Get:3 http://archive.raspberrypi.org/debian buster/main armhf Packages [351 kB]
Fetched 399 kB in 3s (139 kB/s)   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  rpi-eeprom
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 418 kB of archives.
After this operation, 528 kB of additional disk space will be used.
Do you want to continue? [Y/n] y</code></pre><p>If the update fails to connect to the raspbian repositories then you probably have the DNS set up wrong and you should refer to the troubleshooting section for more tips</p><h2 id="install-nodejs-ghost-and-login-to-ghost">Install Nodejs, Ghost and login to Ghost</h2><p>Once updated you need to install nodejs, npm and ghost. There's a script to do all of this that you run with <strong>sudo installghost.sh</strong></p><pre><code>server@micronetia:~ $ sudo installghost.sh

## Installing the NodeSource Node.js 12.x repo...


## Populating apt-get cache...
...

/usr/bin/ghost -&gt; /usr/lib/node_modules/ghost-cli/bin/ghost
+ ghost-cli@1.15.3
added 420 packages from 208 contributors in 81.874s
----------------------------------
 Node.js and ghost cli installed

Now installing ghost itself into ~/blog


✔ Checking system Node.js version
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
✔ Checking for latest Ghost version
✔ Setting up install directory
✔ Downloading and installing Ghost v3.41.2</code></pre><p>The script gets the right version of node, installs it and then installs first the ghost-cli package and then ghost itself in the blog directory. The download and install of ghost takes a while. Eventually though you should see this</p><pre><code>...
✔ Finishing install process
✔ Configuring Ghost
✔ Setting up instance
✔ Starting Ghost

Ghost uses direct mail by default. To set up an alternative email method read our docs at https://ghost.org/docs/concepts/config/#mail

------------------------------------------------------------------------------

Ghost was installed successfully! To complete setup of your publication, visit: 

    http://localhost:2368/ghost/

checking ghost worked

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;meta charset="utf-8" /&gt;
    &lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&gt;
    &lt;title&gt;Ghost&lt;/title&gt;
    &lt;meta name="HandheldFriendly" content="True" /&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&gt;
    &lt;link rel="stylesheet" type="text/css" href="/assets/built/screen.css?v=03cf02f054" /&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div class="site-wrapper"&gt;

        &lt;header class="site-header no-image"&gt;
            &lt;div class="site-nav-main outer"&gt;
                &lt;div class="inner"&gt;
                    &lt;nav class="site-nav-center"&gt;
                        &lt;a class="site-nav-logo" href="http://localhost:2368"&gt;&lt;img src="https://static.ghost.org/v1.0.0/images/ghost-logo.svg"
                                alt="Ghost" /&gt;&lt;/a&gt;
                    &lt;/nav&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/header&gt;

        &lt;main id="site-main" class="site-main outer error-content"&gt;
            &lt;div class="inner"&gt;

                &lt;section class="error-message"&gt;
                    &lt;h1 class="error-code"&gt;503&lt;/h1&gt;
                    &lt;p class="error-description"&gt;Site is starting up, please wait a moment then retry.&lt;/p&gt;
                    &lt;a class="error-link" href="http://localhost:2368"&gt;Go to the front page →&lt;/a&gt;
                &lt;/section&gt;


            &lt;/div&gt;
        &lt;/main&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
Did you get a load of HTML? (Y/N):</code></pre><p>Assuming you got a load of HTML answer Y (if not go to troubleshooting section). The script finishes up and you should do a local ghost setup by pasteing the http link (<a href="http://192.168.0.250/ghost/">http://192.168.0.250/ghost/</a> in the example) into your browser.</p><pre><code>Did you get a load of HTML? (Y/N): y
server {
	listen 80;
	listen [::]:80;

	server_name 192.168.0.250;

	location / {
        proxy_pass      http://localhost:2368/;
	}
}
Now go to http://192.168.0.250/ghost/ in your browser to create a ghost user etc.
server@micronetia:~ $</code></pre><p>Note you can technically skip the setting up of ghost until later, but I don't recommend it because it's a security hole. Right now ghost is only accessible to computers on your local network so the fact that anyone can be the first person to sign up as the admin user is perfectly safe. Once you make it public though anyone could do that and that means anyone could be putting stuff on your blog (and locking you out at the same time). So at the very least create the admin user locally before you do anything else.</p><h2 id="troubleshooting">Troubleshooting</h2><p>Section TBD sorry</p>]]></content:encoded></item><item><title><![CDATA[Creating a Cloudflare Account]]></title><description><![CDATA[<p>You will need to have a browser tab logged into your domain registrar for this. </p><p>In a new tab go to <a href="https://dash.cloudflare.com/sign-up">https://dash.cloudflare.com/sign-up</a> and enter your email and a password that you want to use (if your browser suggests one, probably pick that)</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-13.png" class="kg-image" alt></figure><p>Then click on create</p>]]></description><link>https://micronetia.devtru.st/creating-a-cloudflare-account/</link><guid isPermaLink="false">6014df5fbf6fcb0322f8af90</guid><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Sat, 30 Jan 2021 04:35:51 GMT</pubDate><content:encoded><![CDATA[<p>You will need to have a browser tab logged into your domain registrar for this. </p><p>In a new tab go to <a href="https://dash.cloudflare.com/sign-up">https://dash.cloudflare.com/sign-up</a> and enter your email and a password that you want to use (if your browser suggests one, probably pick that)</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-13.png" class="kg-image" alt></figure><p>Then click on create account and add the domain you just bought in the next screen</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-14.png" class="kg-image" alt></figure><p>Hit Add site, select the free plan on the next page and click continue</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-15.png" class="kg-image" alt></figure><p>Your domain is then scanned for existing settings which will likely be the host parking setting from the place you registered the domain</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-16.png" class="kg-image" alt></figure><p>Once done click continue again (because we can edit these later) and you get to the screen where you have the cloudflare DNS names</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-17.png" class="kg-image" alt></figure><p>Go back to the domain registrar tab, find the bit where it says to setup the nameservers for your domain and paste in the two cloudflare server names. You may need to click on a link somewhere that says something like "Edit Nameservers" if there isn't an obvious form on the main page.</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/01/image-2.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/01/image-2.png 600w, https://micronetia.devtru.st/content/images/2021/01/image-2.png 865w" sizes="(min-width: 720px) 720px"></figure><p>When you get there it will look something like this </p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/01/image-3.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/01/image-3.png 600w, https://micronetia.devtru.st/content/images/2021/01/image-3.png 870w" sizes="(min-width: 720px) 720px"></figure><p>Select custom name servers and enter the names from the cloudflare tab (probably replacing the default ones). Then hit Change or Save.</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-18.png" class="kg-image" alt></figure><p>Once you have made that change you can logout or close that tab because you won't need it any more</p><p>In the cloudflare tab there click "Done, check nameservers" and then work your way through the quick start guide.</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-19.png" class="kg-image" alt></figure><p>You can accept the defaults and just let it do its thing. Once it is done keep the Cloudflare page open in your browser and go back to the SSH terminal to your pi.</p>]]></content:encoded></item><item><title><![CDATA[Download Micronetia and Create Bootable SD card]]></title><description><![CDATA[<p>There Micronetia project provides an image with almost everything you need either installed or ready to install by running a script and answering a couple of questions. It also lets you provide your pi with a static IP address at boot time. You can get it from the link below</p>]]></description><link>https://micronetia.devtru.st/download-micronetia/</link><guid isPermaLink="false">6014dd3dbf6fcb0322f8af54</guid><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Sat, 30 Jan 2021 04:20:34 GMT</pubDate><content:encoded><![CDATA[<p>There Micronetia project provides an image with almost everything you need either installed or ready to install by running a script and answering a couple of questions. It also lets you provide your pi with a static IP address at boot time. You can get it from the link below (or if you are untrusting/paranoid then go build your own using <a href="https://gitlab.com/Hellokittygoatse/micronetia">these instructions</a>, which you will find easier to do on a pi, but can do perfectly well on any linux host or VM).</p><p>The image to download is -  <a href="https://micronetia.devtru.st/content/images/micronetia-lite.zip">https://micronetia.devtru.st/content/images/micronetia-lite.zip</a> . For those who want to check that they have the right image downloaded, it has the following attributes:</p><!--kg-card-begin: html--><table><tbody><tr><td>Size</td><td>527,571,269 Bytes</td></tr>
    <tr><td>MD5 Sum</td><td>69c00a1049fb70b064aa0ff6b4d5de30</td></tr>
    <tr><td>Contents</td><td>2021-01-29-micronetia-lite.img<br> Size: 2,227,175,424 Bytes<br>Date: 2021-01-29 14:10</td></tr></tbody></table><!--kg-card-end: html--><p>Using a tool like <a href="https://www.balena.io/etcher/">Balena Etcher</a> (or the <a href="https://www.raspberrypi.org/software/">Official Raspberry Pi Imager</a>) put the image you just downloaded onto a micro SD card. For etcher it is as simple as selecting the image you just downloaded</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-2.png" class="kg-image" alt></figure><p>Then select the correct drive to use (If you only have one SDcard/USB drive connected Etcher will usually get it right automatically) and then once that is correct click on "Flash!"</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-3.png" class="kg-image" alt></figure><p>Etcher then copies the image to the SD card, this takes a few minutes</p><figure class="kg-card kg-image-card"><img src="http://raspbian.devtru.st/Etcher03.jpg" class="kg-image" alt></figure><p>Once Etcher has finished you can close it. You should probably eject and reinsert the SD Card. If you are using windows and get a message like this, press Cancel</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-4.png" class="kg-image" alt></figure><p>The process is more or less the same for the Raspberry Pi Imager though the graphics are slightly different. The key difference is that when you press the "Choose OS" button, you then need to scroll down to "Use Custom" to get to select the image you just downloaded</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-5.png" class="kg-image" alt></figure>]]></content:encoded></item><item><title><![CDATA[Creating Network Config]]></title><description><![CDATA[<p>Once you have flashed the image, you need to create the file that will give your pi its initial IP address - if you don't it will get a DHCP address, this is bad because it will likely change from time to time and you have to figure out what</p>]]></description><link>https://micronetia.devtru.st/creating-network-config/</link><guid isPermaLink="false">6014db95bf6fcb0322f8af38</guid><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Sat, 30 Jan 2021 04:12:28 GMT</pubDate><content:encoded><![CDATA[<p>Once you have flashed the image, you need to create the file that will give your pi its initial IP address - if you don't it will get a DHCP address, this is bad because it will likely change from time to time and you have to figure out what it is. Go to <a href="https://micronetia.devtru.st/netcfg-generator/">this page</a> (or <a href="https://francisturner.github.io/gencfg.html">this alternative</a> if you want) and fill in the details and create the configuration file. If you don't know your LAN's IP subnet, you can find out by clicking on the network link on your PC and it will tell you your IP address, the subnet mask and the default route/gateway. Below is the screenshot for Windows 10, Macs and linux PCs have similar options.</p><figure class="kg-card kg-image-card"><img src="https://testpi.2tru.st/content/images/2021/01/image-6.png" class="kg-image" alt></figure><p>Usually the network is 192.168.x.0, the default gateway is 192.168.x.1 and the subnet mask is /24 (also displayed as 255.255.255.0). x is often 0,1 or 2 but it can be any number up to 255. The pi will need a static IP address and I tend to recommend ones up near the top of the subnet because routers tend to give out DHCP addresses at the lower end.</p><p>So, assuming your lan is 192.168.0.0 I recommend filling in the config as follows.</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/01/image-6.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/01/image-6.png 600w, https://micronetia.devtru.st/content/images/2021/01/image-6.png 778w" sizes="(min-width: 720px) 720px"></figure><p>You'll see a link to the firewall/router appears when you add that address. You can click on it to confirm that you have the right address. At some point you'll need to log in to it and create the NAT rule to allow your pi to be seen on the internet, but for now just make sure it connects. I've made the DNS server 9.9.9.9 which is the <a href="https://www.quad9.net/">quad9 public DNS</a> server but you can set it to whatever you want that works (for obvious reasons I recommend not using the google ones - 8.8.8.8 and 8.8.4.4)</p><p>Then Click Generate. The configuration is validated and if it passes validation you'll see it appear below and be prompted to download it</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/01/image-8.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/01/image-8.png 600w, https://micronetia.devtru.st/content/images/2021/01/image-8.png 694w"></figure><p>If you make a typo then the code will catch it if it makes the configuration inconsistent (e.g. typoing the gateway IP address will generate an error like this</p><figure class="kg-card kg-image-card"><img src="https://micronetia.devtru.st/content/images/2021/01/image-7.png" class="kg-image" alt srcset="https://micronetia.devtru.st/content/images/size/w600/2021/01/image-7.png 600w, https://micronetia.devtru.st/content/images/2021/01/image-7.png 728w" sizes="(min-width: 720px) 720px"></figure><p>When you click download you should save it to the SD card on the boot partition (that will be the first one - and the only one visible in Windows).</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://testpi.2tru.st/content/images/2021/01/image-9.png" class="kg-image" alt><figcaption>Where to save the file</figcaption></figure><p>After you've saved the config file, you can eject the SD card and prepare the pi for use.</p>]]></content:encoded></item><item><title><![CDATA[SSH Clients]]></title><description><![CDATA[<p>The one fundamental pre-requisite to set up a pi for the micronetia project is that you have an SSH client. </p><p>On Apple Macs and Linux machines ones is built in to the OS, so you just open a terminal window and then do "ssh ...". </p><p>For windows there are a variety</p>]]></description><link>https://micronetia.devtru.st/ssh-clients/</link><guid isPermaLink="false">60140c4dbf6fcb0322f8aecc</guid><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Fri, 29 Jan 2021 13:44:09 GMT</pubDate><content:encoded><![CDATA[<p>The one fundamental pre-requisite to set up a pi for the micronetia project is that you have an SSH client. </p><p>On Apple Macs and Linux machines ones is built in to the OS, so you just open a terminal window and then do "ssh ...". </p><p>For windows there are a variety of options. You can use the Windows Subsystem for Linux (WSL) and get a similar experience to a linux PC but that's probably overkill unless you plan to use it for something else. There are various free SSH clients like <a href="https://www.ssh.com/ssh/putty/">putty</a> that can be installed and Microsoft also has SSH Client as an optional piece of software that can be installed by going to Settings the Apps/Optional Features and selecting OpenSSH Client (lots of info on this <a href="https://www.bleepingcomputer.com/news/microsoft/heres-how-to-enable-the-built-in-windows-10-openssh-client/">here</a>).</p><p>If you have a tablet or similar there are numerous SSH clients in the various app stores available for free. This includes chromebooks and, in theory, if you have the chrome browser on a windows PC you can install the same chrome app to get SSH that way. </p><p>Be sure to check that the SSH app you choose has a lot of positive reviews, lots of downloads and doesn't appear to be filled with ads or crap (the 1* reviews will tend to tell you if it does). Termius is one that I have used in the past with success. Recently though I found a <a href="https://play.google.com/store/apps/details?id=it.Ettore.raspcontroller&amp;hl=en_US&amp;gl=US">raspberry pi specific app</a> that works very nicely for me when monitoring multiple pis.</p>]]></content:encoded></item><item><title><![CDATA[Registering a domain]]></title><description><![CDATA[<p>There are hundreds of companies who will sell you a domain, at a price. Depending on the company and the domain you want to buy that price can range from (in theory at least) free to thousands of dollars a year. </p><p>I used to recommend freenom.com which purports to</p>]]></description><link>https://micronetia.devtru.st/registering-a-domain/</link><guid isPermaLink="false">60140345bf6fcb0322f8ae15</guid><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Fri, 29 Jan 2021 13:23:01 GMT</pubDate><content:encoded><![CDATA[<p>There are hundreds of companies who will sell you a domain, at a price. Depending on the company and the domain you want to buy that price can range from (in theory at least) free to thousands of dollars a year. </p><p>I used to recommend freenom.com which purports to offer free domains but I failed the last couple of times I tried getting a free domain from them recently. The failure was right at the end of the process which was frustrating. It is not impossible that they will sell you a domain for cheap if not for free but I haven't bothered to try, they certainly advertise that they will sell you them.</p><p>No matter, do a search for domains you like from places that are cheap. <a href="https://www.namecheap.com/">namecheap.com</a> is exactly what it says on the tin, for example. Just don't fall for their attempts to sell you anything other than the name. A couple of domain sellers that seem willing to stand up for free speech are <a href="https://www.epik.com/">Epik</a> and <a href="https://porkbun.com/">Porkbun</a> (the latter certainly seems to offer cheap rates for a wide variety of domains) but I make no specific recomendation for either of these or namecheap.</p><p>You can also look at some of the more obscure country code TLDs and buy direct from them (this blog is hosted on a <a href="https://www.nic.st/">.st domain</a> for example and I also have a .nu domain) or, if paranoid, look for domain registrars in places like Sweden or Switzerland which are less likely to roll over when a twitter mob comes after you. </p><p>Things to think about when choosing a domain include how easy it will be for people to type and remember it as well as whether it helps describe what you want to use it for. </p><p>I personally tend to go for short names, so I'd tend to pick short.name over longdescriptivename.com but that's a matter of choice. You may also find it advantageous to not have a domain name that identifies you to the level that lets people dox you (smith.com is less identifiable than fredsmith.com which in turn is less identifiable than fsmith-dallas.com), although that does of course heavily depend on the reason why you want your micronetia site.</p><p>For the micronetia project you are, initially at least, likely to just use one hostname within the domain (e.g. blog.example.com) but having an entire domain of your own means that you can later setup subdomains like home.example.com, roaming.example.com or perhaps one for each child in a family. </p><p>No matter what, buy a domain and don't plan to share it with others you don't trust with everything. </p><p>Finally when you have bought it, do not set nameservers or anything else unless you absolutely must bcause they are going to be changed really quickly. If you have to set things up use a dummy IP address like 1.2.3.4 or your current IP address for whatever you have to set up. The only exception to this is that if you want to tie your domain to your current email provider (especially if it's someone like protonmail) you might as well follow the instructions to do that because you can then use email addresses like "owner@example.com" to register with cloudflare instead of using a protonmail or gmail address.</p>]]></content:encoded></item><item><title><![CDATA[Micronetia Hardware]]></title><description><![CDATA[<p>AKA What Pi should I use?</p><p>One of the concepts of the Micronetia project is that you should be able to pick and choose. To that end there's the question of hardware. In the other posts I have mentioned a pi 3 or pi 4 without really saying why you</p>]]></description><link>https://micronetia.devtru.st/micronetia-hardware/</link><guid isPermaLink="false">601148126736d40a78bedd41</guid><dc:creator><![CDATA[Micro Netia]]></dc:creator><pubDate>Fri, 29 Jan 2021 12:39:04 GMT</pubDate><content:encoded><![CDATA[<p>AKA What Pi should I use?</p><p>One of the concepts of the Micronetia project is that you should be able to pick and choose. To that end there's the question of hardware. In the other posts I have mentioned a pi 3 or pi 4 without really saying why you might want to spend more money for the latter and, indeed, how much memory you should get if you get a pi 4. </p><p>The TL;DR is that anything less than a <a href="https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/">Pi 3B+</a> is likely to run out of horsepower when placed under any sort of load, but they may (possibly with some tweakery) work. Any <a href="https://www.raspberrypi.org/products/raspberry-pi-4-model-b/">Pi 4</a> will also work, but if you are just planning on running a blog you don't need a Pi 4 so if $20 makes a difference to your finances go for the Pi 3B for now.</p><h2 id="hardware-drill-down">Hardware Drill down</h2><p>The first thing to be aware of is that, despite the fact that we mention pis, absolutely nothing here requires a pi. Almost any old PC that can have Ubuntu or some other flavor of linux running on it can be used instead, but I don't (yet) have instructions for how to install and build all the bits on such a platform. But if you know linux you can take a look at the various scripts and bits in the <a href="https://gitlab.com/Hellokittygoatse/micronetia">micronetia gitlab repo</a> and adapt the instructions to do things yourself.</p><p>Fundamentally it all boils down to performance, and compared to a "real" server any pi or low end Intel/AMD PC will appear relatively feeble. This is why a key part of the basic strategy is to have Cloudflare proxy and cache the site so you don't get so many direct hits. As a result, technically most of what is proposed could run on any pi, but the more you use the pi platform the more you will appreciate the more powerful ones. In particular the original Pis and the newer even smaller Pi Zeros have a really limited amount of RAM and a particularly puny CPU (see paragraph at the end) so their performance will be noticeably worse. But because cloudflare does much of the cacheing, if you already have an unused pi lying around then you can probably just use that one.</p><p>I should also note that because pis are cheap, there is absolutely nothing stopping you from using more than one. Indeed if you have, say, a teenager who wants to get into IT in the vicinity, then having that teen adapt the instructions so as to have one or two act as the load balancers for a number of separate back end server pis would be a valuable learning experience.</p><p>If do you need to buy a new one, the cheapest platform would appear to be a <a href="https://www.raspberrypi.org/products/raspberry-pi-zero/">pi zero</a> with a USB network adapter or a <a href="https://www.raspberrypi.org/products/raspberry-pi-zero-w/">pi zero w</a> (with built in wifi). In both cases once you have bought all the required additional components you are looking at about US$30-$40, which is about half the price of the cheapest pi 3B kit. (The Pi 1 and Pi 2 models, if available, are no cheaper than Pi 3s and have lower capabilities so there's no point to buying one). There's a section below discussing how to get things up on a pi zero if you really need to but the pi zero is probably too underpowered to handle any load more than a trivial one, even with the Cloudflare proxy - though I do plan to test this because there are some attractive but subversive use cases for it.</p><h2 id="pi-comparisons">Pi Comparisons </h2><p>Realistically we're looking at the <a href="https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/">Pi 3B+</a> or <a href="https://www.raspberrypi.org/products/raspberry-pi-4-model-b/">Pi 4</a> platforms, though in the table below I'm including the Zero just for completeness</p><!--kg-card-begin: html--><table>
    <tr><th>Pi Version</th><th>Capabilities</th><th>Canakit bundle and price</th></tr>
    <tr><td>Zero W</td><td>Wifi, 1GHz processor with 512MB RAM</td><td><a href="https://www.canakit.com/raspberry-pi-zero-wireless.html">Pi Zero Wireless Starter Kit</a>
(PI-ZERO-W-KIT-103) 	$34.95 </td></tr>
    <tr><td>3B+</td><td>USB 2 speeds, 1.4GHz 64-bit quad-core ARMv8 CPU with 1GB memory</td><td><a href="https://www.canakit.com/raspberry-pi-3-model-b-plus-starter-kit.html">Pi 3 Model B+ Starter Kit - 16 GB</a> (PI3P-STR16-C4-BLK) $79.95</td></tr>
    <tr><td>4 - 2GB</td><td>USB 3, 1.5GHz 64-bit quad-core ARMv8 CPU with 2GB memory</td><td><a href="https://www.canakit.com/raspberry-pi-4-starter-kit.html">Pi 4 2GB Starter Kit - 32GB</a>
PI4-2GB-STR32F-C4-BLK 	$79.95  </td></tr>
    <tr><td>4 - 4GB</td><td>USB 3, 1.5GHz 64-bit quad-core ARMv8 CPU with 4GB memory</td><td><a href="https://www.canakit.com/raspberry-pi-4-starter-kit.html">Pi 4 4GB Starter Kit - 32GB</a>
PI4-4GB-STR32F-C4-BLK 	$99.95 </td></tr>
    <tr><td>4 - 8GB</td><td>USB 3, 1.5GHz 64-bit quad-core ARMv8 CPU with 8GB memory, needs 64bit OS for optimum usage</td><td><a href="https://www.canakit.com/raspberry-pi-4-starter-kit.html">Pi 4 8GB Starter Kit - 32GB</a>
PI4-8GB-STR32F-C4-BLK 	$119.95  </td></tr>
</table><!--kg-card-end: html--><p>The big advantages of the pi 4 platform are that it has more RAM and secondly that it has USB 3. This latter means the Gigabit Ethernet adapter really is Gigabit Ethernet in speed and, probably more importantly, there are two high speed USB ports that you can use to plug in, say, a <a href="https://www.amazon.com/Transcend-Type-C-ESD250C-Portable-TS960GESD250C/dp/B07NDBZ882?ref_=ast_sto_dp">USB SSD drive</a> and get far better performance than you can get from a SD card.</p><p>The primary disadvantage is that people have found that it can overheat under load unless you have a fan and the fan can be noisy. I have 2 pi 4s and for one of them the fan ended up being so annoyingly loud I disconnected it. It still works fine as a DNS server without the fan and I expect it would be fine for micronetia but you should be aware of this potential issue. A pi3 works just fine for micronetia and doesn't need a fan.</p><p>My experience on actually trying to buy things is that the 2GB Pi4 is almost unobtainable even though it would be absolutely fine for the task at hand and the same price as a pi 3B+. This means that if you want a pi 4 you'll be buying a 4GB one which is $20 more, so if money is tight you'll want a Pi 3. </p><p>Going up in spec, an 8Gb pi4 is almost certainly way more memory than you need unless you plan to use the pi for a ton of things in addition to the basic micronetia tasks. The 8GB Pi seems to have introduced mainly to be used as a desktop computer. Since the micronetia project uses Pis as servers there is no need for the 4K graphics and desktop apps that benefit from large amounts of memory (you won't, for example, be opening 155 different tabs in a browser in a micronetia Pi).</p><p>That also means that the <a href="https://www.raspberrypi.org/products/raspberry-pi-400/">Pi 400</a> - while a really cool product - is not needed. Although there might be an interesting use case for a Pi 400 that is used for both the Micronetia project and something else...</p><h2 id="buying-your-pi">Buying your Pi</h2><p>In the table above I linked to various pages on Canakit's website. The links are all to bundles that include everything you need to get you going, but you don't have to buy a bundle or buy a bundle from Canakit, there are plenty of options. </p><p>All you need is the basic pi, a case, a power supply and a Micro SD card. The Canakit bundles give you all of that plus an HDMI cable that you don't need and includes both a micro SD card and USB card reader that you may not need if you already have these things.</p><p>In addition to Canakit, you can buy Pis and Pi accessories on Amazon or direct from various providers like Vilcros, Adafruit, Okdo and so on that are listed at the bottom of the various <a href="https://www.raspberrypi.org/products/raspberry-pi-4-model-b/?variant=raspberry-pi-4-model-b-8gb">Raspberry Pi hardware pages</a>. I have found that sometimes it is cheaper to buy the basic pi computer from one place and the case/PSU kit from somewhere else, though this of course depends heavily on the price of shipping.</p><h2 id="a-high-end-pi-4-spec">A High End Pi 4 Spec</h2><p>If you want to create a powerful micronetia server that can be used for far more than just blogging then the key additional accessory will be an external SSD that you plug into one of the USB3 ports on your pi 4. In my testing the external SSD has read and write speeds anywhere from five to ten times the speed of an SD flash card. </p><p>My tests have shown pi4s to get about 44MB/s non-cached read speeds on SD cards and about 350MB/s on external SSDs. ( An external hard drive will typically be somewhere between the two - on the disk I tested I got a read speed of just over 100MB/s and is of course a lot cheaper than the SSD on a $ per gigabyte basis. )</p><p>A 1TB SSD probably doubles the cost of your Pi investment but it gives you a system you can use as a NAS (network attached storage) and/or streaming server locally as well as running ghost and all the other wonderful micronetia applications.</p><h2 id="pi-zero-w-and-pi-1-issues">Pi Zero (W) and Pi 1 Issues</h2><p>The Pi Zeros and early Pis are notable for one other problem beyond their lack of memory. They use a slightly different ARM processor architecture (ARMv6) while other Pis use ARMv7. That results in a couple of software support issues. </p><p>The first issue is that the recommended blogging platform - ghost - depends on node.js and newer node.js versions are not built for the ARMv6 instruction set of a pi zero (or pi 1), however ghost can theoretically run with node v10.x which is the last version that has an <a href="https://nodejs.org/dist/latest-v10.x/">armv6 build</a> so if money really is tight you ought to be able to adapt the instructions/script to try to install that version instead.</p><p>The second issue is that the official cloudflared, although it is supposed to support ARMv6 is compiled in a way that doesn't. There's a <a href="https://github.com/cloudflare/cloudflared/issues/38">long-standing bug filed about this</a> and some <a href="https://hobin.ca/cloudflared/">enterprising person has compiled versions that work</a>. </p><p>The cloudflared replacement works great but I have had issues actually getting ghost to install on a Pi 1. It worked once out of three tries and that try took several hours to complete (the times when it failed seemed to be due to network errors but there may have been something else triggering them like a running out of RAM). However you can use the builtin nginx webserver on the micronetia to serve static web pages just fine. In that case you can install ghost or some other blogging platform on your PC and run something like <a href="https://gohugo.io/">hugo</a> to build static versions of your blog that you then transfer to the Pi.</p>]]></content:encoded></item></channel></rss>