# KI Server

Installationsanleitung KI Server mit GPU Unterstützung basierend auf ollama mit LLMs wie LLama3.1:8b usw.

# Einleitung

Der **KI-Server** bildet das Herzstück der lokalen KI- und Automatisierungsumgebung im Homelab. Er dient als zentrale Plattform für die Ausführung von **großen Sprachmodellen (LLMs)** sowie für **KI-gestützte Anwendungen** wie Dokumentenanalyse, Bildverarbeitung und Automatisierungs-Workflows.

Durch die Virtualisierung auf **Proxmox VE 9** und die Integration einer dedizierten GPU können leistungsfähige Modelle wie *GPT-OSS:20b, Llama 3.1:12b, Mistral:7b, Gemma3:12b, DeepSeek-R1:8b* und *Qwen3:14b* lokal betrieben werden.  
Damit ist der Server unabhängig von Cloud-Diensten nutzbar und bietet volle Kontrolle über Daten, Sicherheit und Performance.

Einsatzbereiche des KI-Servers:

- **Dokumentenmanagement &amp; Automatisierung**: Anbindung an Paperless-NGX, Immich App und Paperless-AI zur automatischen Dokumentenerfassung und -analyse.
- **Assistenzsysteme**: Nutzung von OpenWebUI und Ollama für Chatbots, persönliche Assistenten und interaktive Workflows.
- **Security &amp; Schwachstellenmanagement**: Geplante Integration in bestehende Security-Tools (z. B. Greenbone, osTicket, n8n-Automatisierungen).
- **Experimentelle KI-Projekte**: Testumgebung für lokale Sprach- und Bildmodelle, u. a. zur Text-, Sprach- und Bildgenerierung.

Damit bildet der Server die Grundlage für ein **flexibles, erweiterbares und sicheres KI-Ökosystem** im Homelab, das sowohl für den produktiven Einsatz als auch für Test- und Forschungszwecke genutzt wird.

# Hardwareübersicht

Der aktuelle KI-Server basiert auf leistungsfähiger Gaming- und Serverhardware, die speziell für Virtualisierung und GPU-Passthrough ausgelegt ist:

- **Mainboard**: ASUS TUF Gaming Z790 Pro Wifi
- **CPU**: Intel i5-13400 (10 Kerne, 16 Threads)
- **RAM**: 128 GB DDR5 (2 × 64 GB)
- **GPU**: MSI GeForce RTX 5060 Ti 16G Ventus 2X OC Plus (16 GB VRAM, passthrough-fähig)
- **Netzwerk**: Dual 10 Gbit LAN (Intel X540-T2)
- **Speicher**:
    
    
    - Samsung NVMe 990 Pro 2 TB (System &amp; VM-Speicher)
    - Crucial NVMe 4 TB (Schneller Datenspeicher für Modelle und Container)
    - 10 TB SATA HDD (Langzeitspeicher)
- **Netzteil**: ASUS TUF Gaming 750W Gold
- **Gehäuse**: 19" Servergehäuse

Betriebssystem: **Proxmox VE 9** (Virtualisierungshost)  
KI-VM: **Ubuntu 24.04.3 LTS** mit durchgereichter GPU

# Zusammenbau Server

Der Zusammenbau erfolgt in einem 19"-Servergehäuse und erfordert besondere Aufmerksamkeit auf **Kühlung, Stromversorgung und die richtige Anordnung der PCIe-Geräte**.

## Vorbereitung

- **Arbeitsplatz**: Antistatik-Armband oder Erdung, saubere und helle Arbeitsfläche.
- **Komponenten prüfen**: Alle Bauteile (Mainboard, CPU, RAM, GPU, NVMe, Netzwerkkarte, Netzteil, Gehäuse) vorab bereitlegen.
- **Werkzeug**: Kreuzschlitz-Schraubendreher, ggf. Drehmomentschrauber für CPU-Kühler, Kabelbinder für sauberes Kabelmanagement.

---

## Schritt-für-Schritt Aufbau

### 1. Mainboard montieren

- Das **ASUS TUF Gaming Z790 Pro Wifi** ins Gehäuse einsetzen und mit Abstandshaltern korrekt verschrauben.
- I/O-Shield prüfen (bei TUF-Boards oft integriert).

### 2. CPU installieren

