26 September, 2021
Yes, that's right, this site is now completely solar powered. Actually, it has been for about a week now but I wasn't going to write about until I was sure everything was working correctly.
Also, not only this site - but my Yarn.Social pod as well!
For a bit of background, I've had the solar setup itself for nearly two years.
What is this 'setup'?
An Optus AC800s 4G/LTE modem (actually a Netgear device, just branded by the carrier), connected to two MiMO Yagi antennas, feeding into to a GL-AR300 Mini Router, powered by a 160W solar panel connected to a regular car battery, albeit a deep cycle one. The GL-AR300 is then connected to a 110 metre (approx) line of Ethernet cable that feeds into the household. The reason for this distance is the location of the solar setup and antennas is where the mobile signal is at its strongest, whereas back at the house the signal is extremely weak.
I live quite rural and this custom setup has served as my secondary internet connection for some time. The primary internet connection is, of course being rural Australia, is a satellite broadband service. The satellite internet actually works remarkably well, no doubt the technology has come a long way. But you can never get around 600~ms pings and limited data allowance, so some time ago I invested in the Optus mobile broadband deal which netted me the AC800S modem and 500GB per month data allowance. Still a far cry from the bandwidth and data afforded to landline and even fixed wireless broadband users, but it's better than nothing. The 4G service also has vastly improved ping, being around 30~ms to other Australian servers and still easily half the latency of the satellite when going elsewhere around the globe. It was then that I set up the solar system, primarily as it would be impractical to run an electrical cord all the way from the house to the spot where the solar installation is. And also because it would be a bit of a little project.
In any case, this service was mainly used for streaming things like Netflix and YouTube, which could obviously chew through the 20GB allowance of the satellite service in no time, but otherwise didn't have a lot of utility.
Until the day, recently, I figured it would be totally sensible to hook up my Raspberry Pi 3+ to the solar installation and use it as a server for this site. As you do.
The answer to that is simply, because I can. But honestly I was heavily inspired by Solar Low Tech Magazine. Check that site out, it is quite an eye opener and some great content on there, even if their battery level overlay thing is a bit weird looking.
Anyway, this site was originally hosted on NearlyFreeSpeech and while in all honestly it cost next to nothing to do so, I had an itch to scratch. Such a basic website could easily be hosted from home, being a static site with deliberately old-school stylings. Seriously, load this site up in a terminal browser like links, it works perfectly.
Note: Of course the aforementioned Yarn.Social pod I run on this system (which came a little after I initially set this up) is NOT a static site, but still seems to be quite low on the system resources.
So, a ~~Raspbian~~, sorry, Raspberry Pi OS install later on the Raspberry Pi with an Nginx server, I had something I could transfer this little site to.
Turns out you can't forward ports on a mobile modem/router like the AC800S. Well, you can, but it won't do anything. This is an ISP restriction unfortunately. More about that in a moment. In any case see a couple of images below. These are dithered images, both to save bandwidth and also because in all honesty my setup is jerry rigged AF, and cable management has never been my strong suite. It's not attractive, so not being in full coloured HD glory is a good thing.
Bottom Left to Top Right: GL-AR300 mini router, 20A solar charge controller, Raspberry Pi 3+, Optus AC800s modem
As I said, this is a very jerry rigged setup. All the bits and bobs are mounted inside an old second hand gutted meter box that I picked up from the local tip shop for $5 and the meter box (and antennas) are mounted on star picket fence posts. The solar panel itself is mounted alongside this on it's own fence post (pictured below). Both the AC800S and the AR300 mini router are powered off the solar charge controller's two USB ports. The Raspberry Pi is then powered off a 5V, 2.1A micro USB power pack connected to the solar charge controller's wired output.
The battery is then at the base of the meter box post under some weather-proof wrapping. And by weather proof wrapping I mean an old unused heavy duty rain coat.
Exterior shot of the setup. Jerry rigged!
So, yeah, this is almost the sort of thing you would expect to see in a Mad Max setting, but that's kind of what I like about it. It's horrendously unprofessional, make-shift, but it works. And this basic setup has lasted through all sorts of terrible weather events and seasonal changes, including winds that have felled entire trees.
The solar panel and solar charge unit (as a combo) cost about $100 off eBay. The Raspberry Pi I already had from running a LibreELEC install and I can't remember what that originally cost me, but it wouldn't have been a kings ransom.
Otherwise, every thing else was simply what I had lying around. So besides the cost of the 4G/LTE internet connection itself (an $85 per month plan), the overall cost of this has been very very little.
Indeed, as mentioned earlier, these common internet ports are blocked off at ISP level, so no amount of port forwarding in the router will expose our little web server to the internet. So, to get around this we have to use Pagekite, a localhost tunneling solution, similar to the likes of ngrok. Unfortunately, the pagekite.net service itself seems to be lacking attention and while the service itself still works fine, heavy rate limiting is in place. The site says you can request these to be lifted, but I had no luck contacting anyone (as of this writing) to actually get this in motion. Pagekite, the service, never had this rate limiting originally but unfortunately after it was used by some spammers a couple of years ago, they had to put those in place by default.
Thankfully, however, Pagekite is more than just a service. The pagekite.py program that the site provides as a client for connecting to the service can also be used on any server to act as a frontend, which then in turn acts as the tunnel to your localhosted pagekite.py (called the backend - I know, it seems confusing this naming convention, but there you go). Luckily I have an existing hosted VPS I use for a few other things, so I simply run the frontend Pagekite on that VPS, point the DNS at it, and then connect to that frontend from my Raspberry Pi to establish the tunnel. Hello world wide web.
It's not quite that simple insofar as a bit of reverse proxying with Nginx is needed also, but it's not too hard.
So, you may be wondering about uptime. As a solar system, and being 'off the grid', there are times where no doubt there will be enough lack of sunlight that power will be insufficient and the server will go offline.
This certainly can happen, but unless there's multiple days in a row of foul, very downcast weather, it runs almost indefinitely. These devices hooked up to the system are very power efficient, and the 160W solar panel is admittedly perhaps even a bit overkill for this purpose. It will be a matter of how much the battery degrades and any other factors that work against it. For now, it is fairly reliable, but there will be days here and there where the voltage may drop enough for the solar charge controller to cut power until sufficient power is restored.
And that's okay. The other potential caveat is how much extra power the Raspberry Pi will use while hosting the Yarn.Social pod, versus only serving static content. I don't know, I wouldn't even begin to know how to measure it. I can't imagine it would be much extra, and time will tell if we seem to lose more power than normal.
It will all depend on what metrics you are measuring as to whether there is any advantages to this setup.
Certainly, it won't be speed or uptime percentages. There's not really even any monetary advantage, as it's a supplementary system and the rest of my home is still very much grid powered. The tangible advantages are very few.
But what it is, is a proof of concept, like the aforementioned Solar Low Tech Magazine site. We don't need high powered, always on servers, all the time. Yes, critical production servers are a different story, but here we're talking about a small personal website and a self-hosted decentralized social network pod. These things do not have to have 100% or even 99% uptime. It just needs to get the job done.
What's more, this is a system that runs off completely renewable energy. All the while providing a fairly speedy (yes, around 50Mbps down is speedy to a rural Australian!) wireless broadband service for a household, streaming video and hosting a couple of servers, all in one little efficient solar powered bundle.
It also has to be said hosting any sort of website on a wireless internet service is rather unconventional, especially one that averages between 5-8Mbps upload. This is why keeping transfers as small as possible and resource usage low makes sense just beyond keeping power usage down. The other downside is relying on an external server (the VPS) to even get this whole thing public facing. That's not ideal, but then again there isn't any other choice that I'm aware of when your ISP blocks port forwarding. At least the VPS was already getting used for other things, so it's not a major additional component.
But, it can be done and that's all that matters to me.
If anyone has any comments or suggestions, please email me on the address listed at the bottom of this page, or message me on Yarn.Social/twtxt if you are following me on that network.
I am not an expert, I only know just enough to have set this up and I wouldn't be surprised if aspects of it are enough to make more seasoned solar energy enthusiasts/users recoil in horror. Perhaps the same for some web developers etc. But it is what it is, and I've enjoyed tinkering with it.
Lastly, I haven't detailed much on the technical side of things to keep this from getting too long, but if anyone wants more info in regards to things like Pagekite configs or any other aspect of this system, by all means ask.