<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>nebulo.computer</title>
<link>https://nebulo.computer/</link>
<description>Personal portfolio of Nebulo, with dynamic effects, projects and blog.</description>
<language>en</language>
<lastBuildDate>Tue, 17 Nov 2026 00:00:00 GMT</lastBuildDate>
<atom:link href="https://nebulo.computer/feed.xml" rel="self" type="application/rss+xml"/>
<item>
<title>homelab</title>
<link>https://nebulo.computer/blog/homelab/</link>
<guid isPermaLink="true">https://nebulo.computer/blog/homelab/</guid>
<pubDate>Tue, 17 Nov 2026 00:00:00 GMT</pubDate>
<dc:creator>Nebulo</dc:creator>
<category>blog</category>
<category>homelab</category>
<category>docker</category>
<category>self-hosting</category>
<description>Three machines, one reverse proxy, a private network and nightly Btrfs snapshots: how my family cloud fits together, and what I learned along the way.</description>
<content:encoded><![CDATA[<p>For the past year and a half, my family has been using its own cloud, including photos, files, chat, mail, passwords. This cloud is actually just a shared Linux box and a couple of game servers, all on two machines at home. This is how it's put together, what broke along the way, and what I'd tell someone starting out. Everything is kept in one Git repo of config files, which was a very useful way to jog my memory; the commit history is a decent diary :)</p>
<h2 id="what-it-looks-like">What it looks like</h2>
<figure><img src="https://nebulo.computer/content/blog/img/homelab-dashboard.png" alt="Monitoring dashboard" loading="lazy"><figcaption class="n-caption">Monitoring dashboard for Atlas</figcaption></figure>
<p>There are three machines. <strong>Atlas</strong> is the main one and runs nearly everything. <strong>Ares</strong> is the second, mostly for game servers, so they live apart from the family's data. Lastly, <strong>Eros</strong> is the third, a Raspberry Pi that maintains the crucial services, specifically Headscale (VPN), Authentik (IdP), and Adguard Home (DNS).</p>
<p>Almost every service is a Docker Compose project in its own folder. Each project is started by a small systemd unit, so Docker comes up with the machine and I can stop and start things with <code>systemctl</code>. The exception is the chat server, which is a pile of containers managed by an Ansible playbook (which needs special handling for backups, how fun).</p>
<p>What's on it:</p>
<ul><li><strong>Files and documents</strong>: Nextcloud, with an office suite and a whiteboard next to it</li><li><strong>Photos</strong>: Immich</li><li><strong>Chat</strong>: a Matrix server</li><li><strong>Mail</strong>: Stalwart, our own mail server</li><li><strong>Passwords</strong>: Vaultwarden</li><li><strong>Login</strong>: Authentik, an identity provider all other apps use</li><li><strong>Game servers</strong>: the Pelican panel on Atlas, its Wings daemon on Ares</li><li><strong>Mischellaneous</strong>: a finance app, a trip planner, a flight log, and location history</li><li><strong>Plumbing</strong>: Caddy, AdGuard Home, Headscale, ntfy, Beszel, Diun</li></ul>
<p>Crucially, there is a big requirement for all services to be free and open source, which means everything is locally hosted, with no proprietary software. There are countless ethical reasons to prefer open source software, but the most important ones are that it's truly free, with no vendor lock-in.</p>
<h2 id="the-front-door">The front door</h2>
<p>Only one thing answers on the web ports: <strong>Caddy</strong>. Every service listens on localhost only, and Caddy decides by hostname who gets the request, adds compression and security headers, and handles certificates by itself. Adding a service is a Compose file plus a handful of lines in the Caddyfile.</p>
<p>The domain's DNS is on Cloudflare. It was proxied for a while (which is something I reccommend to everyone until you're truly comfortable with the security implications), but today plain A records point at the house and <code>ddclient</code> keeps them current as the public IP changes. The tunnel setup is still active and document, ready to be used at any moment. The firewall is <code>ufw</code> with everything denied by default, and I keep the output of its status command in the repo.</p>
<p>Mail and Matrix are partial exceptions. SMTP can't go through Caddy, nor can Matrix Federation, so those ports are open directly.</p>
<h2 id="keeping-it-private">Keeping it private</h2>
<p>The part of our homelab I like the most is the access control setup. <strong>Authentik</strong> is an identity provider that handles all authentication, and all services must login through it, making single sign-on easy. <strong>Headscale</strong> is our control server for Tailscale, so we have a private network that everything joins, with Headplane as a web UI for it. The best part about Tailscale is that through ACLs, members can reach their own devices and the servers, servers can reach each other, and only admins can manage the server tags.</p>
<p><strong>AdGuard Home</strong> is our DNS server, responsible for blocking ads and trackers. It also resolves local <code>.lan</code> names, which are accessible only via Tailscale or our local network. These <code>.lan</code> names are useful for quick access to sensitive services like router panels and the AdGuard control panel.</p>
<figure><img src="https://nebulo.computer/content/blog/img/homelab-headscale.png" alt="Headscale panel" loading="lazy"><figcaption class="n-caption">Headscale panel for Atlas (via Headplane)</figcaption></figure>
<p>Since these 3 services are the backbone of user connections, they are treated as critical and kept on a separate machine (Eros). Backups are still sent to Atlas due to size constraints.</p>
<p>Additionally, Eros runs:</p>
<ul><li><strong>ntfy</strong> sends push notifications to our phones.</li><li><strong>Beszel</strong> monitors all 3 machines.</li></ul>
<h3 id="desk">Desk</h3>
<figure><img src="https://nebulo.computer/content/blog/img/homelab-desk.png" alt="Desk" loading="lazy"><figcaption class="n-caption">ssh desk</figcaption></figure>
<p>The newest piece is <strong>Desk</strong>, a shared Linux virtual machine that lives on the tailnet. Each of the four of us has an account, and you reach it by <code>ssh desk</code>, with no keys or passwords, since the tailnet already knows who you are. Files, installed tools and tmux sessions stay on it, so you can pick up where you left off from any device. It syncs a folder both ways with Nextcloud, and each person can install software with a small <code>pkg</code> wrapper around Nix, without root and without affecting anyone else.</p>
<p>It's a container, which means no systemd inside, and tmux sessions die when it restarts. My fix for this has been using scripts in a special user folder that run on every start, and another special user folder that runs before shutdown while sessions are still alive.</p>
<p>The desk has easily been my favourite addition in the past year. I've been using it as a Sandbox for my Claude Code, which through Nextcloud, has access to select folders and files that it can use to help me study for my courses, and having it accessible from any device without any special setup has made it a great tool for learning.</p>
<h2 id="a-backup-a-day">A backup a day...</h2>
<p>The disk is Btrfs, split into subvolumes that cover the system, home, Matrix data and the Docker app folders. <strong>btrbk</strong> takes snapshots at 3am every day of all relevant subvolumes and sends them to a separate backup drive, keeping a week of dailies plus one weekly and one monthly.</p>
<p>A snapshot of a database in the middle of a write is a bad backup, so the job doesn't call btrbk directly. A small script stops the Matrix playbook and every running Docker unit, takes the snapshot (which is nearly instant), and then starts everything again <em>before</em> the slow transfer to the backup drive. It remembers which units were running, so it only restarts those. It also traps exit, so even if the script dies halfway, the services come back. Services are down only for the snapshot, at night, and the slow copy happens with everything back up.</p>
<h2 id="no-stale-services">No stale services</h2>
<p>Especially in the age of AI, updating software is a necessity. I check for new container versions with <strong>Diun</strong>. It watches the containers I label, once a day, and sends me a push notification through ntfy when a new image shows up. It can't tell whether a tag is <em>newer</em>, only that it's <em>different</em>, so I have to make use of regex for each service to ensure only relevant tags are matched. Diun doesn't update anything itself, I read the notification and decide (pin your images, and always check the changelog before updating).</p>
<h2 id="still-a-long-way-to-go">Still a long way to go</h2>
<p>This homelab has been my entrypoint into infrastructure and DevOps, and I'm still learning a lot. Throughout the past year, a lot of things have changed:</p>
<ul><li><strong>Services come and go</strong>, and thats ok. A budgeting app, a fitness tracker, and more were all on the server at some point and are gone now. Its important to realise when a service simply isn't worth it.</li><li><strong>The repo drifted away from the server.</strong> One of my commit is literally named <em>Updated to latest files on Atlas</em>, and it changes 33 files. The server had moved on for months without the repo following. A repo that's only a snapshot of the machine isn't config management, it's a diary.</li><li><strong>Networking.</strong> I constantly made changes with Cloudflare tunnels, port forwarding, and other networking configurations. With all these changes, the local network went offline at least 5 times in the past year.</li></ul>
<p>There are plenty of ambitious plans for the future, like offsite backups, router replacements, or even media serving. This all happens with time (and money, but that's a different story), and its never done, ever. There will definitely be a couple more blog posts in the future with who knows what.</p>
<h2 id="if-i-did-it-again">If I did it again</h2>
<ol><li><strong>Set up backups before the second service</strong>, not after the first thing you'd miss.</li><li><strong>Keep the config in Git from day one</strong>, and make that the only way things change. I didn't update the repo for months, and spent days redocumenting.</li><li><strong>Secrets stay out.</strong> Compose files should at least be read from <code>.env</code> files, with the repo only having <code>.env.example</code> copies. Ideally use Docker secrets or a similar solution, but even I'm not there yet.</li><li><strong>Pin versions that matter</strong> (the database behind the photos, the mail server) and let the rest float, with something watching. It's easy to miss a migration that will break things.</li><li><strong>Plan for being the only person who understands it.</strong> Documentation is surprisingly useful, especially if you're the only person managing the servers, its very easy to forget how things work.</li></ol>
<p>It's not a polished product, and it never will be. It's very useful to a handful of people who'd otherwise be paying for a stack of subscriptions. And it makes a good place to learn how fragile the internet actually is.</p>]]></content:encoded>
</item>
<item>
<title>asm-engine</title>
<link>https://nebulo.computer/projects/asm-engine/</link>
<guid isPermaLink="true">https://nebulo.computer/projects/asm-engine/</guid>
<pubDate>Wed, 21 Oct 2026 00:00:00 GMT</pubDate>
<dc:creator>Nebulo</dc:creator>
<category>projects</category>
<category>x86-64</category>
<category>opengl</category>
<category>glfw</category>
<category>ci</category>
<description>A 2D engine written from scratch in assembly, with a UI and post-process layer, and a self-built docs pipeline. All of it to make Last Stop, a Balatro-style bus ride card game.</description>
<content:encoded><![CDATA[<p>A 2D game engine written from scratch in x86-64 assembly, and <em>Last Stop</em>, a card game built on top of it. Both started as a university assignment: make a game in assembly. I wrote nearly all of the engine and some parts of the game, in a team of four.</p>
<figure><img src="https://nebulo.computer/content/projects/img/asm-engine-gameplay.png" alt="Last Stop gameplay" loading="lazy"><figcaption class="n-caption">Last Stop mid-stop: cards, answer buttons, HUD and the CRT shader</figcaption></figure>
<h2 id="source-0-3">Source 0.3?</h2>
<p>The engine is a static library. A game fills in one config struct (somewhat inspired by Valve's Source engine gameinfo.gi), registers its scenes and calls a single run routine. From there the engine owns the window, the frame loop, input, 2D drawing, text, sound and post-processing. The game only owns the rules and what the screens look like. The engine is about 4,800 lines of GNU <code>as</code> in AT&amp;T syntax, a good share of which is comments, only using GLFW, legacy OpenGL, stb_image, stb_truetype and miniaudio as dependencies. All of these are C libraries, and assembly calls them like any other C function.</p>
<p>What a game provides:</p>
<ul><li><strong>Scenes.</strong> A scene is a description of update, draw, enter and exit routines, and a layout. Switching is only <em>requested</em> during a frame and happens at the start of the next one, so a scene is never torn down while one of its own routines is still running.</li><li><strong>Virtual screen size.</strong> The game draws in fixed units of its choice (for example, 1280 by 720). The engine scales that to the window, keeps its shape with letterbox bars, and maps the mouse back the other way. Window size and framebuffer size are kept apart so HiDPI screens work.</li><li><strong>UI layer.</strong> A scene's layout is an array of rects, and a slot is an index into it. The game asks whether a slot is hovered, clicked, or was <em>just</em> entered, and decides for itself how it looks.</li><li><strong>Everything is a quad.</strong> Rects, outlines, sprites and text all go through one routine that draws a textured quad. A plain rect uses a one-pixel white texture, and OpenGL multiplies it by a given colour. Text bakes a font into an atlas and draws glyphs as sub-rectangles of it. The atlas is larger than necessary and sub-rects are drawn smaller so text stays sharp as the window grows.</li><li><strong>Post-processing.</strong> If the engine is given two GLSL shader paths, then every frame is drawn off-screen and through the provided shader. Our game uses it for a CRT look: curvature, scanlines, a soft bloom and a vignette.</li><li><strong>Sound.</strong> Effects are decoded into memory once and can overlap themselves; music streams one looping track. With no audio device the game just runs silently.</li><li><strong>Seedable random numbers.</strong> xorshift64 with a state the caller owns, so a game can keep separate streams.</li></ul>
<figure><img src="https://nebulo.computer/content/projects/img/asm-engine-ui.png" alt="Engine UI layer" loading="lazy"><figcaption class="n-caption">The UI layer: slots that lift and grow on hover</figcaption></figure>
<h3 id="design-choices-i-m-happy-with">Design choices I'm happy with</h3>
<p><strong>Zero means none.</strong> Textures, fonts and sounds are small integer IDs, and 0 is always &quot;nothing&quot;. Every routine accepts 0 or an unknown id and quietly does nothing. A missing asset makes the game look or sound wrong, but it never crashes it, and the reason is printed to stderr. This was crucial during development when assets weren't always available.</p>
<p><strong>State stays in its file.</strong> Each file owns its own data and no data label is ever global. If another file wants it, it calls a routine. So when you open a file, everything that can change its variables is in the file itself.</p>
<p><strong>Only two files are shipped.</strong> The game sees <code>engine.inc</code> (keys, config offsets, scene layouts) and nothing else. Everything else is hidden behind the library.</p>
<p><strong>C only where it has to be.</strong> There are a few things that I can't do in assembly. For example, there is no way to know how big a miniaudio struct is, so a tiny C file exports those sizes and the assembly code allocates exactly that many bytes.</p>
<h2 id="assembly-is-a-system-neo">Assembly is a system, Neo</h2>
<p>The course came with a set of rules, but I expanded upon them to improve readability across the codebase. Every routine has a stack frame, even the ones that call nothing. The stack is 16-byte aligned at every call. Callee-saved registers are saved and restored the same way every time. Labels, prefixes and comment blocks follow one scheme. No clever tricks, always prefer plain loops and instructions over optimisation, the goal of this project is to write readable, maintainable assembly.</p>
<p>Small rules can easily be missed, so I set up a Python tool that <strong>lints</strong> the conventions (names, doc blocks, stack frames, operand-size suffixes, no position-relative addressing) and <strong>generates documentation</strong> from the comments in the source. It runs in a pre-commit hook, so a commit that breaks a rule doesn't land, and the docs are always regenerated from the final state of the code. Comments are written as small doc blocks with a C signature above every routine, which meant the assembly could be read like an API.</p>
<h2 id="dhl-express-shipping">DHL Express Shipping</h2>
<p>The engine lives in its own repository on a Forgejo instance. When the version file changes on the main branch, CI builds the library and publishes a release tarball with the archive and the headers. The game pins an engine version in its Makefile, downloads that release on the first build, and caches it. Upgrading the engine is changing one number. It also kept us honest: the game only ever sees the library and its headers, the same as anyone using a library off the internet.</p>
<h2 id="last-stop">Last Stop</h2>
<p><em>Last Stop</em> is the game we built on this engine, a roguelike card game about a bus ride. A run is nine stops. At each stop you draw cards and answer four questions about the next card: red or black, higher or lower, between or outside, and whether its suit is already in your hand. Right answers add the card's chips and the question's mult, and the pot is chips times mult (a system VERY lightly inspired by Balatro). Reach the stop's threshold and you can get off, take your pay and visit the shop. Fall short and you spend a retry.</p>
<p>In the shop you buy passengers, with 29 of them across rarities. They bend the scoring in different ways. One gives hearts +3 mult, another doubles your mult on suit questions, and another grows stronger with every stop you clear. Every run plays from a seed, and the card order and the shop use separate random streams, so what you buy never changes the cards you draw. Using the same seed twice replays a run exactly.</p>
<figure><img src="https://nebulo.computer/content/projects/img/asm-engine-shop.png" alt="Last Stop shop" loading="lazy"><figcaption class="n-caption">The shop: passengers on offer, reroll, drive on</figcaption></figure>
<p>The game is split in three: a <strong>model</strong> that holds the rules and never draws, a <strong>view</strong> that draws from a state struct and never changes the run, and a <strong>controller</strong> that reads input and calls the model. Input is table-driven: rows of key, slot, handler and argument, so adding a control is simply adding a row.</p>
<h3 id="my-part">My part</h3>
<p>We were four on the game, and without my teammates none of this would've been remotely as good as it is, let alone possible. They made the assets, audio system, gameplay rules and logic, passenger system and the restructure into the model, view and controller folders. I did work on the following:</p>
<ul><li><strong>UI system</strong>: Slot drawing, hover effects, and a large rework of the HUD and theming in late development</li><li><strong>Post Processing</strong>: Wrote a GLSL CRT style shader and plugged it into the engine</li><li><strong>Gameplay Design</strong>: Balanacing the game mechanics and rules, and tuning the economics of the game to make it fair and rewarding.</li><li><strong>System Redesigns</strong>: Reworked passengers to have an upgrade system and overhauled the retry flow and win conditions.</li><li><strong>CI/CD</strong>: the build setup and the game/engine release pipeline</li></ul>
<figure><img src="https://nebulo.computer/content/projects/img/asm-engine-run.png" alt="Last Stop pay preview" loading="lazy"><figcaption class="n-caption">The pay preview before choosing retry or get off</figcaption></figure>
<h2 id="what-the-pain-taught-me">What the pain taught me</h2>
<p>Assembly isn't hard because the instructions are hard, it's hard because nothing tells you when you messed up. A missing register save shows up three calls later as a wrong colour. What made the project work was not cleverness but rules, tooling and small files. Our best decision was to have thin modules, one idea each, written so a teammate who has never seen them can read them.</p>
<p>It also changed how I read and approach higher-level code. A lot of game engine and graphics API concepts have become a lot more understandable now. I've also started to get into the habit of writing far more modular code and systems (no matter how high or low level the language is), not because it's more performant, but because it's more maintainable and easier to reason about.</p>
<hr class="n-rule">
<p><em>The source isn't public, because the work belongs to the university, though that may change. If it does, I'll link it here.</em></p>]]></content:encoded>
</item>
</channel>
</rss>
