KT - AnythingLLM – Installation & Konfiguration (Docker Compose)
RAG-Frontend mit Workspaces, Dokumenten-Upload, Embeddings und Chat-UI. Pro Workspace eine eigene Wissensbasis – perfekt für Produktdokumentationen, Verträge, Studienunterlagen.
1. Zielsetzung
2. Installation
mkdir -p ~/0_docker/3001_anythingllm/storage
cd ~/0_docker/3001_anythingllm
cat > .env << 'EOF'
JWT_SECRET=$(openssl rand -base64 32)
LLM_PROVIDER=ollama
OLLAMA_BASE_PATH=http://192.168.0.16:8000
OLLAMA_MODEL_PREF=qwen2.5:14b
EMBEDDING_ENGINE=ollama
EMBEDDING_BASE_PATH=http://192.168.0.16:8000
EMBEDDING_MODEL_PREF=nomic-embed-text
VECTOR_DB=lancedb
EOF
chmod 600 .env
cat > docker-compose.yml << 'EOF'
services:
anythingllm:
image: mintplexlabs/anythingllm:latest
container_name: anythingllm
restart: unless-stopped
ports:
- "192.168.0.16:3010:3001"
cap_add:
- SYS_ADMIN
volumes:
- ./storage:/app/server/storage
- ./.env:/app/server/.env
environment:
STORAGE_DIR: /app/server/storage
EOF
docker compose up -d
Hinweis zur Volume-Konfiguration: AnythingLLM ist sensibel beim Volume-Mount des Storage-Verzeichnisses. Bei Permission-Problemen chown -R 1000:1000 ./storage oder explizit als USER root-Container starten (Container muss SYS_ADMIN haben).
3. Embedding-Modell in Ollama bereitstellen
docker exec -it ollama ollama pull nomic-embed-text
docker exec -it ollama ollama list
4. Reverse Proxy
5. Erstes Setup
https://rag.kistudent.local
Onboarding-Wizard durchklicken – Provider (Ollama), Modell, Embedding bestätigen
Admin-User & weitere User anlegen
Ersten Workspace erstellen (z.B. "Local AI Manager Studium")
6. Dokumente einspielen
7. SearXNG-Integration für Web-Recherche
Im Workspace unter "Agent Configuration":
http://192.168.0.16:8888 (intern, ohne HTTPS – beide im LAN)
Custom Header: bei aktiviertem SearXNG-Auth den Header hinterlegen
SearXNG selbst läuft als eigener Container und aggregiert mehrere Suchmaschinen ohne Tracking.
8. Workspace-Pattern für Exista
9. KI-CRM-Integration
Aus dem KI-CRM können RAG-Anfragen per API an AnythingLLM gehen:
# Beispiel
curl -X POST https://rag.kistudent.local/api/v1/workspace/produkte-jianghai/chat \
-H "Authorization: Bearer $ANYTHINGLLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Welche Cross-Reference gibt es für Panasonic EEU-FR1V222B?",
"mode": "chat"
}'
10. Backup
./storage – Workspaces, Embeddings, Konfiguration
.env – Provider-Setup
Vector-DB (LanceDB) ist Teil von storage – konsistent gesichert wenn Container gestoppt wird
11. Wartung & Troubleshooting
localhost statt Host-IP
OLLAMA_BASE_PATH=http://192.168.0.16:8000 – Host-IP, nicht localhost
Embedding extrem langsam
Embedding-Modell auf CPU
Ollama nutzt automatisch GPU; Modell wirklich nomic-embed-text?
Antworten ignorieren Dokumente
Workspace im Chat-Modus statt Query-Modus
Im Workspace-Settings "Query"-Mode wählen, dann antwortet er nur aus Doku
Permission-Probleme im storage
Container-User-ID-Mismatch
chown -R 1000:1000 ./storage oder dynamisch via PUID
Upload schlägt fehl
NPM-Body-Size
client_max_body_size 200M; im NPM-Advanced
12. Sicherheit
13. Checkliste
./storage
Querverweise: LocalAI | Modellverwaltung | Flowise