22 October 2023

Building a home server: the software

All I want is text files

All I want is text files

I have a strong opinion about exactly how I want to store my writing. I want them to be plain text files. On a computer, somewhere I control. Naturally, this excludes platforms. I’m sure that they will mostly be honourable, and since I have no desire to write for money, even if they did change their terms of service and I lost these blog posts somehow, I don’t think I’d be too upset.

But despite that, I want to keep them in a format I trust. A textfile in markdown format is the perfect vehicle for most article writing, you don’t have to worry about anything but the content. Certainly suits my needs.

In addition, I’ll use git to store it. It’s widely used, perfectly designed for text files, I know how to use it, and setting up back ups is trivial, especially on a home network.

Now, I have my text files, so what? How do I show them to the world? Well, for this I’m going to need a web server, and some means of turning my writing into a web readable file.

Diagram, asking how to get plain files to the web So, to restate the problem, I know __how__ I want to work, and I know there'll be an intermediate step, but how will I get from A to D?

Now, truth be told, the most obvious and easiest to use solution would be Github Pages. It’s free (for now) and does exactly what I want for a blogging web host but… I don’t control it. If I was talking to a friend, or a colleague, I would recommend this. But I want to do this - host a blog - the hard way.

Now, the web server half of the equation is actually quite easy to solve. Perhaps it hails from a more Panglossian time, but every install of Windows includes a web server: IIS. I imagine it was written in a time when computer people imagined that everyone would self host their own website. It almost brings a tear to my eye.

IIS Management console This management interface is straight from the Windows 98 days. It is - though - fully functional, and so I don't mean that as criticism. It's not broken, it don't need fixing.

Amazingly, you can simply write html file(s), create a ‘site’ in IIS Manager, open that PC’s HTTP ports (80 and 443 for https) on your modem (or, let’s be modern, wireless router), and hey presto, there’s your website.

So that’s the web server sorted. Now I have to get my blog-post.txt files into something… pleasant to look at.

Well, the underlying open source software that powers GitHub Pages (mentioned above) is Jekyll. The above-the-fold title couldn’t be clearer: this is it, this matches my usecase perfectly.

Jekyll homepage I am editorialising somewhat here, I actually knew about Jekyll ages ago

So that’s a wrap, it’s that simple. I write some text, I jekyll build on them, and place those files in some folder on the server, open the ports, buy a domain name… And done. Easy, right? Well, stay tuned for Part 3 :-)

Categories

home-server software