summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormms <michal@sapka.me>2024-09-12 22:58:44 +0200
committermms <michal@sapka.me>2024-09-12 22:58:44 +0200
commitec53ecc04df5ed113b2cbecfecdea28b7ccb22b1 (patch)
tree5fe8e61afab31423b098f179439236a1b76c9efb
parent5bb2e8a0b82e06008587f375b0bdf78c7c4b799f (diff)
feat(blog): self host 2
-rw-r--r--content-org/blog.org48
-rw-r--r--content/blog/2024/i-will-self-host-this-site.md52
2 files changed, 99 insertions, 1 deletions
diff --git a/content-org/blog.org b/content-org/blog.org
index 10421fa..24cea92 100644
--- a/content-org/blog.org
+++ b/content-org/blog.org
@@ -8,13 +8,59 @@
#+HUGO_SECTION: blog
-* 2024 [65/66] :@blog:
+* 2024 [66/67] :@blog:
:PROPERTIES:
:EXPORT_HUGO_SECTION: blog/2024
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :image_dir "blog/images" :image_max_width 600
:EXPORT_HUGO_PAIRED_SHORTCODES: image yt
:END:
+** DONE I most definetelly should (self-host)!
+CLOSED: [2024-09-12 Thu 22:55]
+:PROPERTIES:
+:EXPORT_FILE_NAME: i-will-self-host-this-site
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :abstract Time to self host
+:END:
+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 [[https://crys.site/][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 [[https://uf.crys.site/][User Friendly Archive]] 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 [[https://mastodon.bsd.cafe/@stefano][Stefano]].
+Thank you!
+
+/Btw, I write Emacs running on a FreeBSD system and I then send my writings to my self-hosted site/.
+
** DONE Should I self-host my site?
CLOSED: [2024-09-08 Sun 21:07]
:PROPERTIES:
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_.