========================
== Leon Muscat's Blog ==
========================

Managing State Nicegui

· Nicegui

At work I started using Nicegui quite extensively to build various tools based on it. I’ve found that Nicegui is incredibly versatile to quickly create small to medium sized tools that go beyond the standard data presentation that Streamlit or Plotly Dash allow.

Recently, I came across a discussion about effective state management within Nicegui. The problem is that the library does not provide any out-of-the-box solution, so I’ve developed my own over time. I invite you to read the discussion thread, but the essence of my approach is documented below.

A pretty good backup solution

· selfhosting

“Data doesn’t exist unless it exists in at least three places.”

This wisdom especially applies to all your selfhosted data. Often as a homelab grows, so does the importance of the data that’s stored within. At least for me that holds true. So, how do I make sure my data is safe?

Requirements

I have the following requirements for my backup solution:

  1. Even if my whole homelab falls apart, I must still have a copy of my data
  2. Rollback should be quick even if one copy is down
  3. I can cherry-pick files to restore

There are only two exceptions to these requirements:

LangGraph parallel tool execution and LLM generation

· LLM LangGraph

Recently, I was working with LangGraph to build a chatbot, and encountered a limitation: You cannot invoke an LLM before completing all open toolcalls.

I found a way to work around that, and I’m sharing my solution since I couldn’t find anything online addressing this issue.

The Problem: Sequential Execution Bottleneck

My chatbot needed to generate charts as part of its reponses. I wanted to have both a chart and an accompaning text by an LLM.

Authentik as Idp

· selfhosting

After my previous post about Mailcow, I want to talk about another piece of my homelab infrastructure: Authentik, my identity provider of choice. I’ll cover why I chose it, how I set it up, and how I’ve integrated it with various services.

Why an identity provider?

Let’s first discuss why you might want a centralized identity provider in your homelab.

The problem with multiple accounts

When you start self-hosting services, each one typically comes with its own authentication system. This quickly becomes unmanageable:

Mailcow With Dynamic IP

· selfhosting email

I’ve been hosting my own email with Mailcow for over 2 years now. I want to go over general considerations when it comes to selfhosting email and the setup I went for.

Motivation

Before we go to the technical bits, let’s first discuss the reasons to selfhost email.

Why you should not selfhost mail

Selfhosting email is quite a daunting task, which is why it’s often not encouraged in selfhosting communities. There are many good reasons for that: