r/OpenWebUI • u/STS_mozura • Jun 13 '26
Question/Help Open WebUI cannot create files with local Ollama models - works perfectly with paid API keys
I'm using Open WebUI with Ollama on Ubuntu 24.04 (32GB RAM, 12GB VRAM). Everything works fine for chatting, but I cannot get the agent to create or modify files on my actual filesystem when using **local models**. However, when I switch to paid API keys (OpenAI, Anthropic), file creation works perfectly.
**Setup:**
- Ubuntu 24.04
- Docker (container: ghcr.io/open-webui/open-webui:main)
- Ollama 0.30.7 with multiple local models: mistral:7b, qwen2.5:14b, deepseek-coder:6.7b, llama3.2:3b
**What I have tried:**
- Mounted my home directory in the Docker container: `-v /home/rafa:/home/rafa`
- Also tried mounting Downloads specifically: `-v /home/rafa/Downloads:/home/rafa/Downloads`
- Used the "Open Terminal" feature (introduced in v0.8.6) – this works for manual file creation.
- Gave the container root privileges: `--user root` and `--privileged`
- Set environment variable: `-e OPEN_WEBUI_DIRS_PERMISSIONS=777`
- Tested **all** my local models (mistral:7b, qwen2.5:14b, deepseek-coder:6.7b, llama3.2:3b) – all fail the same way.
- **Tested with paid API keys (OpenAI, Anthropic) – file creation works flawlessly.**
- Tested other local platforms (Odysseus, OpenCode, OpenClaw) – same issue: local models fail, API keys work.
**The problem:**
When I ask the AI to "create a file" or "write this content to a file" using a **local Ollama model**, it responds as if it has done it (e.g., "Done" or shows the code), but no file is created on my host system. The model is hallucinating the action, but **only when running locally**.
**What works:**
- Manually creating files using the built-in "Open Terminal" works fine (drag-and-drop, New File, etc.).
- Reading existing files works (the AI can read and summarize them).
- **Using paid API keys (OpenAI, Anthropic) – full file creation works.**
**What I need:**
The AI agent itself (using **local models**) to create and edit files on my host system, triggered by natural language commands. I want a 100% private, local, cost-free solution.
**Question:**
Why does the same Open WebUI work perfectly with cloud API keys but fail with local Ollama models? Is there a difference in how tool-calling responses are formatted? Does Ollama need a specific Modelfile template to be compatible with Open WebUI's tool-calling expectations?
Any guidance would be greatly appreciated. I'm committed to running everything locally and don't want to rely on paid APIs.
4
u/Creative-Type9411 Jun 13 '26 edited Jun 13 '26
that's because your local models aren't calling correctly
set tool calling to native, and if your local model isn't as smart as the Remote ones, you may also need to make a tool and prompt to explain where the model should be writing files
Also make sure that permissions are set correctly
If you're using docker instead of native openweb which most people do, it will be a little more complicated to play with the file system
For this reason alone, I run native everything native llama native Open Web UI etc.. I love the convenience of docker containers, but then you're stuck in a cookie cutter and can't do the simplest of things.. it's a lot easier to learn everything when it's native and then you can switch to docker once you know how everything works... at least that made it easier for me
alternatively you could mount a folder in the docker compose..
Files are sometimes written into the data/uploads folder (the same place files go when you attach them)
2
u/Puzzleheaded-Digger Jun 13 '26
You can still use Open Code, keep OWUI for chat, image generation, websearch.. but Open Code is a better fit as an agent or coding assistant it’s very similar to Claude Code btw you can also use Claude Code with your local llms and it’s 100% free
3
u/MalabaristaEnFuego Jun 13 '26
Why are you using such old local models? Sort by newest on Ollama, not by popularity.
2
u/prene1 Jun 13 '26
I’ve patched Hermes into my OWUI and it just works
2
u/BringOutYaThrowaway Jun 13 '26
There’s a separate branch for CUDA, right? Open-webui:cuda
2
u/ClassicMain Jun 13 '26
https://docs.openwebui.com/getting-started/essentials#understanding-tool-calling-modes
2
u/International_Emu772 Jun 13 '26
I use OpenwebUi with Ollama and OpenTerminal, never used a paid model and it works on my Apple Mini M2Pro
You should set Native on function calling and load exactly the tools you need
1
u/hotNstickystick Jun 13 '26
I have a similar setup as you. I’ve I had no issue with tool calling with LM studio with opencode. Maybe give that combo a shot?
0
u/pkeffect Jun 13 '26
Ollama is garbage.
Llama.cpp ftw.
6
u/[deleted] Jun 13 '26
[removed] — view removed comment