- Den **Intel i5-13400** vorsichtig in den Sockel LGA1700 einsetzen (Markierung beachten).
- Verriegelung gleichmäßig schließen.
- Wärmeleitpaste mittig auftragen (Erbsengröße).
- CPU-Kühler montieren (auf gleichmäßigen Anpressdruck achten).

### 3. RAM installieren

- **128 GB DDR5 (2×64 GB)** einsetzen.
- Für **Dual-Channel-Performance** die Slots A2 und B2 belegen (laut Handbuch).
- Darauf achten, dass die Riegel vollständig einrasten.

### 4. NVMe-Speicher einsetzen

- **Samsung 990 Pro 2 TB** (System &amp; VMs): Auf den **CPU-nahesten M.2-Slot** setzen (PCIe 4.0 ×4, direkt an die CPU angebunden).
- **Crucial 4 TB NVMe** (Daten/Modelle): In den zweiten M.2-Slot (ebenfalls PCIe 4.0 ×4, über Chipsatz).
- Wärmeleitpads/Heatsinks montieren.

> **Hinweis PCIe-Lanes**:
> 
> - Die **erste NVMe** nutzt CPU-Lanes → maximaler Durchsatz (wichtig für VMs und Host-System).
> - Weitere NVMe laufen über den Z790-Chipsatz (DMI 4.0 Link) → ausreichend für Modell- und Containerdaten.

### 5. GPU installieren

- **MSI RTX 5060 Ti 16G** in den **obersten PCIe-x16-Slot** (direkt an CPU angebunden, volle PCIe 4.0 ×16 Bandbreite).
- Karte fixieren, zusätzliche 8-Pin-Stromversorgung anschließen.
- Darauf achten, dass keine anderen PCIe-Karten Bandbreite vom GPU-Slot abzweigen.

### 6. 10 Gbit LAN (Intel X540) installieren

- Karte in den **zweiten mechanischen x16-Slot** einsetzen. Dieser teilt sich bei Nutzung ggf. Lanes mit M.2 oder anderen PCIe-Slots → im BIOS prüfen.
- Für den Betrieb reichen PCIe 3.0 ×8; selbst wenn der Slot reduziert, ist die Bandbreite (ca. 64 Gbit/s) deutlich über den benötigten 20 Gbit/s.

### 7. SATA-Speicher anschließen

- **10 TB HDD** am SATA-Port anschließen (über Chipsatz, keine Performance-Probleme).
- Optional Vibrationsdämpfer im Gehäuse nutzen.

### 8. Netzteil und Verkabelung

- **ASUS TUF Gaming 750W Gold** installieren.
- 24-Pin ATX- und 8-Pin CPU-Kabel sauber verlegen.
- GPU mit **dediziertem Kabelstrang** anschließen (kein Daisy-Chaining).
- Kabelmanagement mit Kabelbindern, um Luftstrom nicht zu behindern.

# BIOS Anpassungen

1. **BIOS Update** auf aktuelle Version durchführen.
2. **Resizable BAR** aktivieren (wichtig für GPU-Leistung).
3. **Virtualisierung**: Intel VT-d &amp; SR-IOV aktivieren (für Proxmox &amp; GPU Passthrough).
4. **PCIe-Konfiguration**: Oberster Slot auf „PCIe Gen4“ fixieren.
5. **Lüfterkurven**: Auf 24/7-Betrieb optimieren (hoher Airflow, moderater Lärm).
6. **Power Saving Features**: C-States ggf. einschränken, um Latenzen bei KI-Workloads zu reduzieren.

# Installation

# Installation Host

# Installation von Proxmox VE 9

## 1. ISO herunterladen

- Offizielle Downloadseite:  
    👉 <a class="decorated-link cursor-pointer" data-end="412" data-start="336" rel="noopener" target="_new">https://www.proxmox.com/en/downloads<span aria-hidden="true" class="ms-0.5 inline-block align-middle leading-none"><svg class="block h-[0.75em] w-[0.75em] stroke-current stroke-[0.75]" data-rtl-flip="" fill="currentColor" height="20" viewbox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M14.3349 13.3301V6.60645L5.47065 15.4707C5.21095 15.7304 4.78895 15.7304 4.52925 15.4707C4.26955 15.211 4.26955 14.789 4.52925 14.5293L13.3935 5.66504H6.66011C6.29284 5.66504 5.99507 5.36727 5.99507 5C5.99507 4.63273 6.29284 4.33496 6.66011 4.33496H14.9999L15.1337 4.34863C15.4369 4.41057 15.665 4.67857 15.665 5V13.3301C15.6649 13.6973 15.3672 13.9951 14.9999 13.9951C14.6327 13.9951 14.335 13.6973 14.3349 13.3301Z"></path></svg></span></a>
