diff options
Diffstat (limited to 'content/blog/2024/i-will-self-host-this-site.md')
-rw-r--r-- | content/blog/2024/i-will-self-host-this-site.md | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/content/blog/2024/i-will-self-host-this-site.md b/content/blog/2024/i-will-self-host-this-site.md new file mode 100644 index 0000000..55434f6 --- /dev/null +++ b/content/blog/2024/i-will-self-host-this-site.md @@ -0,0 +1,52 @@ ++++ +title = "I most definetelly should (self-host)!" +author = ["MichaĆ Sapka"] +date = 2024-09-12T22:55:00+02:00 +categories = ["blog"] +draft = false +weight = 2001 +image_dir = "blog/images" +image_max_width = 600 +abstract = "Time to self host" ++++ + +A few days ago, I asked myself if I should self-host my site. +The answer is a clear **yes**! + +Firstly, say hello to my server's homepage under [crys.site](https://crys.site/) (bonus points if you get the reference). + +I have repurposed an old Raspberry Pi 4b, which I had lying around. +There, I've installed FreeBSD 14. +Damn, I really love FreeBSD. +I fell much comfier there than on OpenBSD or any Linux I've ever tried. + +Anyway, there are two jails there: + +- the first, which works as reverse proxy. + It has nginx(8), certbot(1) (for ssl) and DDClient (for keeping my IP up to date in the DNS). + It proxies all requests to the second one +- the second has nginx(8) which serves statically build sites. + +The jails and static data is not stored in SD card of the RPi, but on a thumb drive with ZFS. +The thumb drive is faster than my upload (which is 40 MB/sec). +It may wear out, but then I'll either connect and m2 drive via USB, or upgrade to an X86 thin client as the server machine. + +I tried to do deployment using zfs-send(8) and zfs-receive(8). +The initial sync is great, but I can't send updates. +The way my jails are configured is that they don't access the ZFS mount points directly. +Instead, I mount them as _nullfs_ in `fstab`. +This means that zfs-receive(8) can't unmount the ZFS mount because it's busy from the fstab mount. +Hell. +Instead, for now, I returned to old, trusty rsync(1). + +I have migrated [User Friendly Archive](https://uf.crys.site/) first, and the rest of the sites will follow. +They are **very** coupled together as under the hood, they are a singe Hugo site. +I will need to think of a nice way to make it work. + +All this and all I got was a huge grim on my face. +Love it! + +I had a lot of help on mastodon, especially from [Stefano](https://mastodon.bsd.cafe/@stefano). +Thank you! + +_Btw, I write Emacs running on a FreeBSD system and I then send my writings to my self-hosted site_. |