I recently started looking into self-hosting, and after spending two almost sleepless nights, I finally have a solution to self host any service and link it to an endpoint with your domain name. Usually, you’d need a static IP address that you must purchase from your ISP, and it’s quite costly (depending on bandwith and IP range). This solution does not need any static IP address, or port forwarding or any magic from your side. You just need a machine where you can just do things. In my case I have a Raspberry Pi, on which I’ve installed Ubuntu Server, but this can be any machine that you can keep up for extended periods of time, be it your laptop, or a real home lab setup, everything goes.
Now at first, I thought of writing only about the self-hosting part, but later on, something changed my mind to also include a new thing I’ve worked on recently : My own custom http server implementation in C, that works! So, consider this a bonus on the self-hosting solution. Why in C? It’s the language I know the best and prefer using, and also because I needed something that compiles super fast, and a custom blogging solution of my own. This blog is hosted using the static site generator Hugo and on GitHub Pages, because
Other than that I think I’ll be implementing some kind of API to make some of the things easier on my local network, maybe something like a self-hosted cloud storage, but for local network only! Now also, one thing to note, I’ve implemented some utility methods to make my task easier. This was not implemented in a single day, and evolved out of my needs. I won’t be providing code for that because if you’re going to implement it, you’re going to do things your way, and also this makes the blog a bit shorter 😄