diff --git a/HOWTO.md b/HOWTO.md index 9e929f2..d786e03 100644 --- a/HOWTO.md +++ b/HOWTO.md @@ -1,37 +1,52 @@ # AUR-Shield HOWTO -## Server einrichten (10.90.9.102) +## Server einrichten + +### Voll-Modus (Server mit GPU, baut Pakete) ```bash -# Klonen git clone https://gitea.die-heimatlosen.eu/arch_agent/aur-shield.git cd aur-shield - -# Installieren (Python venv, systemd service, cache dirs) ./install.sh - -# Config anpassen falls nötig cp config.example.yaml config.yaml -nano config.yaml - -# Service starten +# nano config.yaml — Modell, Port etc. anpassen sudo systemctl enable --now aur-shield - -# Verifikation -curl http://localhost:8443/api/status ``` -Erwartete Ausgabe: -```json -{ - "status": "running", - "model": "qwen2.5:latest", - "ollama_url": "http://localhost:11434", - "repo_dir": "/var/cache/aur-shield/repo", - "cached_scans": 0 -} +### Scan-Only Modus (VPS ohne GPU, Client baut lokal) + +```bash +git clone https://gitea.die-heimatlosen.eu/arch_agent/aur-shield.git /opt/aur-shield +cd /opt/aur-shield +python3 -m venv .venv +.venv/bin/pip install -e ".[dev]" +cp config.example.yaml config.yaml + +# Scan-Only aktivieren + kleinstes Modell: +sed -i 's/model: qwen2.5:latest/model: qwen2.5-coder:3b/' config.yaml +sed -i 's/scan_only: false/scan_only: true/' config.yaml + +# Systemd Service: +cat > /etc/systemd/system/aur-shield.service << 'EOF' +[Unit] +Description=AUR-Shield (Scan-Only) +After=network.target ollama.service +[Service] +Type=simple +ExecStart=/opt/aur-shield/.venv/bin/python -m aur_shield /opt/aur-shield/config.yaml +WorkingDirectory=/opt/aur-shield +Restart=on-failure +[Install] +WantedBy=multi-user.target +EOF +systemctl daemon-reload && systemctl enable --now aur-shield ``` +Im Scan-Only Modus: +- Server macht nur IOC + Regex + LLM Scan (kein `makepkg`, kein pacman repo) +- Client baut das Paket lokal mit `yay`/`paru` nachdem der Scan clean ist +- Braucht nur ~4GB RAM (3B Modell) + Python — kein `base-devel`, kein `devtools` + ## Client einrichten (Desktop/Laptop) ### Standard-Installation @@ -41,10 +56,17 @@ Erwartete Ausgabe: curl -sL https://gitea.die-heimatlosen.eu/arch_agent/aur-shield/raw/branch/main/install-client.sh | sudo bash ``` -Das macht: -1. `/etc/safe-yay.conf` — Server-Adresse (`SHIELD_HOST="10.90.9.102"`) -2. `[aur-shield]` repo in `/etc/pacman.conf` — zeigt auf `http://10.90.9.102:8443/repo` -3. `/usr/local/bin/safe-yay` — Wrapper-Skript +### Mit VPS (Scan-Only Server) + +```bash +# VPS als Scanner, Client baut lokal +curl -sL https://gitea.die-heimatlosen.eu/arch_agent/aur-shield/raw/branch/main/install-client.sh \ + | AUR_SHIELD_HOST=89.58.33.228 sudo bash +``` + +Der Client erkennt automatisch ob der Server im Scan-Only Modus läuft: +- **Scan-Only Server:** Clean → `yay -S ` lokal bauen +- **Full Server:** Clean → `pacman -S aur-shield/` aus Repo ### Manuelle Installation (anderer Server)