Local LLMs with help from the cloud: IaC and monitoring in my HomeLab
I'm testing local LLMs in my HomeLab. Gemma 4 and North Mini Code on an RTX 5080 generate Terraform and Ansible code and help diagnose problems, while Claude helps with the harder tasks. The whole lab in code, monitoring in Grafana.
Local AI, the change path and monitoring in the lab
No secret here. AI helps me write Terraform and Ansible code and pipelines in Azure DevOps or GitHub Actions. It makes the work faster and easier. Before, you copied templates from the documentation or Stack Exchange anyway, then adapted them by trial and error.
Now local LLMs are on test in my HomeLab. They generate code, help diagnose problems and do most of the work. Claude supports them with some of the tasks. Everything described here applies only to my HomeLab.
The diagram at the top shows the whole picture. Below, the pieces follow one by one, from the reasons and the hardware to monitoring, IaC and plans.
Updated on 20 November 2026. The first version of this article used Qwen models. All of them are now replaced with models from outside China, and the reason is in the security section. The plans now also name two small models for voice control in AR and VR.
Updated on 25 November 2026. Bielik now handles optional Polish commands.
Why I run a HomeLab
Self-taught, I reached DevOps from IT support through system administration. The HomeLab is my place to learn and experiment. Hybrid cloud, security hardening, high availability, automation with AI. These are the directions I’m growing in, and the lab is where I try them out. Local LLMs are another experiment of that kind.
How I work with AI on code
Everything is managed from VS Code. I describe the change, the model generates the code, then I check the result and fix it together with the model. That is how the Terraform and Ansible code gets written, and the pipelines too.
How code was written before and how it is written now
Before
- Templatefrom the documentation or Stack Exchange
- Copyand adapt it
- Trial and erroruntil it works
- Working code
Now
- Describe the changein VS Code
- The model generatesthe first version
- Reviewand fix
- Working code
The model deploys nothing on its own. Code reaches the repository through a pull request, and lab deployments run in a pipeline on home machines with an Azure DevOps agent.
Security, or why local
Local models are simply safer. A cloud AI assistant gets the whole context along with the question. Code snippets, Grafana query results, logs, alerts. And inside them, host names, addressing and the layout of the whole environment.
A local model processes all of this on my own hardware, so the data never leaves the lab. For this part of the work there is also no dependence on how a provider stores data, on API limits or on service outages.
Local does not automatically mean secure, though. The model endpoint needs the same protection as any other service in the lab, and weights should come only from official repositories. Code from a model, local or cloud, still gets my review before the merge.
Where a model comes from matters too. In October, security tests by Cohere and Palisade Research caught Qwen 3.8 models trying to reach Alibaba Cloud servers while they worked as agents. Palisade found no sign of deliberate data theft, and the cause is still unclear. In a lab where models get tools and a terminal, that question mark is enough for me. The whole set now comes from outside China.
Hardware and limits
The hardware is a Ryzen 9 5950X, 64 GB of RAM, an RTX 5080, 10 TB of SSD and 5 TB of NVMe. The graphics card matters most. The RTX 5080 has 16 GB of VRAM, and that decides what runs fast.
Mellum 4B fits in VRAM without trouble, so it handles autocomplete. Gemma 4 26B-A4B in the 4-bit version from Google is about 14.4 GB of weights alone. It fits on the card, but there is little room left for context.
What fits in the 16 GB of VRAM on an RTX 5080
- Mellum 4Blight model4.3 GB
- Bielik 11Boptional PL commands, two languages EN / PL6.7 GB
- Gemma 4 26B-A4Bmain model, MoE, 4B active14.4 GBlittle room for context
- North Mini Code 1.0second candidate, MoE, 3B active18.7 GBpartly in RAM
- Whisper large-v3-turboplanned, speech to text1.6 GB
- Granite 4.2 8Bplanned, voice commands5.3 GB
North Mini Code 1.0 from Cohere is on test too, built for code, agents and the terminal. It’s an MoE model, so it has 30B parameters, but only about 3B of them work on each token. It copes better with running partly from RAM, and 64 GB leaves room for that.
This is an honest downside of local models. On a single 16 GB card, the choice is between model size, context length and speed. The cloud doesn’t have this problem, which is why some tasks stay with Claude.
The set I'm testing
Two models do most of the work, each for a different job. Next to them, an optional model for Polish commands and two databases that act as memory for the models.
- Main model. Gemma 4 26B-A4B from Google, with North Mini Code 1.0 from Cohere as the second candidate. It generates code and helps diagnose problems, and I’m also testing it for analysis in Grafana.
- Light model. Mellum 4B from JetBrains. Inline autocomplete has to be fast, hence a separate, light model built for code completion.
- Model for Polish commands. Bielik 11B from SpeakLeash and Cyfronet. I manage the lab in two languages, EN / PL. Polish is optional, and the Polish commands go to Bielik.
- Qdrant. A vector database. This is where the models look for context.
- Neo4j. Memory of topology and dependencies, in other words what connects to what.
All of these models have open weights and the Apache 2.0 licence, and none of them comes from China. Testing will show which one stays as the main model.
Splitting the work between local models and Claude
Local models do most of the work. The light one suggests code inline while I type. The main one writes first versions of Terraform and Ansible code, fixes pipelines and helps diagnose problems. It reads logs and error messages and suggests where to look for the cause.
Claude Opus and GPT Sol get the tasks where I prefer the strongest models, both on max effort. Architecture reviews, larger changes across many files, a second opinion before a more important merge. They get a specific task, not the whole lab context.
Monitoring and diagnosis in Grafana
The lab is a few virtual machines on VMware Workstation Pro. The Grafana stack monitors these machines and the availability of my websites. Prometheus for metrics, VictoriaLogs for logs, Alloy collects the data.
Grafana has an AI assistant that currently uses Claude or GPT. Right now I’m testing how the local main model takes over that analysis. Logs and metrics then stay in the lab.
When something breaks, the model gets the logs and errors and then suggests where to look for the cause. The decision stays with me, and the fix goes the normal way, through the repository and the pipeline. There is more about Grafana itself in Grafana beyond CPU charts.
Everything in the lab is code
IaC, infrastructure as code, is what I use for everything. The lab, the website, the articles. This article is also a file in a repository.
Easy deployments, full control, and I learn the code along the way. The code itself is documentation too, even for AI models, and that keeps the work moving smoothly.
Code in the repositories and who uses it
Repositories
Azure DevOps Services, copied to GitHub by a pipeline
- Website and articles
- Astro · Markdown
- Infrastructure
- Terraform
- Configuration
- Ansible
- Deployments
- pipelines
- MeFull control over every change
- PipelineEasy deployment straight from code
- AI modelThe code is its documentation
Repositories and pipelines live in Azure DevOps Services. The lab pipelines run on home machines with a self-hosted Azure DevOps agent. A separate pipeline pushes a copy of the repositories to GitHub twice a day, so the copy updates itself. This website builds on Microsoft-hosted agents and goes to Cloudflare, and its change path is described in the website project.
What comes next
Testing continues. I’m checking which model stays as the main one and how the local model handles analysis in Grafana. The results will get their own write-up once the setup has run for longer.
The next step is a VR and AR headset, meaning managing the lab by voice and in augmented reality. This project is still a plan, and two small models will join the set for it. Whisper large-v3-turbo from OpenAI will turn speech into text locally, and Granite 4.2 8B from IBM will turn that text into a specific command for the lab. Together they need about 7 GB, a little under half of the card. Both come from outside China, Whisper under the MIT licence and Granite under Apache 2.0. Commands will be in English, or optionally in Polish. Granite doesn’t list Polish among its languages, so Bielik will first translate Polish commands into English.
In the plan, I speak a command, the local model prepares a change from it, and the Grafana state shows up in a Meta Quest 3. Every command appears in the headset first and runs only after I confirm it, and changes still go through a pull request and the pipeline.