2026 AI / Infrastructure / Security GitHub ↗

Overview

TYF-AI removes cloud AI dependency entirely by serving quantized GGUF models on local hardware while treating the inference engine as an untrusted workload. Open WebUI sits behind a Caddy reverse proxy that enforces authentication and API-key rotation, and each model process runs inside a Firejail sandbox to contain a compromised runtime. The result is a private assistant that served 50+ concurrent queries at sub-2-second latency without a single external API call.

System Architecture

Threat Model: Local vs Cloud AI (STRIDE)

STRIDECloud AITYF-AI (Local)
SpoofingProvider account takeoverCaddy auth + rotating API keys
TamperingOpaque model updatesPinned GGUF checksums
Information DisclosurePrompts leave your networkData never leaves the host
Denial of ServiceVendor rate limitsLocal rate limiting in Caddy
Elevation of PrivilegeN/AFirejail confines model process

Deployment

1

GPU passthrough on Proxmox

Bind the GPU to vfio-pci so the AI VM owns it exclusively, enabling CUDA-accelerated inference.

echo "vfio-pci ids=10de:2231" > /etc/modprobe.d/vfio.conf && update-initramfs -u
2

Run the sandboxed inference server

firejail --net=none --private ./llama-server -m models/model-q4_K_M.gguf --n-gpu-layers 35 --port 8080
3

Authenticated reverse proxy (Caddyfile)

ai.tyfsadik.org { reverse_proxy localhost:3000; rate_limit { zone ai { events 60 window 1m } } }

Security Hardening

  • Prompt injection: system-prompt isolation and output filtering on tool-use responses.
  • Model integrity: SHA-256 pinning of GGUF files to detect the "Mind the Gap" GGUF tampering class.
  • Data leakage: --net=none denies the model process outbound network access.
  • Key management: rotating API keys issued per client, revocable at the proxy.

Key Results

  • Served 50+ concurrent queries at under 2 seconds latency on local hardware.
  • Reduced external AI API dependency by 100% for internal tooling.
  • Isolated model execution, preventing a compromised runtime from reaching the host or network.
  • Maintained 99.9% uptime alongside other self-hosted services on the same node.
llama.cppGGUFOpen WebUICaddyFirejailProxmoxGPU PassthroughSecurity