<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Matúš Námešný</title>
    <description>The latest articles on DEV Community by Matúš Námešný (@lordmathis).</description>
    <link>https://dev.to/lordmathis</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F15091%2F944d1f36-f6b4-4171-85fe-629a9b8a5139.jpeg</url>
      <title>DEV Community: Matúš Námešný</title>
      <link>https://dev.to/lordmathis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lordmathis"/>
    <language>en</language>
    <item>
      <title>Building an AI Homelab</title>
      <dc:creator>Matúš Námešný</dc:creator>
      <pubDate>Wed, 24 Jun 2026 12:57:46 +0000</pubDate>
      <link>https://dev.to/lordmathis/building-an-ai-homelab-330o</link>
      <guid>https://dev.to/lordmathis/building-an-ai-homelab-330o</guid>
      <description>&lt;p&gt;As part of my job over the past year, I've been deploying and evaluating LLMs locally on various hardware setups. Naturally, I became well versed in the open source tools and models available and various hardware options. So I decided to build my own homelab for local inference.&lt;/p&gt;

&lt;p&gt;My goal was to have a playground to try out different models, tools, and agent frameworks. Out of the hardware options available, I chose a Mac Mini M4 Pro for its balance of performance and power efficiency. It also fits nicely under my TV and can double as a media center.&lt;/p&gt;

&lt;p&gt;All configuration files are available in my &lt;a href="https://github.com/lordmathis/homelab" rel="noopener noreferrer"&gt;homelab repo&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This article was originally published on my &lt;a href="https://namesny.com/blog/homelab/" rel="noopener noreferrer"&gt;personal website&lt;/a&gt; in February 2026 and updated in June 2026.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Homelab Overview
&lt;/h2&gt;

&lt;p&gt;Here's a high-level overview of my homelab setup. I'll go into more detail on each component later.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs1t7r14ietjz878e6rgu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs1t7r14ietjz878e6rgu.png" alt="Homelab network architecture diagram showing Traefik and Authelia connected via a Tailnet to an Nginx reverse proxy serving various internal services including Llamactl, Mikoshi, monitoring, and audio tools." width="571" height="578"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Homelab is connected to my &lt;a href="https://github.com/lordmathis/dev-cluster" rel="noopener noreferrer"&gt;cloud VPS&lt;/a&gt; via Tailscale. On the cloud VPS, Traefik acts as a reverse proxy, forwarding requests to my Mac Mini over the Tailscale network. On the Mac Mini, Nginx proxies requests to various services running locally. Additionally, if a service requires authentication, it's handled by Authelia on the VPS using &lt;code&gt;auth_request&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The inference backbone is handled by &lt;a href="https://github.com/lordmathis/llamactl" rel="noopener noreferrer"&gt;llamactl&lt;/a&gt;, which manages multiple model instances using llama-server and MLX. The entrypoint for user interaction is &lt;a href="https://github.com/lordmathis/mikoshi" rel="noopener noreferrer"&gt;Mikoshi&lt;/a&gt;, previously called AgentKit. There's also an audio service for ASR and TTS using MLX models, and Glances for basic system monitoring.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Evolved
&lt;/h2&gt;

