<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>homelab · ruby</title><link>https://ruby.zone/tags/homelab/</link><description>Michal (ruby) writes about storage, SAN, site reliability and what he learns from critical incidents.</description><language>en-US</language><lastBuildDate>Tue, 24 Nov 2026 08:39:10 +0000</lastBuildDate><atom:link href="https://ruby.zone/tags/homelab/index.xml" rel="self" type="application/rss+xml"/><item><title>How this blog is built</title><link>https://ruby.zone/blog/how-this-blog-is-built/</link><guid isPermaLink="true">https://ruby.zone/blog/how-this-blog-is-built/</guid><pubDate>Tue, 24 Nov 2026 00:00:00 +0000</pubDate><category>homelab</category><category>hugo</category><category>security</category><category>github</category><category>ai</category><description>&lt;p&gt;In the &lt;a href="https://ruby.zone/blog/why-i-started-this-blog/"&gt;first post&lt;/a&gt; I promised to describe how this site runs. Here it is. It is a small setup, but I built it like a production service on purpose. I hosted it myself because I wanted to learn the whole path from a text file to a page on the internet.&lt;/p&gt;&#10;&lt;p&gt;I will stay on the level of design. No addresses, no names of machines, no rules. A blog about reliability should not be a guide for attacking its own server.&lt;/p&gt;&#10;&lt;h2 id="the-requirements"&gt;The requirements&lt;/h2&gt;&#10;&lt;p&gt;Before I wrote any code, I had a few simple requirements:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;the site must be static, no database, no admin login on the web server,&lt;/li&gt;&#10;&lt;li&gt;nothing in my home network should be open to the internet,&lt;/li&gt;&#10;&lt;li&gt;every change goes through a pull request, the same as at work,&lt;/li&gt;&#10;&lt;li&gt;if something breaks, I can go back to the previous version in a minute,&lt;/li&gt;&#10;&lt;li&gt;the server must not need my attention every week.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="what-i-chose-and-why"&gt;What I chose and why&lt;/h2&gt;&#10;&lt;h3 id="a-static-site-with-hugo"&gt;A static site with Hugo&lt;/h3&gt;&#10;&lt;p&gt;A static site has very little to attack. There is no login page and no plugins to update all the time, the server only sends files. Hugo is one binary, it is fast and posts are plain Markdown files in Git. So the history of every change is in the repository, and a pull request works the same for a post as for code.&lt;/p&gt;&#10;&lt;h3 id="build-in-github-actions"&gt;Build in GitHub Actions&lt;/h3&gt;&#10;&lt;p&gt;The build runs on every merge and the result goes to a separate branch that holds only the finished HTML. My server never builds anything, it only gets the result.&lt;/p&gt;&#10;&lt;h3 id="a-vm-at-home-in-its-own-network-segment"&gt;A VM at home, in its own network segment&lt;/h3&gt;&#10;&lt;p&gt;The server is a Linux VM on a Mac at home. I did not want the web server in the same network as my personal devices. So only the VM sits in an isolated segment. The Mac itself stays in my normal network. From the home side only my admin machines can reach the VM.&lt;/p&gt;&#10;&lt;h3 id="cloudflare-tunnel-no-open-ports"&gt;Cloudflare Tunnel, no open ports&lt;/h3&gt;&#10;&lt;p&gt;The tunnel opens a connection from the VM out to Cloudflare, and the visitors come through that connection. Nothing on my router is open for this site, and my home IP is not in DNS. The domain is with Cloudflare too, so DNS, TLS and the tunnel are in one place.&lt;/p&gt;&#10;&lt;h3 id="pull-based-deploy"&gt;Pull-based deploy&lt;/h3&gt;&#10;&lt;p&gt;The server asks for new versions, nobody pushes to it. This way GitHub needs no access to my server at all, and the server has only a read-only key to the published branch. If somebody gets into my GitHub account, they still cannot log in to the server.&lt;/p&gt;&#10;&lt;h2 id="how-it-runs"&gt;How it runs&lt;/h2&gt;&#10;&lt;p&gt;&lt;img src="diagram.svg" alt="Diagram: visitors reach Cloudflare over HTTPS. A Linux VM in an isolated segment on a Mac at home opens an outbound tunnel to Cloudflare. GitHub Actions builds the site into a published branch, and the VM pulls it with a read-only key. Only admin machines reach the VM from the home network."&gt;&lt;/p&gt;&#10;&lt;p&gt;When I merge a pull request, GitHub Actions builds the site with Hugo and publishes it to the separate branch. The VM checks every few minutes if there is a new version, downloads it and switches to it. If a build is bad, I revert the merge and the VM pulls the previous version back.&lt;/p&gt;&#10;&lt;p&gt;Inside the VM, Caddy serves the files and runs in Docker, and the Cloudflare Tunnel runs next to it. Caddy also sends strict security headers, including a Content Security Policy that allows only scripts and styles from the site itself. The VM installs security updates on its own, so the requirement &amp;ldquo;no attention every week&amp;rdquo; is met for the boring part.&lt;/p&gt;&#10;&lt;p&gt;While the texts were not finished, the site was online but marked as noindex everywhere. The build even fails if a placeholder text is left in the site with the real domain set. I switched indexing on only after the first post was published. This guard is boring, but a half-finished site cannot end up in search results by mistake.&lt;/p&gt;&#10;&lt;h2 id="troubleshooting"&gt;Troubleshooting&lt;/h2&gt;&#10;&lt;h3 id="i-locked-myself-out"&gt;I locked myself out&lt;/h3&gt;&#10;&lt;p&gt;The first real problem was mine. When I switched SSH on the VM to keys only, my first try did not work and I could not log in anymore. A small setting, a few seconds of work, and the server was closed for me as well. I had to roll the change back and do it again. The second time I went step by step and kept a working session open until I was sure the new access works. Now SSH accepts only keys.&lt;/p&gt;&#10;&lt;p&gt;I have seen the same thing in real changes many times. The change itself is easy, but nobody tests how you get back in when it fails.&lt;/p&gt;&#10;&lt;h3 id="the-vm-in-its-own-network"&gt;The VM in its own network&lt;/h3&gt;&#10;&lt;p&gt;Putting only the VM into the isolated segment, and not the whole Mac, took some trial and error. The network side was simple. Getting the virtualization software to bridge the VM to that segment, without giving the Mac an address there, needed a few attempts. It works now, and I like that the Mac and the VM are in different trust zones even though they are the same box.&lt;/p&gt;&#10;&lt;h3 id="my-own-security-policy-broke-the-page"&gt;My own security policy broke the page&lt;/h3&gt;&#10;&lt;p&gt;The Content Security Policy is strict, so it blocks inline styles. Once a new part of the page had a small style written directly in the HTML, and the browser simply ignored it. The page looked wrong and there was no error you would see without the developer tools. The fix was to move the style to the CSS file. I was a bit annoyed, but the rule did exactly what I wanted from it.&lt;/p&gt;&#10;&lt;h3 id="google-remembered-a-site-from-2016"&gt;Google remembered a site from 2016&lt;/h3&gt;&#10;&lt;p&gt;When I added the domain to Google Search Console, it already had a sitemap from 2016. The domain had an owner before me, and Google still remembered their site. I removed the old sitemap and sent the new one. Also, Google kept an old copy of my robots.txt from the time when the site was hidden, so for a day it reported the site as blocked. Nothing to fix there, only wait.&lt;/p&gt;&#10;&lt;h2 id="tuning"&gt;Tuning&lt;/h2&gt;&#10;&lt;h3 id="design-and-readability"&gt;Design and readability&lt;/h3&gt;&#10;&lt;p&gt;The design went through several versions. The final one is built around a storage enclosure: a rack rail on the side, a disk array in the header, and a &amp;ldquo;failure drill&amp;rdquo; where you can fail a disk and watch the rebuild. In the background there is a heartbeat line, like on a monitor.&lt;/p&gt;&#10;&lt;p&gt;When it was almost done, I asked a few senior colleagues for feedback. They recommended some changes and I made them. One of them was readability: the background now fades out behind the text column and stays visible only at the sides.&lt;/p&gt;&#10;&lt;h3 id="speed"&gt;Speed&lt;/h3&gt;&#10;&lt;p&gt;Every design change was checked in Lighthouse. Animations are expensive, so the background starts only after the page has loaded. I also fixed the contrast of a few small labels. With this the scores are between 98 and 100 on mobile and desktop.&lt;/p&gt;&#10;&lt;h3 id="external-data"&gt;External data&lt;/h3&gt;&#10;&lt;p&gt;The sport section shows my yearly totals from Strava. They are not loaded in the browser. The build asks Strava for the numbers every night and writes them into the site. If Strava does not answer, the build keeps the last numbers and continues. The page never waits for an external service, and an outage on their side does not become an outage on mine.&lt;/p&gt;&#10;&lt;h2 id="working-with-ai"&gt;Working with AI&lt;/h2&gt;&#10;&lt;p&gt;I built most of it with AI and the 20-60-20 approach from the first post. I set the requirements and the rules, AI wrote the code, and I reviewed every pull request before merge. In the first four days that was more than 40 pull requests.&lt;/p&gt;&#10;&lt;p&gt;It was much faster than doing it alone. It also made mistakes, and some changes I simply did not like. AI was good at the 60 %, but it did not know my network or my taste. That stayed my job.&lt;/p&gt;&#10;&lt;h2 id="what-i-learned"&gt;What I learned&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Before you change access, make sure you have a way back in.&lt;/li&gt;&#10;&lt;li&gt;Guards in the pipeline are cheaper than fixing a mistake in production.&lt;/li&gt;&#10;&lt;li&gt;An outbound tunnel and a static site remove most of the attack surface before you start hardening.&lt;/li&gt;&#10;&lt;li&gt;External data should never be able to stop your own service.&lt;/li&gt;&#10;&lt;li&gt;Measure after every change, even a small design change can cost speed.&lt;/li&gt;&#10;&lt;li&gt;Ask someone else to look at it. You stop seeing your own problems.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;None of this is new. I know all of it from work. But doing it on my own small server, where every mistake was mine, made it stick better than any training.&lt;/p&gt;&#10;</description></item><item><title>Why I started this blog</title><link>https://ruby.zone/blog/why-i-started-this-blog/</link><guid isPermaLink="true">https://ruby.zone/blog/why-i-started-this-blog/</guid><pubDate>Sun, 22 Nov 2026 00:00:00 +0000</pubDate><category>incidents</category><category>github</category><category>ai</category><category>homelab</category><description>&lt;p&gt;Most big outages I have worked on did not start with something big. They started with something small that nobody checked, or with bad luck at the wrong moment. A step skipped in a change because &amp;ldquo;it is only a small one&amp;rdquo;. A warning in the monitoring that was there for weeks. A redundant path that was not really redundant. Each of these alone is nothing. Together, on a bad day, they take down a critical service.&lt;/p&gt;&#10;&lt;p&gt;After many years in storage and incident recovery I have a lot of these stories in my head. I wanted to write them down and share them. Not the names or the details, those stay where they belong, but the pattern and what we learned. This blog is the place for that.&lt;/p&gt;&#10;&lt;h2 id="small-things-also-at-home"&gt;Small things, also at home&lt;/h2&gt;&#10;&lt;p&gt;Building this site was a good reminder of the same lesson. When I locked SSH on the web server to keys only, my first attempt locked me out of the VM. One wrong setting, and I could not log in anymore. On another day the publish job failed twice on GitHub&amp;rsquo;s side, and I learned how the pipeline behaves when one step breaks. Nothing was lost, but it was the same pattern in a small version: the problem is rarely the big design, it is the detail you did not test.&lt;/p&gt;&#10;&lt;h2 id="learning-github-on-a-real-project"&gt;Learning GitHub on a real project&lt;/h2&gt;&#10;&lt;p&gt;The second reason for this blog is learning. I wanted to understand GitHub properly, not only clone a repository from time to time. The best way to learn a tool is to use it on something real, so the whole site is built the way a software team works:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;every change is a pull request that I review before merge,&lt;/li&gt;&#10;&lt;li&gt;GitHub Actions builds the site with Hugo and publishes it to a separate branch,&lt;/li&gt;&#10;&lt;li&gt;the web server is a small VM in a DMZ on my home network, and it pulls the new version every two minutes,&lt;/li&gt;&#10;&lt;li&gt;the site goes out to the internet through a Cloudflare Tunnel, so no port is open on my router.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;It is a small setup, but it has the same parts as a production one: version control, review, an automated build, a deploy and a rollback. I will describe it in more detail in a separate post.&lt;/p&gt;&#10;&lt;h2 id="20-60-20-with-ai"&gt;20-60-20 with AI&lt;/h2&gt;&#10;&lt;p&gt;I built most of this site together with AI, and I used the 20-60-20 approach. The first 20 % is mine. I decide what I want, set the rules and the limits, for example what must never appear on the site, how it should look and which tools to use. The middle 60 % is done by AI: it writes the code, the layouts and the first drafts, and it does it much faster than I would. The last 20 % is again mine. I review every pull request, test it, ask for changes and decide what gets merged.&lt;/p&gt;&#10;&lt;p&gt;Why it worked for me? Mostly speed. Things that would take me a weekend of reading documentation were ready in an hour, and I could spend the time on decisions instead of syntax. But I also learned a lot. Every change came as a pull request, so I saw exactly what was done and why, and reviewing these PRs taught me more than any tutorial.&lt;/p&gt;&#10;&lt;p&gt;The important part is that the responsibility stays with me. AI is a fast colleague, not the owner. It made mistakes and sometimes it was too confident. The review at the end is not optional, the same as in production.&lt;/p&gt;&#10;&lt;p&gt;This is also how I see AI at work. It does not replace the engineer, but it changes where the engineer spends the time.&lt;/p&gt;&#10;&lt;h2 id="what-comes-next"&gt;What comes next&lt;/h2&gt;&#10;&lt;p&gt;This blog will be mostly about the things I do every day:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Incidents and RCA.&lt;/strong&gt; Stories from major incidents, written in general form, about how small things grew into big problems and what helped to recover.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Storage and SAN.&lt;/strong&gt; Practical notes about enterprise storage, Fibre Channel, performance and data protection.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Site reliability.&lt;/strong&gt; Monitoring, on-call, post-incident reviews and how to make the same failure not happen twice.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Learning.&lt;/strong&gt; GitHub, automation, AI and other things I am learning now, including the mistakes.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;From time to time there may also be something about sport, because training for a triathlon teaches the same patience as running infrastructure.&lt;/p&gt;&#10;&lt;p&gt;If one of these stories helps somebody to check that one small thing before it becomes a big one, this blog did its job.&lt;/p&gt;&#10;</description></item></channel></rss>