- Gewählt wird: **Proxmox VE 9.x ISO Installer** (aktuell `proxmox-ve_9.x.iso`).

---

## 2. Bootfähigen USB-Stick unter Windows erstellen

Am einfachsten mit **Rufus**:

1. Download Rufus: <a class="decorated-link cursor-pointer" data-end="645" data-start="609" rel="noopener" target="_new">https://rufus.ie<span aria-hidden="true" class="ms-0.5 inline-block align-middle leading-none"><svg class="block h-[0.75em] w-[0.75em] stroke-current stroke-[0.75]" data-rtl-flip="" fill="currentColor" height="20" viewbox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M14.3349 13.3301V6.60645L5.47065 15.4707C5.21095 15.7304 4.78895 15.7304 4.52925 15.4707C4.26955 15.211 4.26955 14.789 4.52925 14.5293L13.3935 5.66504H6.66011C6.29284 5.66504 5.99507 5.36727 5.99507 5C5.99507 4.63273 6.29284 4.33496 6.66011 4.33496H14.9999L15.1337 4.34863C15.4369 4.41057 15.665 4.67857 15.665 5V13.3301C15.6649 13.6973 15.3672 13.9951 14.9999 13.9951C14.6327 13.9951 14.335 13.6973 14.3349 13.3301Z"></path></svg></span></a>
2. USB-Stick (≥ 4 GB, wird gelöscht) einstecken.
3. Rufus starten → folgendes einstellen:
    
    
    - **Gerät**: USB-Stick auswählen
    - **Boot-Auswahl**: heruntergeladene `proxmox-ve_9.x.iso`
    - **Partitionstyp**: GPT
    - **Zielsystem**: UEFI (nicht BIOS/Legacy)
    - Rest Standard lassen
4. Start → ISO wird auf den Stick geschrieben.

---

## 3. Installation von Proxmox VE

1. Server einschalten und vom USB-Stick booten (UEFI-Modus wählen).
2. Installationsmenü → `Install Proxmox VE` wählen.
3. Lizenzbedingungen akzeptieren.
4. **Zieldatenträger auswählen**:
    
    
    - Samsung NVMe 990 Pro 2 TB (Systemplatte).
    - Dateisystem: **ext4** (einfach und stabil, ZFS nur bei RAID oder Snapshots nötig).
5. Zeitzone: `Europe/Berlin`, Tastaturlayout `de`.
6. Root-Passwort und E-Mail-Adresse setzen (für Benachrichtigungen).
7. Netzwerkeinstellungen:
    
    
    - Hostname: `pve.localdomain` (später anpassen).
    - Management-IP manuell vergeben.
8. Installation starten, nach Abschluss neustarten.

---

## 4. Erste Anmeldung

- Webinterface über: `https://<IP-des-Servers>:8006`
- Login mit `root` und dem gesetzten Passwort.

---

## 5. BIOS-Anpassungen für GPU-Passthrough

Vor dem Start der VMs müssen im BIOS folgende Optionen aktiviert werden:

- **Intel VT-d** → `Enabled`
- **SR-IOV** → `Enabled`
- **Above 4G Decoding** → `Enabled`
- **Resizable BAR** → `Enabled` (falls vorhanden, für GPU Performance)
- **Primary Display** → auf `iGPU` oder `Onboard` stellen (damit die NVIDIA-Karte für Passthrough frei ist).

---

## 6. GRUB &amp; Kernel-Anpassungen für Passthrough

Auf dem Proxmox-Host anmelden (SSH oder Shell).

### a) IOMMU aktivieren

Datei `/etc/default/grub` bearbeiten:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-nano-%2Fetc%2Fdefault%2Fgr"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`nano /etc/default/grub`</div></div>Die Zeile mit `GRUB_CMDLINE_LINUX_DEFAULT` anpassen:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-grub_cmdline_linux_d"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"`</div></div>Speichern und GRUB neu generieren:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-update-grub"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`update-grub`</div></div>### b) VFIO-Module laden

Datei `/etc/modules` bearbeiten und folgende Zeilen ergänzen:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-vfio-vfio_iommu_type"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`vfiovfio_iommu_type1vfio_pcivfio_virqfd`</div></div>---