&lt;p&gt;The first iteration of my homelab started with using Ollama and OpenWebUI. However, I quickly ran into limitations with Ollama, which led me to develop llamactl, which I detailed in my &lt;a href="https://dev.to/lordmathis/llama-server-is-all-you-need-plus-a-management-layer-27eb"&gt;Llamactl article&lt;/a&gt;. Ollama is also not a great open source citizen as they build on top of llama.cpp without proper acknowledgment. More recently, they implemented their own engine, which still copies heavily from llama.cpp without attribution (&lt;a href="https://github.com/ggml-org/llama.cpp/pull/19324#issuecomment-3847213274" rel="noopener noreferrer"&gt;even bugs&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;OpenWebUI provided a decent interface but it felt quite opinionated and opaque. For example, they didn't support model context protocol (MCP) servers and forced users to use their own MCP proxy MCPo. Their functions and valves system is interesting and could be powerful, but it's opaque. Settings are duplicated and scattered, some for admin, some for user, which gets confusing for my single user instance. Their custom license is just the final nail in the coffin for me even if it makes no difference for my personal use case.&lt;/p&gt;

&lt;p&gt;But, ultimately, the main motivation for me was to get a hands-on experience with LLM clients, tools and agents not hidden behind a shiny UI.&lt;/p&gt;

&lt;h3&gt;
  
  
  Smolagents Experiment
&lt;/h3&gt;

&lt;p&gt;To understand how agents work, I started with the &lt;a href="https://huggingface.co/docs/smolagents/index" rel="noopener noreferrer"&gt;smolagents&lt;/a&gt; framework. It is quite simple and easy to understand by diving into the code. I started by creating a simple ToolCallingAgent and wrapped it in a basic chat loop. As I extended the loop with tool calls and more complex logic, I realized I was basically re-implementing the core logic of smolagents. For now, I kept the smolagents integration as is and went on to add MCPs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mikoshi
&lt;/h3&gt;

&lt;p&gt;The basic chat loop I built on top of smolagents grew into its own thing that I named &lt;a href="https://github.com/lordmathis/mikoshi" rel="noopener noreferrer"&gt;Mikoshi&lt;/a&gt; (originally named AgentKit, but renamed to Mikoshi. Bonus points if you recognize the origin of the name). Over time I added more features like flexible AI providers, conversation memory, tool management, and plugins. When I started integrating MCPs, I ran into conflicts with how smolagents managed them. Since I had already built most of the core agent logic myself, I decided to remove the smolagents dependency entirely and complete my own simple agent framework.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl607cw91gt95tis7eyso.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl607cw91gt95tis7eyso.png" alt="Dark-themed Mikoshi chat interface showing a conversation history where 'Uplink' (user) prompts are answered by 'Daemon' (assistant), with 'Data Shard' entries representing tool call results." width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  MCPs
&lt;/h3&gt;

&lt;p&gt;The Model Context Protocol (MCP) is an open standard that allows LLMs to integrate and share data with external tools and sources. Since it seems like it's becoming a de facto standard, I wanted to add MCP support to my setup using the official Python SDK. All the guides focus on writing servers, which explains the literal thousands of vibe coded and abandoned MCP servers on GitHub.&lt;/p&gt;

&lt;p&gt;The documentation on writing clients is comparably sparse. The recommended way seems to be initializing an MCP client and session per message, which seems quite heavy. After a few experiments I went with keeping a global session open for each MCP server and reusing it for multiple messages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Audio Services
&lt;/h3&gt;

&lt;p&gt;To add audio capabilities, I set up a Whisper ASR and TTS service using &lt;a href="https://github.com/Blaizzy/mlx-audio" rel="noopener noreferrer"&gt;mlx-audio&lt;/a&gt; library. I created a simple FastAPI app that exposes OpenAI compatible endpoints for transcription and text-to-speech synthesis. The app loads the models on demand and unloads them after a timeout to save memory the same way as llamactl.&lt;/p&gt;

&lt;h3&gt;
  
  
  Monitoring
&lt;/h3&gt;

&lt;p&gt;For monitoring, I set up Glances which provides a web interface to monitor system resources like CPU, memory, disk and network usage. It's lightweight and easy to set up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tool Examples
&lt;/h2&gt;

&lt;p&gt;Here are some example tools I've integrated into Mikoshi:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Task Tool&lt;/strong&gt;: Uses CalDAV to manage tasks and todos.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Notes Tool&lt;/strong&gt;: Integrates with a git repository to manage markdown notes using Gitea MCP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anki Tool&lt;/strong&gt;: Create flashcards in Anki&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dictionary Tool&lt;/strong&gt;: Lookup word definitions in a dictionary &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  macOS Side Notes
&lt;/h2&gt;

&lt;p&gt;Coming from a Linux background, setting up a homelab on macOS was an interesting experience. Here are some side notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Homebrew is great for package management, but is nowhere near as comprehensive as apt or pacman&lt;/li&gt;
&lt;li&gt;Launchd is useful for managing services, but the capabilities are quite limited compared to systemd. For example, no easy way to set resource limits or dependencies between services. Starting and stopping services is also more cumbersome.&lt;/li&gt;
&lt;li&gt;Given that macOS is a Unix system, I was surprised to learn that Docker needs to run inside a Linux VM. This prevents me from using GPU acceleration for containerized workloads.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;For now, I mostly focus on adding more plugins and tools to Mikoshi and refining the existing ones. I want to get the most out of local LLMs and specific tools and agents seem to be the way to go. I also want to expand monitoring and possibly add tracing, prompt management, and memory capabilities.&lt;/p&gt;

&lt;p&gt;I've also got Reachy Mini, a small open source robot. It seems like a perfect platform for building a voice assistant and I've recently started working on the integration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/r/LocalLlama/" rel="noopener noreferrer"&gt;r/LocalLlama&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://huggingface.co/docs/smolagents/index" rel="noopener noreferrer"&gt;https://huggingface.co/docs/smolagents/index&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://modelcontextprotocol.io" rel="noopener noreferrer"&gt;https://modelcontextprotocol.io&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>homelab</category>
    </item>
    <item>
      <title>Llama-Server is All You Need (Plus a Management Layer)</title>
      <dc:creator>Matúš Námešný</dc:creator>
      <pubDate>Thu, 04 Sep 2025 21:06:52 +0000</pubDate>
      <link>https://dev.to/lordmathis/llama-server-is-all-you-need-plus-a-management-layer-27eb</link>
      <guid>https://dev.to/lordmathis/llama-server-is-all-you-need-plus-a-management-layer-27eb</guid>
      <description>&lt;p&gt;If you're running LLMs locally, you've probably used &lt;a href="https://ollama.ai/" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt; or &lt;a href="https://lmstudio.ai/" rel="noopener noreferrer"&gt;LM Studio&lt;/a&gt;. They're both excellent tools, but I hit some limitations. LM Studio is primarily a desktop app that can't run truly headless, while Ollama requires SSH-ing into your server every time you want to switch models or adjust parameters.&lt;/p&gt;

&lt;p&gt;For more control, there's &lt;a href="https://github.com/ggml-org/llama.cpp/tree/master/examples/server" rel="noopener noreferrer"&gt;llama-server&lt;/a&gt; from llama.cpp. It's powerful, lightweight, supports virtually every model format, offers extensive configuration options, provides OpenAI-compatible APIs, and, in my opinion, is noticeably faster than Ollama. But it's CLI-only - want to switch models? SSH in and restart.&lt;/p&gt;

&lt;p&gt;I wanted to manage my home LLM server from anywhere without constantly SSH-ing just to switch models. So I built what was missing: a management layer on top of llama-server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enter Llamactl
&lt;/h2&gt;

&lt;p&gt;So I built what was missing: a management layer on top of llama-server. Meet &lt;a href="https://github.com/lordmathis/llamactl" rel="noopener noreferrer"&gt;llamactl&lt;/a&gt; - a management server and proxy that gives you the power of llama-server with the convenience of remote management.&lt;/p&gt;

&lt;p&gt;You get a modern React web dashboard for visual management, REST APIs for programmatic control, and the ability to create, start, and stop instances with just a few clicks. Need a 7B model for quick responses and a 70B model for complex reasoning? Run both. Want to switch between them based on the task? Just change the model name in your API request.&lt;/p&gt;

&lt;p&gt;It's also OpenAI API compatible, so your existing tools, scripts, and integrations work without modification - just point them to your llamactl server instead of OpenAI's endpoints. Want to use &lt;a href="https://openwebui.com/" rel="noopener noreferrer"&gt;Open WebUI&lt;/a&gt; for a ChatGPT-like interface? Just configure it to use your llamactl server as the OpenAI API base URL, and you're instantly chatting with any of your local models.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Llamactl Brings to the Table
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multiple Model Serving&lt;/strong&gt;: Run different models simultaneously — a 7B model for speed, a 70B model for quality, or a vision model for image analysis. Switch between them by simply changing the model name in your API requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Web Dashboard&lt;/strong&gt;: A modern React UI that beats SSH-ing into servers. Create instances, monitor health, view logs, and manage everything from your browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Smart Resource Management&lt;/strong&gt;: Idle timeout automatically stops unused instances to save resources. LRU eviction ensures your most-used models stay available. Configurable instance limits prevent resource exhaustion.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;On-Demand Starting&lt;/strong&gt;: Point your application at a model that isn't running? Llamactl automatically starts it for you. No more "is the server running?" guesswork.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;API Key Authentication&lt;/strong&gt;: Separate keys for management operations vs inference requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;State Persistence&lt;/strong&gt;: Server restarts don't kill your carefully configured instances. Everything comes back exactly as you left it.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My Setup: LLMs Anywhere, Anytime
&lt;/h2&gt;

&lt;p&gt;Here's how I've configured my home LLM infrastructure to work seamlessly from anywhere:&lt;/p&gt;

&lt;p&gt;I run my LLMs on a Mac Mini M4 Pro at home. The 48GB of unified memory gives me enough room to run larger models like Gemma 3 27B or Qwen 3 Coder 32B and switch between them as needed.&lt;/p&gt;

&lt;p&gt;Both my home Mac Mini and a cloud VPS are connected via &lt;a href="https://tailscale.com/" rel="noopener noreferrer"&gt;Tailscale&lt;/a&gt;. This creates a secure, private network that lets them communicate as if they were on the same LAN, regardless of where I am.&lt;/p&gt;

&lt;p&gt;The setup is straightforward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Llamactl runs on the Mac Mini, managing my llama-server instances&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://openwebui.com/" rel="noopener noreferrer"&gt;Open WebUI&lt;/a&gt; also runs locally, providing a ChatGPT-like interface&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://traefik.io/" rel="noopener noreferrer"&gt;Traefik&lt;/a&gt; runs on my VPS as a reverse proxy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Traefik on the VPS proxies requests through the Tailscale network to my home setup, giving me a clean public URL (like &lt;code&gt;llm.mydomain.com&lt;/code&gt;) that securely tunnels to my home lab.&lt;/p&gt;

&lt;p&gt;This setup lets me deploy any model, switch between them, and chat with my LLMs from anywhere with internet access. No VPN client needed, no SSH required, and Tailscale handles the security with zero-trust networking.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;Llamactl is still evolving, and I have several ideas for future improvements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhanced Admin Dashboard&lt;/strong&gt;: While the current web UI covers the essentials, I'd like to add proper user authentication with usernames and passwords, and better management of inference API keys.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multiple Backend Support&lt;/strong&gt;: Right now it's focused on llama-server, but adding support for other inference engines like vLLM or mlx_lm.server could make it even more versatile.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Built-in Chat Interface&lt;/strong&gt;: Open WebUI is fantastic, but having a simple chat UI built directly into llamactl could reduce the setup complexity for basic use cases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Better Resource Scheduling&lt;/strong&gt;: Smart load balancing and automatic model placement based on hardware capabilities.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Get Involved
&lt;/h2&gt;

&lt;p&gt;Llamactl is open source and available on &lt;a href="https://github.com/lordmathis/llamactl" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;. You can find complete documentation and guides at &lt;a href="https://llamactl.org" rel="noopener noreferrer"&gt;llamactl.org&lt;/a&gt;. Whether you're interested in trying it out, reporting bugs, suggesting features, or contributing code, I welcome all feedback and contributions.&lt;/p&gt;

&lt;p&gt;If you're tired of SSH-ing into servers just to switch LLM models, give llamactl a try. It might just be the management layer you didn't know you needed.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>ai</category>
      <category>mlops</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
