# Setup Guide ## Prerequisites - **OS**: Debian 12, Ubuntu 22.04+, or Proxmox LXC - **RAM**: 4GB minimum (8GB recommended for IDE) - **Storage**: 20GB free space - **Network**: Internet access for API calls ## Quick Install ```bash # 1. Clone from your Gitea git clone https://gitea.yourdomain.com/username/llm-hub.git cd llm-hub # 2. Run setup chmod +x setup.sh && ./setup.sh # 3. Configure API keys nano .env # 4. Start ./start.sh full ``` ## Proxmox LXC Setup On Proxmox host, create optimized container: ```bash pct create 100 local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst \ --hostname llm-hub \ --memory 8192 \ --swap 1024 \ --cores 4 \ --rootfs local-lvm:20 \ --features nesting=1,keyctl=1 \ --net0 name=eth0,bridge=vmbr0,ip=dhcp # Add to /etc/pve/lxc/100.conf: cat >> /etc/pve/lxc/100.conf << EOF lxc.cgroup.relative = 0 lxc.apparmor.profile = unconfined lxc.cgroup.devices.allow = a EOF pct start 100 pct exec 100 -- bash -c "apt update && apt install -y curl git && curl -fsSL setup.sh | bash" ``` ## Configuration Edit `.env` file: ```bash # Required: At least one LLM provider GROQ_API_KEY_1=gsk_xxx MISTRAL_API_KEY=your_key # Recommended: Multiple providers for redundancy ANTHROPIC_API_KEY=sk-ant-xxx MOONSHOT_API_KEY=sk-xxx OPENROUTER_API_KEY=sk-or-xxx # UI Security IDE_PASSWORD=strong-password-here ``` ## Verification ```bash # Check health curl http://localhost:8080/health # Test agent curl -X POST http://localhost:8080/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-agent-xxx" \ -d '{"message":"Hello","reasoning_mode":"react"}' ``` ## Troubleshooting **Docker not starting in LXC:** ```bash # On Proxmox host, check config pct config 100 | grep features # Should show: features: nesting=1,keyctl=1 ``` **Permission denied on workspace:** ```bash chown -R 1000:1000 workspace/ ``` **Port conflicts:** Edit `docker-compose.yml` to change port mappings (e.g., `8081:8080`)