I want to build a solar powered web server! First off, let’s draft a todo list.

Build the server and website#

I’ll use Debian Stable, because I have a life, and don’t constantly want to upgrade the system. The static build system will be Hugo, because that’s what I’m familiar with. The web server will be Apache or nginx. I don’t know much about either of them, so I’ll go with the one for which I find the best howtos.

Todo#

  1. Install the base OS on the Raspi’s MicroSD card. Best do this on the Raspi 400 that’s kicking around here – it’s just faster. Get the wifi working.
  2. Make sure ssh access works. Create an ssh key specifically for the target machine. Copy the private key to all machines I’m likely to be posting from.
  3. Set up the web server. Make sure it works on the local network.
  4. (Optional) Configure the web server so that it can serve more than one website.
  5. In my domain hoster’s interface and my router, configure dyndns so that blog.slothrop.org points to my server. (Also check out what I need to do in DNS terms if I host more than one website on the server.)
  6. Obtain and install LetsEncrypt certificates.
  7. Install git and Hugo on the server. Configure repo access for the blog.
  8. Configure the machine so that all necessary services are brought up on startup.

Success criteria#

  1. The machine is reachable over the internet and serves a Hugo-based blog.
  2. I can create posts using the same git-based workflow I have now. Using Hugo, I can build the blog posts on the server.
  3. The machine and all services survive a dirty shutdown, and come up intact on reboot. The website is reachable over the internet again.

Hardware & system#

We’re using a Raspberry Pi Zero, which draws 2W of power. No speed queen, but hopefully sufficient for our purposes. It has WiFi, so no running extra cables.

Todo#

  1. Once the SD card is ready, put it in the Raspi Zero, and put that in its case.
  2. Do a test with a fully charged power bank. For how long will the Raspi keep running on a single charge?

Success critera#

  1. After assembly, the machine works and remains reachable.

Get the solar power working#

We’re planning to mount solar panels on our balcony anyway. The idea is to use (some of) the power from those to charge a battery, which then powers the server. The battery could be a power bank or an old car battery. I want to use stuff I have lying around anyway (power bank) or can easily access for free (car battery, hopefully).

Todo#

  1. find a suitable solar panel. We have a small one around here somewhere.
  2. Find something that delivers solar power to a battery, with a USB input and output.
  3. use that to charge the power bank.
  4. use the power bank to power the Raspi.

Success criteria#

  1. The power bank gets charged when the sun shines.
  2. The Raspi starts up when connected to the power bank.
  3. The power bank (or battery) provides enough power to achieve 90% uptime per day.

Installation & housing#

Probably some old tupperware box or something? There’s plenty of those around here.

Todo#

  1. find a good box
  2. drill the necessary holes (but not more)
  3. install the Raspi and power bank in the box
  4. confirm that the wifi connection still works
  5. place the box somewhere near the solar panels, but protected from too much rain and direct sunlight. (Maybe use some foam for thermal insulation?)

Success criteria#

  1. Wifi works when Raspi is in box.
  2. No water entry into box after rain
  3. No overheating during sunny days
  4. Doesn’t fly away in high winds