## 7. GPU identifizieren &amp; binden

1. PCI-Geräte auflisten:
    
    <div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
    </div></div></div><div class="overflow-y-auto p-4" dir="ltr">`lspci -nn`</div></div>→ GPU (z. B. `10de:2805`) und Audio-Controller (`10de:228b`) notieren.
2. Datei `/etc/modprobe.d/vfio.conf` erstellen:
    
    <div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
    </div></div></div><div class="overflow-y-auto p-4" dir="ltr">`options vfio-pci ids=10de:2805,10de:228b`</div></div>
3. NVIDIA-Treiber auf Host blockieren:  
    Datei `/etc/modprobe.d/blacklist.conf` ergänzen:
    
    <div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
    </div></div></div><div class="overflow-y-auto p-4" dir="ltr">`blacklist nouveaublacklist nvidiablacklist nvidiafb`</div></div>
4. Initramfs neu erstellen:
    
    <div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
    </div></div></div><div class="overflow-y-auto p-4" dir="ltr">`update-initramfs -u -k all`</div></div>

---

## 8. Neustart &amp; Kontrolle

Nach Neustart prüfen, ob die GPU an VFIO gebunden ist:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-lspci--nnk-%7C-grep--a"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`lspci -nnk | grep -A 3 -E <span class="hljs-string">"10de"</span>`</div></div>→ Sollte `Kernel driver in use: vfio-pci` anzeigen.

# Einrichten VM

# Installation Ubuntu 24.04.3 LTS (Minimal Server)

## 1. ISO herunterladen

