ENG | The Self-Hosting Chronicles: A Recap and Look to the Future
Pre-history (2017), Raspberry PI
This blog idea somewhat started in 2017 when I wanted to document my experiments with Arduino and things that I’ve learned. I wrote about half of the articles I wanted to and discovered the Jekyll static site generator. I hosted the blog on a Raspberry PI 3B. Dynamic DNS was provided by no-ip.com.
However, for some reason, I lost interest. I initially wanted to use the Raspberry Pi as a kind of “cloud storage,” but accessing files via SFTP was somewhat inconvenient, and the Raspberry Pi’s slow I/O and unreliable SD cards didn’t meet my long-term needs so it lasted about four months.
New motivation
In the winter of 2023, the idea of the blog resurfaced. I found myself running out of space on OneDrive’s 5GB storage, and I also experienced some file loss on OneDrive. Additionally, Google Photos had transitioned from offering unlimited storage to a 20GB limit for Photos, Gmail, and Google Drive combined. I wanted a solution to share photos and files with friends and family. Also, I don’t want to put all of my projects to GitHub and some don’t exactly fit there.
Start (2023)
In late February I ordered Zimaboard 216, a low-power PC with x64 architecture, SATA interface, and USB3, addressing all of the issues I encountered with Raspberry Pi. I installed OpenSuse Leap 15.5 Beta on it and began experimenting with Docker after watching some YouTube videos from Christian Lempa, Network Chuck, DB Tech and Wolfgang’s Channel. The reason I chose openSUSE was that, I considered it to be one of least problematic distribution with resonable default settings. Also it always worked well with KDE desktop.
March 2023: Exploring Docker and Nextcloud on Zimaboard
I installed NextCloud as my first docker service and also started to experiment with XRDP and some lightweight window managers. I ended using OpenBox, Plank dock and Tint2 panel. At this point I realized that 2GB of RAM are not enough and processor is too slow for something like resizing of uploaded images or running browser. As with Raspberry I was using no-ip.com and updating it manually.
April 2023: Upgrading server and migrating to Fedora and Podman.
In April, I did some research (which I should have done earlier) and started looking at old, refurbished mini-PCs. I purchased the Fujitsu Esprimo Q956, and transferred the SATA drive from ZimaBoard to the new server. It proved to be a significant improvement. Additionally, I acquired the Shelly Plug S to measure the power consumption of various hardware. For some reason I decided to upgrade Fujitsu with 32GB of RAM and a 1TB NVMe drive. I installed Fedora 38 on it, copied NextCloud, backed up the /home from openSUSE and returned the SSD to the Zimaboard for experiments and network services. This turned out to be a fortunate decision, as a few weeks later, the SATA drive on the Zimaboard died, after barely 3 months.
During this time, I encountered a minor problem. Fedora 38 was new, and there were no Docker packages available from either Fedora or Docker. As a solution, I transitioned to using Podman, which surprisingly proved to be relatively easy. The major difference is that Podman runs without root permissions, and user IDs use a some kind of mapping system. Podman is nearly compatible with Docker and offers a few extra features, including easy volume backup and restoration.
Furthermore, I moved from using nginx-proxy-manager to Cloudflare in an effort to enhance the overall robustness of my setup.
May, June 2023: Starting Jekyll blog and finding a suitable template
In May, not much happened. I started writting this blog for myself based on my notes, self-hosting it, I found much better template for blog Chirpy and slowly continued through June.
As mentioned before, one SSD died so I lost longer term power consumption measurements and some network configuration improvements, such as fallback DNS, but Fedora has slightly different network config.
Major part of this blog was written or updated during vacation in early July. I learned how to self-host Gitea, how to use Visual Studio Code to edit files remotely when RDP is way too slow and consumes lot of data on LTE connection.
Additionally, I purchased a refurbished Lenovo ThinkPad T480s, which proved to be a substantial upgrade compared to the notebook I use for work.
Rest of 2023: Maintenance state (added February 2024)
Not much happened. Just some maintenance, split of docker-compose.yml file, unsuccessful update and successful restoration of NextCloud so some related articles were updated.
I wanted to limit the number of lines written into journal to reduce disc writes and perhaps a bit of CPU usage so there’s new article about SSH hardening.
Achievements in self-hosting
Remote access
Networking
Self-hosting articles
Other articles
Running containers as of July 2023
CONTAINER ID | IMAGE | NAMES |
---|---|---|
26014f1de701 | lscr.io/linuxserver/mariadb:latest | nextcloud-mariadb |
84ecf85b3f0b | docker.io/cloudflare/cloudflared:latest | cloudflared |
93f73e1f7785 | docker.io/favonia/cloudflare-ddns:latest | cloudflare-ddns |
ec04edf44373 | lscr.io/linuxserver/nginx:latest | nginx |
6ae15f20bd8d | lscr.io/linuxserver/nextcloud:26.0.2-ls246 | nextcloud-app |
7d677271aa72 | lscr.io/linuxserver/mariadb:latest | gitea-mariadb |
25f129a28ac8 | docker.io/gitea/gitea:1.20-rootless | gitea |
(As of February 2024 there’s one more nginx instance for different domain)
Future plans
Nothing is promised. I have weeks when I have little time or will to write this.
Self-hosting
I want to split services into several docker-compose files and systemd services for easier independent upgrades.
Migrating from Gitea to GitLab for familiarity and exploring regression testing with tools such as Google Test and Google Benchmark.
Since NextCloud is not a perfect replacement of OneDrive, I’m going to move some old files or projects, I don’t need frequently to NextCloud, discontinuing payments and living with 5GB limit. Maybe Syncthing is a replacement I’m looking for. Maybe it’s worth to backup OneDrive to DVD.
Exploring self-hosting options for an image gallery.
Collecting web access statistics to gain insights into readership and how visitors discover the blog.
These are the expected future developments in the realm of self-hosting.
Programming articles
Expect articles covering topics such as image processing techniques, the use of matrices for 3D projections, and more. However, I don’t want to promise too much, as it’s unlikely that many people will read them.
It’s possible that I’ll ressurect one Arduino project and one Raspberry Pi project and likely back date them to 2021 and 2017. Articles are mostly written.