Author demonstrates how a self-hosted stack using Qwen3-Coder-Next, llama.cpp, and Tailscale offers a viable, cost-controlled alternative to cloud-based coding agents. By Brad Westness.
Brad Westness has deployed a private coding agent on a Bazzite desktop, leveraging Qwen3-Coder-Next, llama.cpp, Podman, Open WebUI, and Tailscale. This setup addresses a growing friction point in developer workflows: the recurring cost and privacy concerns of cloud-hosted large language models (LLMs). By running inference locally, Westness eliminates per-token billing and ensures that source code and private documents remain within the local network. The project highlights a shift where open-weight models are becoming sufficiently capable for routine coding tasks, reserving frontier models for complex, high-stakes engineering.
The technical implementation relies on specific optimizations to fit the model onto consumer-grade hardware. Westness uses an NVIDIA GeForce RTX 4060 Ti with 16 GB of VRAM, employing llama.cpp’s --n-cpu-moe 44 flag to offload Mixture-of-Experts (MoE) weights to system RAM. This compromise allows the larger model to run alongside its context cache, while --split-mode layer prepares the configuration for future multi-GPU scaling. The stack is containerized via Podman Quadlets for reproducibility and isolated through Tailscale, which provides secure, private network access from remote work machines without exposing the service to the public internet. FlashAttention (-fa on) and batch size tuning (-b 2048) further optimize memory traffic and prompt ingestion speed.
This experiment underscores a broader economic argument: while frontier models dominate in capability, local inference democratizes access to agentic tools. Small teams, schools, and individual developers can avoid unpredictable API bills and vendor lock-in. The model’s aliasing feature (--alias qwen-coder) allows for backend updates without disrupting client configurations, adding operational stability. As hardware costs drop and model efficiency improves, the barrier to entry for private AI infrastructure continues to lower. Nice one!