How I Set Up Ollama on Unraid (And What I Learned the Hard Way)
Running a local LLM sounds simple until you actually try it. Install Ollama, pull a model, start chatting – that’s the pitch. The reality involves GPU passthrough that almost worked, a model that ate all my RAM, and a late-night session trying to figure out why the container kept crashing. I’ve done that part so you have a head start.
Here’s how I actually got Ollama running on Unraid, including the mistakes I made along the way.
Why Bother Running Local LLMs at All
The honest answer is privacy and cost. I use AI tools constantly for work – writing, coding, summarizing. Most of that work is fine to send to a cloud API. But some of it isn’t. Client documents, medical information, anything I don’t want stored on someone else’s servers. A local model solves that without relying on a VPN policy I can’t fully verify.
There’s also the cost angle. Once your server is already running 24/7, the marginal cost of adding Ollama is basically zero. At heavy API usage rates, local inference pays for itself in GPU cost within six months.
The Hardware Reality Check
Ollama runs on CPU, but it runs well on GPU. The difference is dramatic – a 7B parameter model might take 30 seconds per response on CPU and under 2 seconds with a decent GPU. If you’re doing anything interactive, you need GPU acceleration.
I’m running an NVIDIA RTX 3060 with 12GB VRAM. That’s enough for most 7B and 13B parameter models at full precision, and 70B models at 4-bit quantization. The 12GB VRAM limit is real – if the model doesn’t fit, Ollama falls back to CPU for the overflow layers and performance tanks.
If you don’t have a discrete GPU, you can still run Ollama on CPU with enough RAM. 32GB gets you to 13B models comfortably. 64GB opens up 34B models. It’s slow but it works for non-interactive tasks like batch summarization.
Installing Ollama on Unraid
There are two good paths: the Community Applications plugin (search for “Ollama”) or a manual Docker template. I went manual because I wanted more control over GPU assignment.
The Docker template basics:
- Image:
ollama/ollama:latest - Port: 11434 (both host and container)
- Volume:
/mnt/user/appdata/ollama:/root/.ollama - Runtime:
nvidia(for GPU passthrough)
That last line is where people get stuck.
GPU Passthrough: The Part Nobody Explains Well
For NVIDIA GPU passthrough in Unraid Docker containers, you need the NVIDIA driver plugin installed from Community Applications. It’s listed as “Nvidia-Driver” and it adds the necessary runtime support.
After installing the plugin, go to your Docker container settings and look for the “Extra Parameters” field. Add --runtime=nvidia. Then add two environment variables: NVIDIA_VISIBLE_DEVICES=all and NVIDIA_DRIVER_CAPABILITIES=all.
The thing that caught me: if your GPU is also assigned to a VM (I use mine for a Windows gaming VM), you can’t pass it to Docker and a VM at the same time. You have to pick one. I now stop the Windows VM when I want to use Ollama heavily, and stop the Ollama container when gaming. It’s not elegant, but it works for my usage pattern.
Setting Up Open WebUI
Ollama’s API is great, but you probably want a chat interface. Open WebUI is the best one I’ve found. It connects to Ollama, supports multiple models, has conversation history, and can do image analysis with vision models.
Deploy it as a second Docker container. The key config is setting the Ollama API URL to your server’s IP, not localhost – something like http://192.168.1.x:11434. If you use localhost it’ll try to connect from inside the container and fail.
Which Models Are Actually Worth Running
After testing most of the popular options, here’s what I actually use:
Llama 3.1 8B – My daily driver. Fast, capable, fits in 8GB VRAM comfortably. Good for writing assistance, code review, quick Q&A. Pull it with ollama pull llama3.1:8b.
Llama 3.1 70B Q4 – The heavy one. Takes about 40GB RAM/VRAM to run. I offload most layers to RAM and use the GPU for inference. Slower but noticeably smarter for complex tasks. Worth having for anything where quality matters.
Mistral 7B – Smaller than Llama 3.1 8B but surprisingly capable. I use it when I need something fast on CPU-only.
Nomic Embed Text – Not a chat model – an embedding model. Essential if you want to build a local RAG (retrieval augmented generation) setup. Small and fast.
The Mistakes I Made
I pulled too many models at once. Each model is 4-8GB. My appdata drive ran out of space and the container kept crashing with cryptic errors. Check your free space before pulling models, and set a dedicated path on a drive with room to grow.
I tried to run Ollama and Plex at the same time during a 4K transcode. The GPU can’t serve two masters. The transcode stuttered and the Ollama response was 3x slower. If you’re sharing a GPU between media and AI, set your Plex hardware transcoding to “when available” and accept the tradeoff.
I also didn’t set a context length limit early on. Some models default to huge context windows that eat RAM even when you don’t need them. In your Open WebUI model settings, set a max context of 4096 unless you specifically need more.
Is It Worth It
For me, yes. The ability to run a capable LLM privately, on hardware I own, without a per-token cost is useful. The setup friction is real but it’s a one-time cost. Once it’s running it just works.
If you don’t have a server already running, the calculus is different. A cloud API is cheaper than buying hardware you’ll only use for LLMs. But if you’ve already got an Unraid box, Ollama is one of the best things you can add to it.
Next up: my full home network setup – VLANs, local DNS, and the one machine that does too much.
Products mentioned in this post:
Affiliate disclosure: Some links in this post are Amazon affiliate links. If you buy through them, I get a small commission at no cost to you. It helps keep the lights on here.