# Installation Guide – All Platforms ZMB Webui läuft auf **Raspberry Pi, x86, AMD64, und LXC Container**. ## 1. System Check ```bash cd backend # Kompatibilität prüfen (vor Installation!) bash check_system.sh ``` ### Was wird geprüft? - ✓ Architektur (ARM64, x86_64, i686) - ✓ OS (Debian, Ubuntu, RHEL, CentOS) - ✓ Python 3.8+ - ✓ ZFS Tools (zpool, zfs) - ✓ systemd (für Service) - ✓ Disk-Platz (≥500MB) - ✓ Memory (≥512MB) - ✓ Internet (für apt) ## 2. Installation ### Option A: Bare Metal (Pi, x86, AMD64) ```bash # Auf dem Ziel-System: cd backend sudo bash install.sh ``` Das Script macht automatisch: 1. Architektur Detection 2. OS Detection 3. Virtual Environment erstellen 4. Dependencies via pip installieren 5. Default Admin User setzen 6. systemd Service installieren 7. Service starten & Enable ### Option B: Remote Installation ```bash # Von deinem Laptop: scp -r backend root@:/tmp/zmb-webui-backend ssh root@ cd /tmp/zmb-webui-backend sudo bash check_system.sh sudo bash install.sh ``` ### Option C: LXC Container ```bash # Host-Seite: lxc launch images:debian/bookworm zmb-webui lxc config device add zmb-webui tank disk \ source=/tank/share \ path=/tank/share lxc config device add zmb-webui http proxy \ listen=tcp:0.0.0.0:9090 \ connect=tcp:127.0.0.1:8000 # Container-Seite: lxc exec zmb-webui -- bash cd /opt && git clone zmb-webui && cd zmb-webui/backend bash check_system.sh bash install.sh ``` ## 3. Verify Installation ```bash # Service Status sudo systemctl status zmb-webui-backend # Health Check curl http://localhost:8000/health # Logs sudo journalctl -u zmb-webui-backend -f # API Test curl -X POST http://localhost:8000/api/auth/login \ -H "Content-Type: application/json" \ -d '{"username":"admin","password":"admin123"}' ``` ## 4. Post-Installation ### Change Admin Password (WICHTIG!) ```bash sudo python3 /opt/zmb-webui/backend/manage_users.py change-password admin ``` ### Configure Firewall ```bash # Expose Port 9090 (if using nginx reverse proxy) sudo ufw allow 9090/tcp # Or just 8000 internally + nginx on 9090 sudo ufw allow 9090/tcp # nginx # Port 8000 internal nur für nginx ``` ### Setup Reverse Proxy (Optional) ```bash # nginx example: sudo tee /etc/nginx/sites-available/zmb-webui > /dev/null <