From 43d27d59dfa41fee65700013d46941f3ba0819e2 Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Sun, 19 Jul 2020 16:09:20 -0400 Subject: [PATCH] thoughts: Add post on migrating to self-hosting I've been wanting to write this for a long time. For one, I wanted to set the record straight that no, I was _NOT_ using Fastmail's "files" GUI anymore (I mean... it worked, but it was painful and not particularly technically impressive!) And it felt like a necessary followup to the ramblings on domains. Yes, I settled on alexkarle.com, and yes I've happily moved on to bigger and better things (like self-hosted git repos! how awesome is that!) I'd love to dive deeper into the topic, but I wanted to write at least something so that my future self (AFAIK, the only reader) can look back and say "wow! I remember those days" Cheers --- content/07-19-20-self-hosted.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ content/thoughts.md | 1 + 2 files changed, 55 insertions(+) create mode 100644 content/07-19-20-self-hosted.md diff --git a/content/07-19-20-self-hosted.md b/content/07-19-20-self-hosted.md new file mode 100644 index 0000000..83b0fa2 --- /dev/null +++ b/content/07-19-20-self-hosted.md @@ -0,0 +1,54 @@ + + +### July 17, 2020: Migrating to a Self-Hosted Site + +If you look at the [first post][1] on this site, you'll see that this site +started as a series of static HTML files that I was, by hand, uploading to +Fastmail via their "files" GUI. + +Being a total nerd for automation, I was always on the lookout for an excuse to +migrate to my own server, where I could (over)engineer a pipeline to build my +static content and deploy it without ever leaving the terminal. + +That excuse presented itself in the form of needing to get a VPS to stand up my +hobby-project, [`euchre.live`][el]. If I was going to pay for a tiny VM, it was +a no-brainer to move my personal site to it too. + +This turned out to be a great learning experience -- getting hands on experience +with reverse proxies, DNS, and a variety of operating systems and webservers +(first hosted on Alpine Linux and migrated to OpenBSD). Additionally, I could +self-host git repos, which has long been a nerd-goal of mine :) + +I plan to write a lengthier post about the joys of self-hosting in the future, +but for now, I really just wanted to give a brief update on where I landed and +what the current stack is. + +I'm currently running (in no particular order): + +* **OS:** OpenBSD +* **Web server:** OpenBSD's `httpd(8)` + - Serves the `www.` static content + - Also serves [git.alexkarle.com][git] +* **Reverse proxy:** OpenBSD's `relayd(8)` + - Used to send traffic between [`euchre.live`][el] (which uses a [Mojolicious][mojo] + web server as the backend) and `alexkarle.com` based on URL +* **`www` content:** + - 100% static content + - No metrics, ads, or tracking + - Posts and pages written in markdown + - HTML generated with a pipeline of the original `Markdown.pl` into a small + templating Perl script that I home-rolled +* **Git:** + - Public repos served with `git-daemon(1)` over the `git://` protocol + - Push access via the `ssh://` protocol + - static HTML of content generated via post-receive hook with [stagit][stagit] + +That's all for now! + +[1]: 12-19-19-a-new-hope.html +[el]: http://euchre.live +[git]: https://git.alexkarle.com +[stagit]: https://git.codemadness.org/stagit/ +[mojo]: https://mojolicious.org + + diff --git a/content/thoughts.md b/content/thoughts.md index 867d63a..b35dfb3 100644 --- a/content/thoughts.md +++ b/content/thoughts.md @@ -4,6 +4,7 @@

(Because I couldn't commit to calling it a blog)

+* [Jul. 17, 2020: Migrating to a Self-Hosted Site](07-19-20-self-hosted.html) * [Jul. 13, 2020: Black Lives Matter](07-13-20-blm.html) * [Mar. 24, 2020: What's in a (domain) name?](03-24-20-domain-name.html) * [Dec. 19, 2019: A New Hope](12-19-19-a-new-hope.html) -- libgit2 1.1.1