Archived. This is an old project, kept here as a record, but one I plan to come back to.
This blog is light, so I decided to try running it on a Raspberry Pi Zero. Setting up a local server with nginx was straightforward, but I wanted ishimura.uk to point at it. Normally that means forwarding ports on the router to the Pi and using dyndns to track the IP changes. My ISP uses CGNAT though, so there is no IPv4 address and no way to forward ports.
After looking through a few approaches with tunnels and OpenVPN, I found localhost.run, which works over SSH, so there is nothing to install to try it. I added my domain to their service, SSH'd into the Pi, and ran:
ssh -R ishimura.uk:80:localhost:80 localhost.run
And now the Pi Zero was serving the blog to the internet. I expected the CGNAT issue to be a real pain, so I was happy to pay the £3.50 a month for a one line fix.
I tidied this up with a systemd service to keep the connection alive, though I still need to point the www subdomain at the same place. Next is looking into git hooks so I do not have to SSH into the Pi to pull new posts in.
Now that I have a server with a set of GPIO headers, I would like to log some sensors on the site, maybe power stats. The Pi Zero draws very little, around a watt, and I have an old campervan trickle charge solar panel that should keep it going.
There is also a small stream in the garden. I did some calculations on head pressure and flow rate and worked out I can get around 14W off it. That would be enough to run my Funkwhale server on a bigger Pi 4 over the same setup, which currently lives on Digital Ocean but would be nicer running locally.
I have started mocking up files for a waterwheel to CNC, then run a belt to a small alternator and see what I actually get off the stream. Hopefully soon I will have stream powered media alongside the solar powered blog.