Go Home

Welcome to Skircoat.one!


Welcome to my new web site, "skircoat.one" based in Calderdale, West Yorkshire. Skircoat Green is a well-known suburb of Halifax, and has been our home for some time now. It's a Conservation Area, and the locality has some significant local history in that in 1838, it was a regular meeting place for members of the Chartist movement (but more on that later). In time, the area became much favoured by the Victorians due to the proximity to the town of Halifax and to a lesser extent the local moors. A large number of stone properties were built by opportunistic Victorian builders "for every class" and the area eventually became the popular suburb it is today. Of course, Skircoat Green really became famous when we moved in and I set up my IT systems ;)

Early Days

As a newly-minted Yorkshireman I wanted to make sure that "things were done properly" and "it all had to save money", and so despite having a plethora of computing equipment of various sizes and power I invested heavily in the Raspberry Pi system, at one stage owning around a dozen. The plan was that thanks to my ISP's policy of "run what you like but don't abuse it" and the possession of a now much-treasured fixed IP IPV4 address I would teach myself to run a variety of Internet servers, and make them accessible with NAT and port-redirection. I'm pleased to say that this worked a lot better than expected, and had the added benefit of consuming very little power when weighed against what the array of servers was providing. On average, my entire setup including the router was consuming less than 60 watts, and I felt that I could justify running the equivalent of an old-style lightbulb 24/7. Life in Raspberry mode was good and continued for several years, until a New Kid on the Computing Block arrived on the scene.. enter .. The Onion Omega!

I Love Onions

So initially, it was pretty much the same story as usual - become aware of new hardware; research new hardware; WANT new hardware, and BUY IT! Yes, I have to say I'm a bit of a sucker in that respect, but it had paid off in the past. What I wanted was a device similar to the Raspberry Pi but physically smaller (if possible) and running Linux. I initially experimented with the VoCore, which was truly postage-stamp tiny, but my penchant for being able to brick devices like this was well known, and it only lasted a week or so when an OS upgrade failed. A little while later I notice a new (to me) device called the Onion Omega 2. The product ticked all the right boxes in that it was physically small, ran Linux and was powerful for its size. But the onboard memory/storage though: 128Mb of memory and 32Mb of "disk"!! Another deciding factor was that Onion had also built a number of feature docks (Like Pi Hats) which were very well made and worked as advertised. I bought a couple of docks and started experimenting...


So after a while I'd set up an Onion as a MQTT client and squeezed a copy of Python onto it a a development environment. At the time I'd been running a test MQTT system with a number of international buddies which would enable the clients to publish messages that would then get picked up and added to a database. My MQTT server was on the Pi web server at the time. I became excited when I realised that the Python code I'd written on bigger computers could be simply transferred to the Onion, despite the small 32Mb of storage. It worked very well, very reliably, and having written another version of the Python code as a Bash script (Bash is an optional package) on the Onion I resolved that whenever possible I'd use an Onion Omega2/+ as the hardware platform. I bought another Onion along with an OLED dock and used it to make a clock, updating the display time every minute from a Pi NTP server. I realised I needed much better eyes of course with the tiny font on the display, but nevertheless I'd built a network controlled clock for around 40 GBP. Incidentally, it's been running 24/7 for nearly a year now and is still going.

Fast Forward to Now

So now, we reach the whole point of this, my first article on this platform, as I want to introduce the skircoat.one web site and server. This really came out of a semi-failed project from about a year ago when I tried to set up a solar-powered web server. I based the design on one mentioned in an article published by Low tech Magazine, and despite theirs being in Barcelona (plenty of sun) and mine being in Yorkshire (not a lot of sun, TBH) I persisted and set up a smallish solar panel along with a controller and battery. The computer they'd used was an Olimex A20, which was cheap, effective and could run from multiple power sources. Version 1 was able to run for just a few days: I was partly hampered by having to site the solar panel in a roof-space Velux window, and it being Autumn. Doomed to failure from the start I suppose but I had to try it. I admitted defeat and stuck it in the spares box until another day. Version 2 eventually emerged with a double-size panel and a new MPPT controller, and I also mounted it all on a board, using proper connectors. I managed to get this one to run for nearly a week before the battery discharged and I was sadly back to square one. I've also put this version back into storage until, well, I dunno. We'll see. But I knew that I still wanted to run a physically small, low-power (consumption) computer and again I turned to Onion for help. Looking through the product listing I saw an Onion Omega 2 Pro, which is actually an Omega 2S+, mounted on a Power Dock which would also charge a 3.7v LiPo battery. What's more, although it still had the 128Mb of memory, there was also an onboard 8Gb of EMMC storage: at this point I was reaching for my wallet and getting into buying mode. I still had the ethernet dock from before, and so I initially set it up via Wireless (as usual) but then ran everything via an ethernet link. Things were starting to look up!

