# Appwrite Self-Hosted Konfiguration Deine Appwrite-Instanz läuft auf einer eigenen Domain mit Version 1.5.7. ## Konfiguration ### Endpoint - **URL**: `https://appwrite.webklar.com/v1` - **Version**: 1.5.7 ### .env Datei ```env VITE_APPWRITE_ENDPOINT=https://appwrite.webklar.com/v1 VITE_APPWRITE_PROJECT_ID=693d9f37000b35267f1b VITE_APPWRITE_DATABASE_ID=6943bf0e0003291f8c35 ``` ## Wichtige Unterschiede zu Appwrite Cloud ### 1. Platform-Konfiguration Bei selbst gehosteten Instanzen muss die Platform möglicherweise anders konfiguriert werden: 1. Gehe zu deinem Appwrite Dashboard: `https://appwrite.webklar.com` 2. Öffne dein Projekt **woms** 3. Gehe zu **Settings** → **Platforms** 4. Füge eine **Web App** Platform hinzu 5. Wichtig: Füge die folgenden Hosts hinzu: - `localhost` - `127.0.0.1` - Deine Produktions-Domain (falls vorhanden) ### 2. CORS-Einstellungen Stelle sicher, dass CORS für deine Domain konfiguriert ist: - `http://localhost:5173` (Development) - Deine Produktions-Domain ### 3. SSL-Zertifikat Stelle sicher, dass `https://appwrite.webklar.com` ein gültiges SSL-Zertifikat hat. ## API-Kompatibilität Appwrite 1.5.7 sollte mit dem Appwrite SDK 13.0 kompatibel sein. Die verwendeten Methoden: - `account.createEmailSession(email, password)` - für Login - `account.create(ID.unique(), email, password, name)` - für Registrierung - `account.get()` - für Session-Check ## Fehlerbehebung ### "Project with the requested ID could not be found" 1. Überprüfe, ob die Platform konfiguriert ist (siehe oben) 2. Überprüfe, ob CORS korrekt konfiguriert ist 3. Überprüfe die Project ID nochmal im Dashboard ### CORS-Fehler Wenn du CORS-Fehler siehst: 1. Überprüfe die CORS-Einstellungen in deiner Appwrite-Konfiguration 2. Stelle sicher, dass `localhost:5173` erlaubt ist ### SSL-Zertifikat-Fehler Wenn es SSL-Probleme gibt: 1. Überprüfe, ob das Zertifikat gültig ist 2. Stelle sicher, dass die Domain korrekt konfiguriert ist ## Dev-Server neu starten Nach Änderungen an der `.env` Datei: ```bash # Stoppe den Server (Ctrl+C) npm run dev ``` ## Testen 1. Öffne die App: `http://localhost:5173` 2. Überprüfe die Browser-Konsole - du solltest sehen: ``` 🔧 Appwrite Konfiguration: Endpoint: https://appwrite.webklar.com/v1 Project ID: 693d9f37000b35267f1b Database ID: 6943bf0e0003291f8c35 ``` 3. Versuche dich zu registrieren oder einzuloggen Viel Erfolg! 🚀