blog/content/Articles/Solar-D-Web/index.md

11 KiB

draft categories title displayInMenu dropCap description date displayInList resources
true
English
Solar
Solar Web false true Making the web go down when there's a cloud : Exploring the self-hosting of a website on solar energy 2022-11-01T13:37:00Z true
name src
featuredImage cover.gif

Damn clouds today !

Over the pasts years, the web has grown into a hungry monster, feeding off electricity, our social lives and our data. It grows, relentlessly, funded by venture capital and surveillance capitalism. It's supported by the states, who aim to control more and more of it. And compagnies all around the world are making good money by selling every private bit of you. A cloud has grown over our heads, shading us from the sun.

I'm going to try and not fall into the trap of 'more tech will the save us from the problems tech creates' as hard as I can. I'll fail, because I'm writing this guide today, but I'll be using what we can have or recycle today. It's easy to imagine, for me, how the web should be. You open whatever browser you have, and search for content, or look at the content you subscribed for. This content is hosted on a peer-to-peer network, running off solar power, or other renewable energy sources. It's a web made to express yourself, and makes it easy for you to interact with everyone you know. Tech should stop being a pain.

I think a lot of this pain comes from the way it's designed. It's designed to make money, not to give us control. I'm not talking about the way the network works, I'm talking about the way content flows. It doesn't spread equally. People who live in rich countries will have high-speed internet, virtually unlimited storage and an nearly unrestricted access to the web. But it's worth remembering that only half of the world is connected. In many countries of Africa, it's only 1/3 of the population. China is censored. But I'm not gonna make the list too long, I could write about this for days.

We need to rethink how the web works. We need to take into account the parts of the world who don't have the same wealth as us. Why ? Because we can.

I like to think of the web as a huge librairy anyone can consult when they want, whoever they are.

It's also the moment to say that a lof of people have paved the way, and I'll try to give as much linkback as possible.

I'd like to contribute my own books to human knowledge. I'm not saying it's a lot, but I'm sure that for a few people it's valuable and that's enough to me. But I'd like to make is as accessible as possible, and try to not destroy the planet at the same time.

So for that, I need to list my needs, learn how to provide for them, implement the solution and make it usable for more people. I'm not pretending I'm gonna solve the internet today, but I'd like to publish a bit of research I've done and make it live.

I'd like to try to improve upon the marvelous ideals that gave birth to solar.lowtechmagazine.com, add a bit of decentralization to it and see how that works.

You see, one the main problems of building a solar-powered blog is that sometimes, it goes offline. That's really a bugger.

Let's see what we need.

I'd like to adress a few things. First, accessibilty. Today, the web is getting fat. It's getting harder to reach. A typical web page is several megabytes. That's bigger than the classic War And Peace 1. It needs a lot of power and a lot of data, one is not eco-frienldy and the second costs money. Imaging browsing with 3G in India, or in a internet café in the suburbs of Bogota, ain't nobody got time for this fucking 24th pop-up for frozen fries ? I'll try my best to make the website be readble by screen readers and ledgable by people with viewing impairments.

Second, sustainability. The internet need a LOT of power. In 2010, over 10% of electricity in the U.S. was due to computer and IT equipment usage. At the current rate we're going, analysts and experts figure that 10% of the world's power bill will be spent on running computers. 2 The main problem comes from the hyper centralization of data. We can share data in an acceptable way without needing a googol servers. I'm going to try and run my website from my own home with solar panels, maybe wind power and a battery. I'm going to try and salvage as much as possible, and buy new stuff only if I really can't find anything else.

Third, distribution. If I run my own server, I'm gonna need to find ways so that people actually find me, without needing Facebook. Obviously, my website is gonna be shared around the web if I'm lucky, but what happens if my server is going through a few months of cloudy weather ? You click on a link, and... nothing ? My website being simple, and low data, maybe I could find new ways to share it ? So I've been looking into a new protocol that doesn't need your computer to be up all the time. It's called Dat, it's super new and it's cool tech I want to try out, because it might work. My website will be hosted, in part, by the people who visit it. When you visit my website through dat, you'll have the option to seed it : keeping a copy on your computer and enabling others to read it even if my server is not up. Think of it a keeping a copy of a book from the librairy that your friend can reed.