All Systems Go!

So after all the initial updates, package installation and the usual set tasks I was left with a small, powerful platform for my new web server. I measured the average current consumption of the device and as it was about 160mA I simply plugged it into a USB port one of the other computers on the desktop and the ethernet cable into the switch next to it: perfect! And it has the added advantage that it'll run for about 30 minutes on a 110mA LiPo battery, so that will act as a power supply "buffer" as needed. The next step would be to set up the software. I initially looked at Nginx as I was already running this on my main site. The Linux version on the Onion has some Nginx support So I installed it, and set up a basic "hello world" page using HTTP. So far so good: but then came the "fun" of setting up HTTPS on the Onion. You'll appreciate that on a machine that uses a reduced instruction set (when compared to a full-size system), there will be complications, and simply grabbing a required app/library and running a compile won't be as simple. The problem really became apparent when I tried to install LetsEncrypt on the Onion, and failed. I hunted around for a solution and came across acme.sh which still had to be installed but lived quite happily on the Onion. I now had another problem, this time of my own making. I figured out that I needed a reverse proxy from the Nginx box but hey, I'd never done that before. Yes, I run multiple domains but they're all on the same box and LetsEncrypt is cool with that. Now, however, I needed to received incoming requests from ports 80 and 443 via NAT and persuade Nginx to pass them on to the Onion on its own IP address. Let me just say that it took a while, and there was much swearing and shouting involved. Eventually though I figured out that I had to create certificates on the Nginx box and then proxy-pass the request through to the Onion. After a quite a but of tweaking I now have a single certificate for all my domains and it uses a feature (news to me!) called "Subject Alternate Names". Brilliant! I was sorted. All that was needed now was to properly set up the web server.

Last Leg

I now had my Onion Omega 2Pro set up, housekeeping and notification systems working, and a stable environment. Although I started out with the familiar Nginx on the Onion, I ditched it in favour of Lighttpd. This was a conscious decision; not only because I'd used it on small systems in the past, but because The Internet generally admitted that "setting up SSL was easier with Lighttpd than Nginx (on this platform)", and I found this to be the case. Also, I believed that due to my requirements, Nginx would be overkill, especially bearing in mind the 128Mb memory situation. In short, my requirements were as follows:

Other important requirements were that the web server should serve static content as quickly as possible and that there would be no facilities for add-in languages like JavaScript(!), PHP, etc. I wanted this to be a lean, mean machine. Okay, there would be some sacrifices as reqards functionality, but my current mantra is that if it can't be achieved using CSS it doesn't get included. Inclusion of images is another thing that tends to go against the current trend. As per the Low Tech Magazine philosophy, images should occupy as little space as possible, and this means limiting dimensions to say 300x200px and colour depth to 4bpp. I'm still working on this, but early results suggest that images should be 20Kb or less. There will be less of them too. Finally, in order to keep external file loading to a minimum I encode all images to BASE64 and include the ascii dump in the web page itself: it looks messy in source, but it does mean that I'll never need to worry about losing images and they get loaded from memory rather than "disk". Phew! So now I have this system set up, and load/speed tests have been very encouraging indeed. You should have noticed this when the home page loaded...

The Content

And as for the content on this server, well, I intend this to complement my other system at petergarner.net, which is mainly concerned with technical writing. As I have designed this system very carefully and deliberately to be an Eco-Focussed/Friendly system, articles will be written with that in mind.

The Green Mindset is so very important now, and with what is hopefully a post-pandemic society starting to emerge it's becoming obvious that we need to design computer and other systems for maximum economy in all respects. Thanks to the design skills of Onion.io and other, similar groups, this can become a reality. If we start to experience power shortages as pundits are predicting, it'll be systems such as this that will be giving society its vital information, and if I can just get the solar power thing working I could still be running when lights have gone out everywhere else!.

Anyway, thanks for reading, and please visit us again!


Low Tech Magazine

Top Home

This work is licensed under a
Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License

Last Modified Wed, 01 Dec 2021 09:34:59 GMT