What's Going on Here?
You’ve managed to stumble upon my blog, welcome! This blog is my attempt to maintain some kind of documentation about all the small technology-related projects I end up tinkering with. I seriously doubt my own activity with this blog, but let’s give it a try. The first adventure I’ll be recording here is actually the documentation on how this site works.
This site is actually hosted from my home with the Raspberry Pi Zero shown in the image below. It will be interesting to see how this little guy will manage this task. Instead of taking the easy (and probably more sensible) route of buying hosting services from a provider like Netlify, I decided to take the more difficult and interesting route.
The domain is from Namecheap, since I needed a provider who supports dynamic DNS hosting. After configuring all the settings in Namecheap’s end following their tutorial, I had to get a dynamic DNS client for the Raspi. After choosing ddclient, I found this tutorial which thoroughly explained how to set it up. Here’s my config file for ddclient:
# How to get current IP use=web # Force HTTPS ssl=yes # Namecheap parameters, NEVER SHOW PASSWORD! protocol=namecheap server=dynamicdns.park-your-domain.com login=risto.info password='insert-password-here' @
At this point everything about dynamic DNS was ready, so I went ahead and installed Apache web server on the Raspi. Some would say that this is very suboptimal for hosting a static website, especially with the limited hardware at hand. And they are absolutely correct. However, I wanted to try Apache as it is the most common web server.
When the web server was up and running, I forwarded HTTP and HTTPS to the raspi from my router and voilá, we’ve got access to the server from the internet!
The site itself is made with Hugo, using the Ink theme. I’m quite happy with how Hugo works, and I really like that I can have a local server which immediately renders my changes. However, I did spend a stupid amount of time figuring out why no CSS was rendering, when this was in fact caused by a typo in the config file.
I use Hugo on my laptop to build the site, and then I copy it over WiFi to the Raspi with SSH. I should really set up some Git-based system for this, but for now I feel like I’ve tinkered enough with the site itself for a while. Time to get started with some actual projects!