Offizielle Quelle:  
👉 [https://ubuntu.com/download/server<span aria-hidden="true" class="ms-0.5 inline-block align-middle leading-none"><svg class="block h-[0.75em] w-[0.75em] stroke-current stroke-[0.75]" data-rtl-flip="" fill="currentColor" height="20" viewbox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M14.3349 13.3301V6.60645L5.47065 15.4707C5.21095 15.7304 4.78895 15.7304 4.52925 15.4707C4.26955 15.211 4.26955 14.789 4.52925 14.5293L13.3935 5.66504H6.66011C6.29284 5.66504 5.99507 5.36727 5.99507 5C5.99507 4.63273 6.29284 4.33496 6.66011 4.33496H14.9999L15.1337 4.34863C15.4369 4.41057 15.665 4.67857 15.665 5V13.3301C15.6649 13.6973 15.3672 13.9951 14.9999 13.9951C14.6327 13.9951 14.335 13.6973 14.3349 13.3301Z"></path></svg></span>](https://ubuntu.com/download/server)

- Variante: **Ubuntu Server 24.04.3 LTS**
- Image: `ubuntu-24.04.3-live-server-amd64.iso`

---

## 2. VM in Proxmox anlegen

1. In der Proxmox Web-GUI: **Create VM**
    
    
    - Name: `KI-VM`
    - ISO: `ubuntu-24.04.3-live-server-amd64.iso` (zuvor hochgeladen in Proxmox Storage)
    - System:
        
        
        - BIOS: **OVMF (UEFI)**
        - Machine: **q35**
        - Graphic Card: **none** (GPU wird durchgereicht)
    - Disks:
        
        
        - Speicher auf **Crucial NVMe 4 TB** oder System-SSD je nach Planung
        - Größe: mind. 250 GB (je nach Modellgrößen)
        - Cache: **Write back (unsafe)** (für Performance)
    - CPU:
        
        
        - 6 Cores (i5-13400 hat 10 → 6 reichen für KI-Workloads, Rest für Host)
        - Typ: **host**
    - RAM:
        
        
        - 32 GB (von 128 GB gesamt)
        - Ballooning: deaktivieren (konstante Zuweisung)
    - Netzwerk: **VirtIO (paravirtualized)**
    - Hardware: **GPU &amp; Audio-Device** via PCI Passthrough hinzufügen (wie vorher eingerichtet).

---

## 3. Ubuntu Installation

1. Boot von ISO → Auswahl: **Install Ubuntu Server**
2. Sprache: `Deutsch` (oder Englisch, je nach Vorliebe)
3. Tastatur: `Deutsch`
4. Netzwerk:
    
    
    - `ens18` (VirtIO) automatisch via DHCP oder manuell konfigurieren
    - Empfehlung: **statische IP** für die VM (z. B. 192.168.33.200)
5. Storage:
    
    
    - Geführte Installation auf die virtuelle Disk
    - Partitionierung: Standard (LVM möglich, aber nicht zwingend)
6. Benutzer anlegen:
    
    
    - Username: `kiadmin`
    - Passwort: sicher setzen
    - SSH-Server installieren: **Ja**
7. Snap-Pakete: alle abwählen (nicht benötigt)
8. Installation starten → Neustart nach Abschluss

---

## 4. Erste Anpassungen nach der Installation

Nach Login per SSH oder Console:

### a) System aktualisieren

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-apt-update-%26%26-s"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo apt update && sudo apt upgrade -ysudo reboot`</div></div>### b) Nützliche Basis-Tools installieren

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-apt-install--y-"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo apt install -y htop ncdu git curl wget unzip zip tar net-tools iftop lsb-release pciutils`</div></div>### c) SSH konfigurieren

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-nano-%2Fetc%2Fssh%2Fs"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo nano /etc/ssh/sshd_config`</div></div>Empfohlen:

- `PermitRootLogin no`
- `PasswordAuthentication no` (falls SSH-Key genutzt wird)

Dann:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-systemctl-resta"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo systemctl restart ssh`</div></div>### d) Zeitsynchronisation prüfen

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-timedatectl-set-time"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`timedatectl set-timezone Europe/Berlintimedatectl status`</div></div>---

## 5. GPU-Treiber vorbereiten

Da die GPU durchgereicht wird, braucht die VM die NVIDIA-Treiber:

### a) Repository aktivieren

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-apt-install--y--1"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo apt install -y software-properties-commonsudo add-apt-repository ppa:graphics-drivers/ppa -ysudo apt update`</div></div>### b) NVIDIA-Treiber installieren

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-apt-install--y--2"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo apt install -y nvidia-driver-550 nvidia-utils-550`</div></div>### c) Neustart &amp; Test

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-nvidia-smi"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`nvidia-smi`</div></div>→ sollte GPU-Daten (Modell RTX 5060 Ti, Treiber, CUDA-Version) anzeigen.

---

## 6. Optional: Basis-Optimierungen für KI-Workloads

- **Swappiness reduzieren** (damit RAM bevorzugt genutzt wird):
    
    <div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
    </div></div></div><div class="overflow-y-auto p-4" dir="ltr">`<span class="hljs-built_in">echo</span> <span class="hljs-string">'vm.swappiness=10'</span> | sudo <span class="hljs-built_in">tee</span> -a /etc/sysctl.confsudo sysctl -p`</div></div>
- **Transparent Hugepages deaktivieren** (manchmal Performance-Gewinn bei LLMs):
    
    <div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
    </div></div></div><div class="overflow-y-auto p-4" dir="ltr">`<span class="hljs-built_in">echo</span> never | sudo <span class="hljs-built_in">tee</span> /sys/kernel/mm/transparent_hugepage/enabled`</div></div>
- **ufw aktivieren** (Firewall, falls nicht durch Docker geregelt):
    
    <div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
    </div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo apt install ufw -ysudo ufw default deny incomingsudo ufw default allow outgoingsudo ufw allow sshsudo ufw <span class="hljs-built_in">enable</span>`</div></div>

Konfiguration GPU:

[![image.png](https://wiki.leibling.de/uploads/images/gallery/2025-09/scaled-1680-/Vh2lipGN4OUZOhh2-image.png)](https://wiki.leibling.de/uploads/images/gallery/2025-09/Vh2lipGN4OUZOhh2-image.png)

Konfiguration GPU-Audio:

[![image.png](https://wiki.leibling.de/uploads/images/gallery/2025-09/scaled-1680-/c0iaoUA79TeJfhOl-image.png)](https://wiki.leibling.de/uploads/images/gallery/2025-09/c0iaoUA79TeJfhOl-image.png)

# Installation Docker

# Installation von Docker &amp; Docker Compose

## 1. Alte Versionen entfernen (falls vorhanden)

Vorherige Docker-Installationen oder Reste löschen:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-apt-remove--y-d"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo apt remove -y docker docker-engine docker.io containerd runc`</div></div>---

## 2. Abhängigkeiten installieren

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-apt-update-sudo"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo apt updatesudo apt install -y ca-certificates curl gnupg lsb-release`</div></div>---

## 3. Docker GPG-Key hinzufügen

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-mkdir--p-%2Fetc%2Fa"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo <span class="hljs-built_in">mkdir</span> -p /etc/apt/keyringscurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg`</div></div>---

## 4. Docker-Repository hinzufügen

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-echo-%5C-%22deb-%5Barch%3D%24%28"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`<span class="hljs-built_in">echo</span> \  <span class="hljs-string">"deb [arch=<span class="hljs-subst">$(dpkg --print-architecture)</span></span> signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \  <span class="hljs-subst">$(lsb_release -cs)</span> stable" | sudo <span class="hljs-built_in">tee</span> /etc/apt/sources.list.d/docker.list > /dev/null`</div></div>---

## 5. Docker Engine installieren

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-apt-update-sudo-1"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo apt updatesudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin`</div></div>---

## 6. Installation prüfen

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-docker---version-doc"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`docker --versiondocker compose version`</div></div>---

## 7. Benutzerrechte anpassen

Standardmäßig braucht man `sudo` für Docker. Damit normale Nutzer (z. B. `kiadmin`) Docker nutzen können:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-usermod--ag-doc"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo usermod -aG docker kiadmin`</div></div>→ Danach **ab- und wieder anmelden**.

---

## 8. Docker als Dienst aktivieren

Damit Docker beim Booten automatisch startet:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-systemctl-enabl"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo systemctl <span class="hljs-built_in">enable</span> dockersudo systemctl start docker`</div></div>---

## 9. Test mit Hello-World Container

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-docker-run-hello-wor"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`docker run hello-world`</div></div>→ Sollte eine Bestätigungsmeldung ausgeben.

---

## 10. (Optional) Standard-Speicherpfad anpassen

Falls Container und Images nicht auf der Systemplatte, sondern auf einer dedizierten NVMe liegen sollen:

1. Docker-Dienst stoppen:
    
    <div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
    </div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo systemctl stop docker`</div></div>
2. Konfigurationsdatei erstellen:
    
    <div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
    </div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo <span class="hljs-built_in">mkdir</span> -p /etc/docker<span class="hljs-built_in">echo</span> <span class="hljs-string">'{  "data-root": "/opt/docker"}'</span> | sudo <span class="hljs-built_in">tee</span> /etc/docker/daemon.json`</div></div>
3. Verzeichnis anlegen &amp; Rechte setzen:
    
    <div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
    </div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo <span class="hljs-built_in">mkdir</span> -p /opt/dockersudo <span class="hljs-built_in">chown</span> -R root:docker /opt/docker`</div></div>
4. Docker neu starten:
    
    <div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
    </div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo systemctl start docker`</div></div>

# Docker Container

# Installation Ollama und OpenWebUI

## 1. Verzeichnisstruktur vorbereiten

Alle Containerdaten liegen unter `/opt/docker`, damit System und Daten sauber getrennt bleiben:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-mkdir--p-%2Fopt%2Fd"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo <span class="hljs-built_in">mkdir</span> -p /opt/docker/ollamasudo <span class="hljs-built_in">mkdir</span> -p /opt/docker/open-webui`</div></div>Optional Zugriffsrechte setzen:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-chown--r-kiadmi"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo <span class="hljs-built_in">chown</span> -R kiadmin:docker /opt/docker`</div></div>---

## 2. Docker-Compose Datei

Pfad: `/opt/docker/docker-compose.yml`

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-version%3A-%273.8%27-servi"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`<span class="hljs-attr">version:</span> <span class="hljs-string">'3.8'</span><span class="hljs-attr">services:</span>  <span class="hljs-attr">ollama:</span>    <span class="hljs-attr">image:</span> <span class="hljs-string">ollama/ollama</span>    <span class="hljs-attr">container_name:</span> <span class="hljs-string">ollama</span>    <span class="hljs-attr">ports:</span>      <span class="hljs-bullet">-</span> <span class="hljs-string">"11434:11434"</span>    <span class="hljs-attr">restart:</span> <span class="hljs-string">always</span>    <span class="hljs-attr">runtime:</span> <span class="hljs-string">nvidia</span>    <span class="hljs-attr">volumes:</span>      <span class="hljs-bullet">-</span> <span class="hljs-string">/opt/docker/ollama:/root/.ollama</span>  <span class="hljs-attr">openwebui:</span>    <span class="hljs-attr">image:</span> <span class="hljs-string">ghcr.io/open-webui/open-webui:ollama</span>    <span class="hljs-attr">container_name:</span> <span class="hljs-string">open-webui</span>    <span class="hljs-attr">restart:</span> <span class="hljs-string">always</span>    <span class="hljs-attr">runtime:</span> <span class="hljs-string">nvidia</span>    <span class="hljs-attr">ports:</span>      <span class="hljs-bullet">-</span> <span class="hljs-string">"3000:8080"</span>    <span class="hljs-attr">environment:</span>      <span class="hljs-bullet">-</span> <span class="hljs-string">OLLAMA_API_BASE_URL=http://ollama:11434</span>    <span class="hljs-attr">volumes:</span>      <span class="hljs-bullet">-</span> <span class="hljs-string">/opt/docker/open-webui:/app/backend/data</span>      <span class="hljs-comment"># Eigene CSS-Anpassungen (optional)</span>      <span class="hljs-comment"># - /home/pleibling/docker/ai/custom.css:/app/build/static/custom.css:ro</span>    <span class="hljs-attr">depends_on:</span>      <span class="hljs-bullet">-</span> <span class="hljs-string">ollama</span>`</div></div>---

## 3. Container starten

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-cd-%2Fopt%2Fdocker-docke"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`<span class="hljs-built_in">cd</span> /opt/dockerdocker compose up -d`</div></div>Status prüfen:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-docker-ps"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`docker ps`</div></div>- Ollama-API → `http://<Server-IP>:11434`
- OpenWebUI → `http://<Server-IP>:3000`

---

## 4. Modelle installieren

Ollama lädt Modelle nach Bedarf.  
Installation erfolgt z. B. über:

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-docker-exec--it-olla"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`docker <span class="hljs-built_in">exec</span> -it ollama ollama pull gpt-oss:20b`</div></div>**Verwendete LLMs in dieser Umgebung:**

- **GPT-OSS:20b** → Hauptmodell (groß, sehr leistungsfähig)
- **Llama 3.1:12b**
- **Mistral:7b**
- **Gemma3:12b**
- **DeepSeek-R1:8b**
- **Qwen3:14b**

Optional kannst du auch in OpenWebUI für jedes Modell eigene Presets/Workspaces definieren.

---

## 5. Update der Container

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-cd-%2Fopt%2Fdocker-docke-1"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`<span class="hljs-built_in">cd</span> /opt/dockerdocker compose pulldocker compose up -d`</div></div>---

## 6. Backup-Hinweis

Da alle persistenten Daten in `/opt/docker/ollama` und `/opt/docker/open-webui` liegen, reicht ein Backup dieser Ordner.

---

# Installation Paperless und Paperless-AI

# Verzeichnis anlegen (einmalig)

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-sudo-mkdir--p-%2Fhome%2F"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`sudo <span class="hljs-built_in">mkdir</span> -p /home/pleibling/docker/paperless/{data,media,<span class="hljs-built_in">export</span>,consume,db,redis,ai}sudo <span class="hljs-built_in">chown</span> -R 1000:1000 /home/pleibling/docker/paperless`</div></div>---

#### `docker-compose.yml` (unter `/home/pleibling/docker/paperless/docker-compose.yml`)

```
version: "3.8"

services:
  paperless-ngx:
    image: ghcr.io/paperless-ngx/paperless-ngx:latest
    container_name: paperless-ngx
    restart: always
    environment:
      - PAPERLESS_REDIS=redis://paperless-redis:6379
      - PAPERLESS_DBHOST=paperless-db
      - PAPERLESS_DBUSER=paperless
      - PAPERLESS_DBPASS=PapPW050725
      - PAPERLESS_SECRET_KEY=G2v3eKLZRIkpMeUcGkLor0Lt6vtzHodKLCRVvYHHjtE=
      - PAPERLESS_AI_ENABLED=1
      - PAPERLESS_AI_PROVIDER=ollama
      - PAPERLESS_AI_MODEL=llama3.1:8b
      - PAPERLESS_AI_HOST=http://192.168.33.200:11434
      - PAPERLESS_ALLOWED_HOSTS=dms.leibling.de,192.168.33.200,localhost
      - PAPERLESS_CSRF_TRUSTED_ORIGINS=https://dms.leibling.de,http://192.168.33.200:8080,http://localhost:8080
      - USERMAP_UID=1000
      - USERMAP_GID=1000
      - PAPERLESS_TIKA_ENABLED=true
      - PAPERLESS_TIKA_ENDPOINT=http://tika:9998
      - PAPERLESS_CONVERT_OFFICE=true
      - PAPERLESS_TIKA_CONVERT_OFFICE=true
      - PAPERLESS_GOTENBERG_ENABLED=true
      - PAPERLESS_GOTENBERG_ENDPOINT=http://gotenberg:3000
      - RAG_SERVICE_ENABLED=true
      - RAG_SERVICE_URL=http://paperless-ai:8000
    ports:
      - "8080:8000"
    volumes:
      - /opt/docker/paperless/data:/usr/src/paperless/data
      - /opt/docker/paperless/media:/usr/src/paperless/media
      - /opt/docker/paperless/export:/usr/src/paperless/export
      - /opt/docker/paperless/consume:/usr/src/paperless/consume
    depends_on:
      - paperless-db
      - paperless-redis
  gotenberg:
    image: gotenberg/gotenberg:7
    container_name: paperless-gotenberg
    restart: always
    ports:
      - "3002:3000"
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL

  tika:
    image: apache/tika
    container_name: paperless-tika
    restart: always
    ports:
      - "3003:9998"
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL

  paperless-db:
    image: postgres:15
    container_name: paperless-db
    restart: always
    environment:
      - POSTGRES_DB=paperless
      - POSTGRES_USER=paperless
      - POSTGRES_PASSWORD=PapPW050725
    volumes:
      - /opt/docker/paperless/db:/var/lib/postgresql/data

  paperless-redis:
    image: redis:7
    container_name: paperless-redis
    restart: always
    volumes:
      - /opt/docker/paperless/redis:/data

  paperless-ai:
    image: clusterzx/paperless-ai
    container_name: paperless-ai
    restart: always
    environment:
      - PUID=1000
      - PGID=1000
      - PAPERLESS_AI_PORT=3000
      - RAG_SERVICE_ENABLED=true
      - RAG_SERVICE_URL=http://paperless-ai:3000
    ports:
      - "3010:3000"
    volumes:
      - /opt/docker/paperless/ai:/app/data
    deploy:
      resources:
        reservations:
          devices:
            - capabilities: ["gpu"]

```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-wichtig%3A"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"></div></div><div class="overflow-y-auto p-4" dir="ltr"></div><div class="overflow-y-auto p-4" dir="ltr">**Wichtig:**</div></div>- Deine **Ollama-Instanz** läuft in einem anderen Stack (Ollama/OpenWebUI). Zugriff erfolgt hier **per IP/Port** (`http://192.168.33.200:11434`) – das ist ideal, da unterschiedliche Compose-Netzwerke sich sonst nicht automatisch sehen.
- Wenn du später **TLS/Reverse Proxy** (z. B. Traefik/Caddy/Nginx) nutzt, passe `PAPERLESS_ALLOWED_HOSTS` und `PAPERLESS_CSRF_TRUSTED_ORIGINS` an.

---

# Start/Update

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-cd-%2Fhome%2Fpleibling%2Fd"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`<span class="hljs-built_in">cd</span> /home/pleibling/docker/paperlessdocker compose up -d<span class="hljs-comment"># Update:</span>docker compose pull && docker compose up -d`</div></div>---

# Kurzer Funktionstest

- Paperless-NGX: `http://<VM-IP>:8080`
- RAG-API (intern gemappt): `http://<VM-IP>:3010/health` → sollte `ok` liefern
- Tika: `http://<VM-IP>:3003/version`
- Gotenberg: `http://<VM-IP>:3002/health`

# Installation Immich-App

# Immich – Installation (Minimal Setup)

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-cd-%2Fopt%2Fdocker-git-c"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`<span class="hljs-built_in">cd</span> /opt/dockergit <span class="hljs-built_in">clone</span> https://github.com/immich-app/immich.git immich-app<span class="hljs-built_in">cd</span> immich-app`</div></div>## `.env` erstellen

Datei: `/opt/docker/immich-app/.env`

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr"></div></div>```
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library

# The location where your database files are stored. Network shares are not supported for the database
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
TZ=Europe/Berlin

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=kdlIHdjdfifhj7f7ehekdhuvzdjenfifhHJZHGjdu65w7sh

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk--1"><div class="overflow-y-auto p-4" dir="ltr">  
</div></div>## Starten

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-docker-compose-up--d"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2"><div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs">  
</div></div></div><div class="overflow-y-auto p-4" dir="ltr">`docker compose up -d `</div></div>## Aufruf im Browser

👉 `http://<VM-IP>:2283`

Erster registrierter Benutzer = Administrator.

---