Home / use case

Coding with a local Qwen 3.8 27B on a self-hosted NVR project: what worked and what didn't

At a glance
Hardware
In his Lemmy post he lists the hardware as a Ryzen 9 5950X, 64 GB DDR4 and two NVIDIA RTX A4000 cards (32 GB VRAM total), with 200k context (q8)
Models & engines
llama.cpp as the backend running Qwen 3.8 27B (UD_Q5_K)
Key gotcha
Don't let the AI tackle big changes autonomously: he found sloppy code is guaranteed and hard to debug, even with AI.

What they built

Willy has worked on and off since around 2017 on his own software to aggregate and view the IP cameras in his house. This year he rewrote it as LazyNVR, a C++17 backend with an AlpineJS frontend, and published it on Codeberg.

Once his local Qwen 3.8 setup was running well, he tried using it to add features to LazyNVR: RTSP video streaming, dark and light themes, a theme toolbar, a rewritten README and blurred screenshots of the UI.

He deliberately used only local AI, not Claude Code or other hosted tools, and kept it walled off from his real repository and his Codeberg credentials.

Setup

  • Open WebUI with OpenTerminal as the AI frontend; OpenTerminal runs containerized with a compiler, git, python, a headless browser and other tools
  • llama.cpp as the backend running Qwen 3.8 27B (UD_Q5_K)
  • In his Lemmy post he lists the hardware as a Ryzen 9 5950X, 64 GB DDR4 and two NVIDIA RTX A4000 cards (32 GB VRAM total), with 200k context (q8)
  • The AI's working repo only has a remote to his private Forgejo instance; pushes to Codeberg happen manually from his own environment

How it works

  1. He asks the AI to do work in its sandboxed repo, then reviews the changes himself with git diff and his editors (QtCreator and kate). The AI is never allowed to commit, push or pull.
  2. Because the model is local, he could read its entire train of thought while it analyzed the codebase, searched the web and planned.
  3. For the frontend he switched to very small, specific requests such as adding dark and light themes without altering code structure, testing each step on his real home instance.

Results & numbers

  • The first open-ended request to add RTSP support took about half a day and produced code that sort of worked but was overengineered, broke things in Firefox and Chrome, and couldn't be debugged; he gave up on that approach after about a week.
  • Asking for suggestions instead led him to go2rtc; he wrote the backend changes himself, and the AI helped find obscure bugs in his process-execution utility class and explained go2rtc's API.
  • With step-by-step instructions, frontend work he estimates would have taken weeks took a few days, and he says the AI never wrote broken code in those tasks.
  • It also rewrote the README from the Makefile, command-line options and old wiki pages, and took and blurred UI screenshots in minutes.
  • He estimates the electricity cost at no more than about 10 kWh, roughly 2.5 euros, with the rig drawing about 250 W under inference.

Gotchas

  • Don't let the AI tackle big changes autonomously: he found sloppy code is guaranteed and hard to debug, even with AI.
  • The AI hallucinated a typo in go2rtc URLs once; he thinks asking it to search the web instead of answering from memory would have helped.
  • Debugging went poorly partly because he didn't give the AI a working camera URL or access to the dev environment, so it kept trying to rig up fake RTSP servers.
  • Delegating what you don't understand is risky; he uses the AI to learn faster and keeps full control.
“Lesson learned: do not let AI tackle big changes autonomously. Sloppy code is guaranteed, and you cannot sanely debug that, not even with AI.”— Willy (Shimitar)

Do it yourself

  1. Run llama.cpp with a coding-capable local model and put Open WebUI in front of it.
  2. Add a containerized terminal tool (he uses OpenTerminal) so the model can compile, use git and browse headlessly.
  3. Give the AI a separate clone of your repo whose only remote is a private Git server, and keep your public-forge credentials out of it.
  4. Ask for small, precise changes, review each with git diff, test on your real setup, then commit yourself.
  5. Use it for the parts you dislike (for him JS, CSS and docs) and for research, and write the core code yourself.
Source: Willy's Wiki · Published 2026-11-03 · Added 2026-11-10. This write-up summarizes the original source; see it for full details.

Similar setups

Home RAG assistant for embedded-systems docs on Proxmox

Ollama, llama.cpp, Open WebUI, BGE-M3 and SearXNG in a GPU-passthrough VM. Moving from 6 GB to 16 GB of VRAM changed which models could run.

Ground Bounce · 2026-10-18

Tencent's DSpine drafter on a 3090: faster single-agent Qwen 27B in llama.cpp, slower when busy

Timothy Lewis rounded up llama.cpp numbers for Tencent's 2B DSpine speculative drafter in front of a local Qwen3.8-27B and explains when it helps and when it doesn't.

Timothy Lewis on X · 2026-11-12

OzAI: a self-hosted ChatGPT on a 16 GB MacBook with Ollama, LiteLLM and Open WebUI, and what broke

A DevOps engineer served Qwen3 8B and Qwen2.5-Coder 3B from one M1 Pro laptop as a small private platform with per-user keys, rate limits, local web search and IDE chat, and documented seven silent failures.

Ahmet Ozan GAZİ (DEV Community) · 2026-11-03

A €200 mini PC as an offline AI box: a week with Gemma and Qwen

Diogo Soares ran Gemma 4 E4B and Qwen2.5-Coder 7B on a cheap NiPoGi P1 mini PC firewalled off the internet, used it from his Mac for a week, and measured what was fast and what wasn't.

Diogo Soares (DEV Community) · 2026-10-30