alexkarle.com

Source for alexkarle.com
git clone git://git.alexkarle.com/alexkarle.com.git
Log | Files | Refs | README | LICENSE

self-hosted.txt (2145B) [raw]


      1 # self-hosted: A tale of migrating to my own server
      2 
      3 _Published: July 19, 2020_
      4 
      5 If you look at [the first post](/blog/a-new-hope.html) on this site, you'll
      6 see that this site started as a series of static HTML files that I
      7 was, by hand, uploading to Fastmail via their "files" GUI.
      8 
      9 Being a total nerd for automation, I was always on the lookout for
     10 an excuse to migrate to my own server, where I could (over)engineer
     11 a pipeline to build my static content and deploy it without ever
     12 leaving the terminal.
     13 
     14 That excuse presented itself in the form of needing to get a VPS to
     15 stand up my hobby-project, [`euchre.live`](https://sr.ht/~akarle/euchre-live).
     16 If I was going to pay for a tiny VM, it was a no-brainer to move
     17 my personal site to it too.
     18 
     19 This turned out to be a great learning experience -- getting hands
     20 on experience with reverse proxies, DNS, and a variety of operating
     21 systems and webservers (first hosted on Alpine Linux and migrated
     22 to OpenBSD).  Additionally, I could self-host git repos, which has
     23 long been a nerd-goal of mine :)
     24 
     25 I plan to write a lengthier post about the joys of self-hosting in
     26 the future, but for now, I really just wanted to give a brief
     27 update on where I landed and what the current stack is.
     28 
     29 I'm currently running (in no particular order):
     30 
     31 - *OS:* OpenBSD
     32 - *Web server:* OpenBSD's `httpd(8)`
     33   - Serves the `www.` static content
     34   - Also serves [https://git.alexkarle.com]
     35 - *Reverse proxy:* OpenBSD's `relayd(8)`
     36   - Used to send traffic between https://euchre.live (which uses
     37     a Mojolicious web server as the backend) and
     38     [https://alexkarle.com] based on URL
     39 - *`www` content:*
     40   - 100% static content
     41   - No metrics, ads, or tracking
     42   - Posts and pages written in markdown
     43   - HTML generated with a pipeline of the original `Markdown.pl`
     44     into a small templating Perl script that I home-rolled
     45 - *Git:*
     46   - Public repos served with `git-daemon(1)` over the `git://`
     47     protocol
     48   - Push access via the `ssh://` protocol
     49   - static HTML of content generated via post-receive hook with
     50     [`stagit(1)`](https://git.codemadness.org/stagit/)
     51 
     52 That's all for now!
     53 
     54 [Back to blog](/blog)