Nobody provides a way to do that today. I'll make my own.

Building the damn thing.

Now, I'm going to try to give a guide of how I did it. They might be technical terms, but I'll try to explain them the best I can, or add anotations.

On the hardware side ( the part of the computer you can hit with a hammer ):

  • I'm gonna need a computer, so I'll use my Raspberry Pi B. It's a small computer board that runs Linux, and costs roughly 30€. The choosen model is kind of old, but the newer models draw more power, which I don't need. I've had one lying around for a while... With it,I'm gonna need to add a 16Gb microSD card. I used one salvaged from an old Android phone.

  • I'm gonna need batteries. I've salvaged old "shared" bikes in a dump, which had batteries. I have 2 1100mha batteries, which is far from enough, but it's gonna be enough to shutdown the computer gracefully in case they is no more power. It's the backup power. I'll also look into using a car battery.

  • I'm gonna need solar power. On the shared bikes, they also where solar panels. I'll run tests and mesure how much solar power I can get in a day.

  • I'm gonna need an electric controler. For that, the Mo Pi 2 project is perfect, as it ties everything together and can be controlled directly from the raspberry pi. It cost less than 40€.

  • I'm gonna need instruments to mesure the electric consumption of all of this. A standart multimeter or a multitester, also known as a VOM (volt-ohm-milliammeter), will do the trick.

On the software side ( the part of the computer you insult ):

  • On the computer, I'll need software to host the website. For that, I'll use ngix. It's standard, and doesn't use much power when idle.

  • To actually make my website, code and all, I'll use Hugo. It's a static website generator. I'll talk more about how that works later on.

  • When the weather is shitty, I'll distribute the website with Dat, which is a decentralized protocol to distribute websites. Think bittorrent but for websites instead of movies.

  • I'd also like the website to be resistant to censorship, so maybe a way to access it by the TOR network, although it may use a lot more power.

  • I've found a project called Scaphandre which makes it easy to mesure how much electricity you're using. I will help me make graphs and mesure which service is using the most power. Eventually, I'll make as the Rapsberry Pi to turn off some services if it's running low on power.

Testing and research

On the hardware side

Solar Panels

First off, I needed to calculate to output of my solar panels. To do that, I ran several tests, in different conditions regarding ligth exposition, time of the day, and cloudiness. I also used an app on my phone to mesure the lighting level, but you can use any luxmeter.

// INSERT GRAPH WITH DATA

As you can see...

In full sun, the solar panels output anywher between 12 volts and 14 volts.

Now, I need to research the batteries.

Converting the sun to 5V, 2Amp.

As I've said before, the MoPi 2 is a fantastic HAT ( extension board ) for the Raspberry Pi that takes in two power sources, and regulates it. In this case, it's the solar panel array, and the battery pack.

Connection diagram

On the software side

Power and Pi

I wanted to try several configurations of software to find the one that would be the most efficient, yet easy to use. The main problem with software is that complexity requires more power (duh). For example, I could do much of my maintenance via the command line, but it's not very easy. Or, I could install a content management system and it would be super duper easy, but might use way more power. Only way to find out, do tests.

From what I've learned, I can use an automation system called Ansible. I've wrote the software to manage the server on my Git server.

When I run the Ansible playbook, it will connect to the solar server, and do a repetitive and predicatble set of actions ; update the pi, update the website, etc...

Not everybody can read

The other side of software I wanted to experiment with was accesibility. First off, I need to think of the users that would want to visit my site, who could they be ? I could have blind people, so I need to make my content friendly to screen readers. Dislexic people, so high contrast and accessible fonts.

Going further.

Links :