English · Deutsch
Plais – private local AI stack: Ollama (ROCm) + Open WebUI + SearXNG, fully Dockerized. Model inference and chat history stay on your machine – no cloud LLM, no API keys.
Model downloads and web search still need internet access. Only inference and your data stay local.
| Service | Image | Local address | Role |
|---|---|---|---|
ollama |
ollama/ollama:0.40.18-rocm |
127.0.0.1:11434 |
Local inference (AMD ROCm) |
open-webui |
ghcr.io/open-webui/open-webui:main |
127.0.0.1:3000 |
Chat UI, RAG, model management |
searxng |
searxng/searxng:latest |
127.0.0.1:8080 |
Self-hosted metasearch for web search |
All ports are published on loopback only.
- Linux with Docker Engine and Docker Compose v2
- AMD GPU supported by ROCm – tested with a Radeon RX 9060 XT 16 GB
(
gfx1200) on Fedora 44, Ollama 0.40.18 / ROCm 7.2 - ~16 GB VRAM for 14B–20B models; CPU-only works if you remove the
devices/group_addentries, but is slow - Disk space for models (kept in
./models)
NVIDIA GPUs are not covered by this setup. Use the regular ollama/ollama
image with the NVIDIA Container Toolkit and remove the ROCm device entries.
git clone https://github.com/JeromeTDev/local-ai.git
cd local-ai
cp .env.example .env
sed -i "s/change-me/$(openssl rand -hex 32)/" .env
mkdir -p models open-webui
docker compose up -dOpen http://localhost:3000 and register the first account – it becomes the admin.
Pull models:
docker compose exec ollama ollama pull qwen3:14b
docker compose exec ollama ollama pull nomic-embed-textThen in Open WebUI:
- Admin → Settings → Connections → Ollama:
http://ollama:11434(preconfigured viaOLLAMA_BASE_URL; the value is stored in the database on first start and wins afterwards). - Admin → Settings → Web Search: engine
searxng, URLhttp://searxng:8080/search?q=<query>. - Documents → Embedding:
nomic-embed-textfor RAG.
Settings live in docker-compose.yml:
| Variable | Default | Purpose |
|---|---|---|
OLLAMA_CONTEXT_LENGTH |
16384 |
Context window |
OLLAMA_NUM_PARALLEL |
1 |
Parallel requests (VRAM usage) |
OLLAMA_KEEP_ALIVE |
30m |
Keep the model loaded |
OLLAMA_HOST |
0.0.0.0:11434 |
Listen address inside the container |
OLLAMA_BASE_URL |
http://ollama:11434 |
Ollama URL for Open WebUI |
SEARXNG_SECRET |
from .env |
SearXNG session secret |
The ollama service has no restart policy by default. Add
restart: unless-stopped if the stack should come back after a reboot.
| Model | Size | Use |
|---|---|---|
qwen3:8b |
~5 GB | quick smoke test |
qwen3:14b |
~9 GB | best all-rounder |
gpt-oss:20b |
~12 GB | reasoning |
nomic-embed-text |
~0.3 GB | embeddings for RAG |
dolphin3:8b |
~5 GB | uncensored, weaker tool calling |
The compose file passes through /dev/kfd and /dev/dri and adds the host's
video/render GIDs. The defaults (39/105) match Fedora; check yours with:
getent group video renderSet VIDEO_GID and RENDER_GID in .env if they differ.
Verify GPU offload:
docker compose logs ollama | grep 'inference compute'
# library=ROCm compute=gfx1200 ... total="15.9 GiB"
docker compose exec ollama ollama ps
# PROCESSOR should read 100% GPUHSA_OVERRIDE_GFX_VERSION is not needed for gfx1200 with ROCm 7.2. Only
set it if your GPU is not detected, e.g. HSA_OVERRIDE_GFX_VERSION=12.0.0.
The Ollama image is pinned. To update, change the tag in
docker-compose.yml and run docker compose pull ollama.
Bind mounts keep all state in the project directory:
| Path | Contents |
|---|---|
models/ |
Ollama models (blobs + manifests) |
open-webui/ |
webui.db (chats, users, settings), uploads, vector DB, cache |
.env |
SearXNG secret and optional GPU GIDs |
models/, open-webui/ and .env are git-ignored. Back up the chat database
with the container stopped:
docker compose stop open-webui
tar czf ~/open-webui-$(date +%F).tgz \
-C . --exclude=open-webui/cache open-webui
docker compose start open-webuiThe containers run as root, so files created in the bind mounts are owned by
root on the host. Fix with sudo chown -R "$USER:$USER" models open-webui
if needed.
- All services bind to
127.0.0.1; nothing is exposed to the LAN by default. - Open WebUI authentication is enabled; the first registered user is admin.
- Keep
.envprivate; it is git-ignored. - For remote access, use a reverse proxy with TLS or a private overlay network such as Tailscale. Do not expose the ports directly.
GPU is not used
docker compose logs ollama | grep 'inference compute'Expected: library=ROCm compute=gfx1200 ... total="15.9 GiB". If the GPU is
missing, check that /dev/kfd and /dev/dri are passed through and that
VIDEO_GID/RENDER_GID match getent group video render.
Open WebUI cannot reach Ollama
docker exec open-webui curl -s http://ollama:11434/api/tagsBoth containers must be in the same Compose network (docker compose ps).
OLLAMA_BASE_URL only applies on the first start; afterwards the URL stored in
the database wins (Admin → Settings → Connections → Ollama). The same
applies to the embedding URL under Documents (rag.ollama.base_url).
SearXNG returns no JSON
search.formats in searxng/settings.yml must contain
json. After changing it, run docker compose restart searxng.
Port already in use
A native Ollama or another service may be listening on 11434, 3000 or
8080:
ss -tlnp | grep -E '11434|3000|8080'Stop the conflicting service or change the host port mapping.
Permission errors on models/ or open-webui/
See Data & backups – the containers write as root.
docker compose pull
docker compose up -dopen-webui:main is a rolling tag. Pin a version tag for reproducible
deployments.
MIT – see LICENSE.
Plais – privater Local-AI-Stack: Ollama (ROCm) + Open WebUI + SearXNG, vollständig dockerisiert. Modell-Inferenz und Chatverlauf bleiben auf deinem Rechner – keine Cloud-LLMs, keine API-Keys.
Modell-Downloads und Websuche benötigen weiterhin Internetzugang. Nur Inferenz und deine Daten bleiben lokal.
| Dienst | Image | Lokale Adresse | Aufgabe |
|---|---|---|---|
ollama |
ollama/ollama:0.40.18-rocm |
127.0.0.1:11434 |
Lokale Inferenz (AMD ROCm) |
open-webui |
ghcr.io/open-webui/open-webui:main |
127.0.0.1:3000 |
Chat-UI, RAG, Modellverwaltung |
searxng |
searxng/searxng:latest |
127.0.0.1:8080 |
Selbst gehostete Metasuche für die Websuche |
Alle Ports sind ausschließlich an Loopback gebunden.
- Linux mit Docker Engine und Docker Compose v2
- Von ROCm unterstützte AMD-GPU – getestet mit einer Radeon RX 9060 XT
16 GB (
gfx1200) auf Fedora 44, Ollama 0.40.18 / ROCm 7.2 - ~16 GB VRAM für 14B–20B-Modelle; CPU-only funktioniert, wenn die
devices/group_add-Einträge entfernt werden, ist aber langsam - Speicherplatz für Modelle (liegen in
./models)
NVIDIA-GPUs werden von diesem Setup nicht abgedeckt. Dafür das reguläre
ollama/ollama-Image mit dem NVIDIA Container Toolkit verwenden und die
ROCm-Device-Einträge entfernen.
git clone https://github.com/JeromeTDev/local-ai.git
cd local-ai
cp .env.example .env
sed -i "s/change-me/$(openssl rand -hex 32)/" .env
mkdir -p models open-webui
docker compose up -dhttp://localhost:3000 öffnen und den ersten Account registrieren – er wird Admin.
Modelle laden:
docker compose exec ollama ollama pull qwen3:14b
docker compose exec ollama ollama pull nomic-embed-textDanach in Open WebUI:
- Admin → Einstellungen → Verbindungen → Ollama:
http://ollama:11434(überOLLAMA_BASE_URLvorkonfiguriert; der Wert wird beim ersten Start in der Datenbank gespeichert und gilt danach). - Admin → Einstellungen → Websuche: Engine
searxng, URLhttp://searxng:8080/search?q=<query>. - Dokumente → Embedding:
nomic-embed-textfür RAG.
Die Einstellungen stehen in docker-compose.yml:
| Variable | Default | Zweck |
|---|---|---|
OLLAMA_CONTEXT_LENGTH |
16384 |
Kontextfenster |
OLLAMA_NUM_PARALLEL |
1 |
Parallele Anfragen (VRAM-Bedarf) |
OLLAMA_KEEP_ALIVE |
30m |
Modell geladen halten |
OLLAMA_HOST |
0.0.0.0:11434 |
Listen-Adresse im Container |
OLLAMA_BASE_URL |
http://ollama:11434 |
Ollama-URL für Open WebUI |
SEARXNG_SECRET |
aus .env |
Session-Secret für SearXNG |
Der Dienst ollama hat standardmäßig keine Restart-Policy. Ergänze
restart: unless-stopped, wenn der Stack nach einem Reboot automatisch
starten soll.
| Modell | Größe | Zweck |
|---|---|---|
qwen3:8b |
~5 GB | schneller Smoke-Test |
qwen3:14b |
~9 GB | bester Allrounder |
gpt-oss:20b |
~12 GB | Reasoning |
nomic-embed-text |
~0,3 GB | Embeddings für RAG |
dolphin3:8b |
~5 GB | unzensiert, schwächeres Tool-Calling |
Die Compose-Datei reicht /dev/kfd und /dev/dri durch und ergänzt die
Host-GIDs für video/render. Die Defaults (39/105) passen zu Fedora;
eigene GIDs prüfen mit:
getent group video renderFalls sie abweichen, VIDEO_GID und RENDER_GID in .env setzen.
GPU-Offload prüfen:
docker compose logs ollama | grep 'inference compute'
# library=ROCm compute=gfx1200 ... total="15.9 GiB"
docker compose exec ollama ollama ps
# PROCESSOR sollte 100% GPU zeigenHSA_OVERRIDE_GFX_VERSION ist für gfx1200 mit ROCm 7.2 nicht nötig. Nur
setzen, wenn die GPU nicht erkannt wird, z. B. HSA_OVERRIDE_GFX_VERSION=12.0.0.
Das Ollama-Image ist gepinnt. Zum Aktualisieren den Tag in
docker-compose.yml ändern und
docker compose pull ollama ausführen.
Bind-Mounts halten den gesamten Zustand im Projektverzeichnis:
| Pfad | Inhalt |
|---|---|
models/ |
Ollama-Modelle (Blobs + Manifeste) |
open-webui/ |
webui.db (Chats, User, Einstellungen), Uploads, Vector-DB, Cache |
.env |
SearXNG-Secret und optionale GPU-GIDs |
models/, open-webui/ und .env sind git-ignoriert. Chat-Datenbank bei
gestopptem Container sichern:
docker compose stop open-webui
tar czf ~/open-webui-$(date +%F).tgz \
-C . --exclude=open-webui/cache open-webui
docker compose start open-webuiDie Container laufen als root, daher gehören neu geschriebene Dateien in den
Bind-Mounts auf dem Host root. Falls nötig:
sudo chown -R "$USER:$USER" models open-webui.
- Alle Dienste binden an
127.0.0.1; standardmäßig ist nichts im LAN erreichbar. - Open WebUI ist mit Authentifizierung aktiviert; der erste registrierte Benutzer wird Admin.
.envprivat halten; die Datei ist git-ignoriert.- Für Fernzugriff einen Reverse Proxy mit TLS oder ein privates Overlay-Netz wie Tailscale verwenden. Die Ports nicht direkt exponieren.
GPU wird nicht genutzt
docker compose logs ollama | grep 'inference compute'Erwartet: library=ROCm compute=gfx1200 ... total="15.9 GiB". Fehlt die GPU,
prüfen ob /dev/kfd und /dev/dri durchgereicht werden und ob
VIDEO_GID/RENDER_GID zu getent group video render passen.
Open WebUI erreicht Ollama nicht
docker exec open-webui curl -s http://ollama:11434/api/tagsBeide Container müssen im selben Compose-Netz laufen (docker compose ps).
OLLAMA_BASE_URL gilt nur beim ersten Start; danach gewinnt die in der
Datenbank gespeicherte URL (Admin → Einstellungen → Verbindungen → Ollama).
Dasselbe gilt für die Embedding-URL unter Dokumente
(rag.ollama.base_url).
SearXNG liefert kein JSON
search.formats in searxng/settings.yml muss json
enthalten. Danach docker compose restart searxng ausführen.
Port bereits belegt
Eventuell lauscht ein natives Ollama oder ein anderer Dienst auf 11434,
3000 oder 8080:
ss -tlnp | grep -E '11434|3000|8080'Den Konflikt beenden oder das Host-Port-Mapping ändern.
Rechtefehler bei models/ oder open-webui/
Siehe Daten & Backup – die Container schreiben als root.
docker compose pull
docker compose up -dopen-webui:main ist ein Rolling-Tag. Für reproduzierbare Deployments einen
Versions-Tag pinnen.
MIT – siehe LICENSE.
