Guardrails for letting local Qwen models reorganize terabytes of files
- Models & engines
- Ollama on a GPU box, with OLLAMA_HOST bound to the local network only
Agent in a separate VM (microsandbox or a Proxmox VM locally), reaching Ollama over WireGuard when remote
A bigger Qwen model as planner and a small one as worker, on the same Ollama instance - Key gotcha
- Ollama's API has no auth by default, so never expose it as an open port on the internet
What they built
u/Sussybaka800869 lets local models touch their files every day: Qwen models on Ollama sort media, clean up repos and reorganize a few terabytes of files. They say nothing important has been deleted, not because the models are careful but because they are not allowed to.
Tired of threads where a model wiped someone's drive and nobody showed what guardrails look like, they shared their setup: Ollama on a GPU box, the agent in a separate VM that only talks to the Ollama API, and a harness where destructive work is always planned as a manifest that a human reads and a script applies.
Setup
- Ollama on a GPU box, with OLLAMA_HOST bound to the local network only
- Agent in a separate VM (microsandbox or a Proxmox VM locally), reaching Ollama over WireGuard when remote
- A bigger Qwen model as planner and a small one as worker, on the same Ollama instance
How it works
- The harness exposes no rm; a trash command moves files into a _trash folder and logs where they came from, and one script restores them
- Anything destructive starts with a manifest: a JSON schema passed in the request's format field forces the model to return a list of path, size and reason
- The author reads the manifest, then a plain script applies it, in dry run unless told to apply; the model never executes its own plan
- The source folder is mounted read-only and the agent writes results elsewhere
- The VM has a fixed disk and memory limits, so a runaway job breaks the VM instead of the host
Results & numbers
- About a year of daily use sorting media, cleaning repos and reorganizing a few terabytes, with nothing important deleted
- The small worker model is fast enough that the whole job barely costs anything
Gotchas
- Ollama's API has no auth by default, so never expose it as an open port on the internet
- Mounting your real folder read-write into a container protects nothing
- Agents act like disk is infinite; a runaway build or nix store can eat hundreds of gigabytes
- Every model, abliterated or stock, small or huge, misreads a request sometimes
“The model is not the safety layer. The workflow is.”— u/Sussybaka800869
Do it yourself
- Run Ollama on your GPU machine and bind it to your LAN only (use WireGuard for remote access)
- Put the agent in its own VM with a fixed disk size and memory limit
- Remove delete from the agent's tools and give it a logged trash command plus a restore script
- Make destructive jobs return a JSON manifest (path, size, reason) using Ollama's format field
- Review the manifest, then apply it with a plain script, dry run first
- Mount source data read-only and have the agent write to a separate location
- Use a larger model to plan and a small one for the routine moves
Similar setups
A local Ollama firewall analyst for a MikroTik router
A home-network tinkerer feeds pre-filtered firewall and DNS anomalies to a small model on an 8 GB RTX 3060 Ti, which returns allow, suspicious or block verdicts with evidence while the router keeps doing the real filtering.
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.
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.
Local code review bots on one RTX 3090 with Ollama, LiteLLM and Gitea
TechLuddite runs local 4-bit models as advisory code reviewers on pull requests in a home lab, and measured which of ten models found real problems.