Open WebUI running as a Docker container on TrueNAS, connected to a remote Ollama instance.
TrueNAS (Docker) Gaming PC / Remote Host
┌──────────────────────────┐ ┌─────────────────────┐
│ Traefik → Open WebUI │──▶│ Ollama :11434 │
│ :8080 (internal) │ │ (OLLAMA_BASE_URL) │
└──────────────────────────┘ └─────────────────────┘
▲
https://${OPENWEBUI_DOMAIN}
Create the data directory before deploying:
mkdir -p /mnt/SSD/Containers/openwebuicp example.env .env
# Edit .env — set OLLAMA_BASE_URL and OPENWEBUI_DOMAIN
docker compose up -dThen open https://<OPENWEBUI_DOMAIN>. DNS must resolve the domain to Traefik (10.0.5.5) before the UI is reachable.
| Variable | Description | Example |
|---|---|---|
OLLAMA_BASE_URL |
URL of the remote Ollama instance | http://<ollama-host>:11434 |
OPENWEBUI_DOMAIN |
Hostname Traefik routes to the UI | openwebui.yourdomain.com |
The Ollama instance must be reachable from the TrueNAS host over the network.
By default Ollama only binds to 127.0.0.1. Set OLLAMA_HOST to make it accept remote connections:
Windows — system environment variable (persistent):
[System.Environment]::SetEnvironmentVariable("OLLAMA_HOST", "0.0.0.0", "Machine")
# Restart the Ollama service/app after setting thisWindows — per-session (temporary):
$env:OLLAMA_HOST = "0.0.0.0"
ollama serveLinux/macOS:
OLLAMA_HOST=0.0.0.0 ollama serveWindows Defender (PowerShell, run as Administrator):
New-NetFirewallRule -DisplayName "Ollama" -Direction Inbound -Protocol TCP -LocalPort 11434 -Action AllowFrom the TrueNAS host:
curl http://<ollama-host>:11434/api/tagsA JSON response listing available models confirms the connection is working.
You can update the Ollama connection without restarting the container via the UI:
Settings > Admin Settings > Connections > Ollama API
Changes take effect immediately.