nextcloud:notify_push
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| nextcloud:notify_push [2026/07/27 09:23] – [1. Platzhalter festlegen] franz | nextcloud:notify_push [2026/07/27 10:18] (aktuell) – [11. Client prüfen] franz | ||
|---|---|---|---|
| Zeile 106: | Zeile 106: | ||
| </ | </ | ||
| ===== 3. Compose Service ergänzen ===== | ===== 3. Compose Service ergänzen ===== | ||
| + | |||
| + | Der Push-Daemon wird als eigener Service im bestehenden Nextcloud-Projekt betrieben. | ||
| + | |||
| + | < | ||
| + | |||
| + | Wichtig: Port '' | ||
| + | |||
| + | </ | ||
| + | |||
| + | Unter dem Nextcloud-Service darf nur der Web-Port stehen, zum Beispiel: | ||
| + | |||
| + | < | ||
| + | services: | ||
| + | app: | ||
| + | ports: | ||
| + | - " | ||
| + | |||
| + | </ | ||
| + | ==== 3.2. Dienst mit notify_push ==== | ||
| + | |||
| + | Den folgenden Service auf derselben Ebene wie '' | ||
| + | < | ||
| + | services: | ||
| + | notify_push: | ||
| + | image: < | ||
| + | container_name: | ||
| + | restart: unless-stopped | ||
| + | user: www-data | ||
| + | |||
| + | entrypoint: | ||
| + | - / | ||
| + | |||
| + | command: | ||
| + | - / | ||
| + | |||
| + | environment: | ||
| + | PORT: " | ||
| + | NEXTCLOUD_URL: | ||
| + | TZ: " | ||
| + | |||
| + | depends_on: | ||
| + | - < | ||
| + | - db | ||
| + | - redis | ||
| + | |||
| + | networks: | ||
| + | - < | ||
| + | |||
| + | ports: | ||
| + | - " | ||
| + | |||
| + | volumes: | ||
| + | - nextcloud:/ | ||
| + | - ./ | ||
| + | - ./ | ||
| + | - / | ||
| + | |||
| + | secrets: | ||
| + | - db_user_password | ||
| + | - smtp_password | ||
| + | |||
| + | </ | ||
| + | ==== 3.3. Volume Section anpassen ==== | ||
| + | |||
| + | Die Volume-Namen und Bind-Mounts müssen zum vorhandenen '' | ||
| + | |||
| + | Den App-Service anzeigen: | ||
| + | |||
| + | < | ||
| + | docker compose config | sed -n \ | ||
| + | '/ | ||
| + | |||
| + | </ | ||
| + | |||
| + | Mindestens erforderlich sind normalerweise: | ||
| + | |||
| + | * Zugriff auf ''/ | ||
| + | * Zugriff auf ''/ | ||
| + | * Zugriff auf das Nextcloud-Volume, | ||
| + | * dieselben Secrets, sofern '' | ||
| + | * dasselbe Docker-Netzwerk wie Nextcloud, Datenbank und Redis | ||
| + | |||
| + | Die Mounts im Push-Service können schreibgeschützt ('': | ||
| + | |||
| + | |||
| + | ===== 4. Compose Konfiguration prüfen und starten ===== | ||
| + | |||
| + | Syntax prüfen | ||
| + | |||
| + | < | ||
| + | cd < | ||
| + | docker compose config --quiet | ||
| + | |||
| + | </ | ||
| + | |||
| + | Dienste anzeigen | ||
| + | |||
| + | < | ||
| + | docker compose config --services | ||
| + | |||
| + | </ | ||
| + | |||
| + | '' | ||
| + | |||
| + | Container erstellen | ||
| + | |||
| + | < | ||
| + | docker compose up -d --force-recreate notify_push | ||
| + | |||
| + | </ | ||
| + | |||
| + | Status prüfen | ||
| + | |||
| + | < | ||
| + | docker compose ps notify_push | ||
| + | |||
| + | </ | ||
| + | |||
| + | erwartet wird | ||
| + | |||
| + | STATUS: Up\\ | ||
| + | PORTS: 127.0.0.1: | ||
| + | |||
| + | eventuell logs prüfen | ||
| + | |||
| + | < | ||
| + | docker compose logs --tail=100 notify_push | ||
| + | |||
| + | </ | ||
| + | |||
| + | Bei '' | ||
| + | < | ||
| + | docker compose ps -a notify_push | ||
| + | docker compose logs --tail=200 notify_push | ||
| + | |||
| + | </ | ||
| + | ===== 5. Apache Reverse-Proxy konfigurieren ===== | ||
| + | |||
| + | Im HTTPS-VirtualHost der betreffenden Nextcloud-Domain müssen die Push-Regeln **vor** einer allgemeinen '' | ||
| + | |||
| + | Beispiel:\\ | ||
| + | < | ||
| + | < | ||
| + | ServerName < | ||
| + | |||
| + | ProxyPreserveHost On | ||
| + | |||
| + | # Nextcloud Client Push | ||
| + | ProxyPass | ||
| + | ProxyPass | ||
| + | ProxyPassReverse / | ||
| + | |||
| + | # Nextcloud | ||
| + | ProxyPass | ||
| + | ProxyPassReverse / http:// | ||
| + | |||
| + | # Bestehende TLS-, Header- und Zertifikatskonfiguration | ||
| + | # bleibt unverändert. | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | Die Reihenfolge ist wichtig!! | ||
| + | |||
| + | < | ||
| + | ProxyPass /push/ ... | ||
| + | ProxyPass / ... | ||
| + | |||
| + | </ | ||
| + | ==== 5.1. Apache Module prüfen ==== | ||
| + | |||
| + | < | ||
| + | sudo a2enmod proxy proxy_http proxy_wstunnel headers | ||
| + | |||
| + | </ | ||
| + | |||
| + | Konfiguration prüfen | ||
| + | |||
| + | < | ||
| + | sudo apachectl configtest | ||
| + | |||
| + | </ | ||
| + | |||
| + | bei erfolgreichem Test | ||
| + | |||
| + | < | ||
| + | sudo systemctl reload apache2 | ||
| + | |||
| + | </ | ||
| + | |||
| + | aktiven virtual-host prüfen | ||
| + | |||
| + | < | ||
| + | sudo systemctl reload apache2 | ||
| + | |||
| + | </ | ||
| + | |||
| + | Push Regeln suchen | ||
| + | |||
| + | < | ||
| + | sudo grep -RniE \ | ||
| + | ' | ||
| + | / | ||
| + | |||
| + | </ | ||
| + | ===== 6. Docker-Netz als vertrauenswürdigen Proxy eintragen ===== | ||
| + | |||
| + | Der Push-Container ruft Nextcloud intern über den Service-Namen auf: | ||
| + | |||
| + | < | ||
| + | NEXTCLOUD_URL: | ||
| + | |||
| + | </ | ||
| + | |||
| + | Nextcloud muss daher: | ||
| + | |||
| + | - das interne Docker-Netz als Proxy vertrauen und | ||
| + | - den internen Service-Namen als Domain akzeptieren. | ||
| + | |||
| + | ==== 6.1 Docker-Netzwerk und Subnetz ermitteln ==== | ||
| + | |||
| + | < | ||
| + | NETWORK=$(docker inspect < | ||
| + | --format ' | ||
| + | |||
| + | SUBNET=$(docker network inspect " | ||
| + | --format ' | ||
| + | |||
| + | echo " | ||
| + | echo " | ||
| + | |||
| + | </ | ||
| + | |||
| + | Beispiel: | ||
| + | |||
| + | Netzwerk: privat_privat-network \\ Subnetz: | ||
| + | |||
| + | ==== 6.2 Bestehende Proxy-Einträge prüfen ==== | ||
| + | |||
| + | < | ||
| + | docker compose exec -u www-data < | ||
| + | config: | ||
| + | |||
| + | </ | ||
| + | |||
| + | Beispiel: | ||
| + | |||
| + | 127.0.0.1 | ||
| + | |||
| + | ==== 6.3 Docker-Subnetz ergänzen ==== | ||
| + | |||
| + | Den nächsten freien Index verwenden: | ||
| + | |||
| + | < | ||
| + | docker compose exec -u www-data < | ||
| + | config: | ||
| + | |||
| + | </ | ||
| + | |||
| + | Kontrolle | ||
| + | |||
| + | < | ||
| + | docker compose exec -u www-data < | ||
| + | config: | ||
| + | |||
| + | </ | ||
| + | |||
| + | erwartet wird beispielsweise | ||
| + | |||
| + | 127.0.0.1 \\ 172.29.0.0/ | ||
| + | |||
| + | **Nur kontrollierte Proxy-Adressen oder interne Docker-Netze eintragen. Vertrauenswürdige Proxys dürfen die von Nextcloud erkannte Client-IP beeinflussen.** | ||
| + | |||
| + | ===== 7. Internen Service-Namen als Trusted Domain eintragen ===== | ||
| + | |||
| + | Vorhandene Einträge prüfen | ||
| + | |||
| + | < | ||
| + | docker compose exec -u www-data < | ||
| + | config: | ||
| + | |||
| + | </ | ||
| + | |||
| + | Den Service-Namen mit dem nächsten freien Index ergänzen: | ||
| + | |||
| + | < | ||
| + | docker compose exec -u www-data < | ||
| + | config: | ||
| + | |||
| + | </ | ||
| + | |||
| + | Kontrolle | ||
| + | |||
| + | < | ||
| + | docker compose exec -u www-data < | ||
| + | config: | ||
| + | |||
| + | </ | ||
| + | ===== 8. Verbindung testen ===== | ||
| + | |||
| + | ==== 8.1 Containerstatus ==== | ||
| + | |||
| + | < | ||
| + | docker compose ps notify_push | ||
| + | docker compose logs --tail=100 notify_push | ||
| + | |||
| + | </ | ||
| + | ==== 8.2 Lokaler Port ==== | ||
| + | |||
| + | < | ||
| + | curl -i http:// | ||
| + | |||
| + | </ | ||
| + | |||
| + | eine Antwort wie | ||
| + | |||
| + | HTTP/1.1 400 Bad Request | ||
| + | |||
| + | ist bei einem direkten Aufruf über '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | * Container läuft nicht, | ||
| + | * Container startet ständig neu, | ||
| + | * Port ist nicht veröffentlicht oder | ||
| + | * kein Prozess lauscht im Container auf Port '' | ||
| + | |||
| + | ==== 8.3 Öffentlicher Pfad ==== | ||
| + | |||
| + | < | ||
| + | curl -i https://< | ||
| + | |||
| + | </ | ||
| + | ===== 9. | ||
| + | |||
| + | Setup über den öffentlichen Push-Endpunkt ausführen: | ||
| + | |||
| + | < | ||
| + | docker compose exec -u www-data < | ||
| + | notify_push: | ||
| + | |||
| + | </ | ||
| + | |||
| + | erwartetes Ergebnis | ||
| + | |||
| + | ✓ redis is configured \\ ✓ push server is receiving redis messages \\ ✓ push server can load mount info from database \\ ✓ push server can connect to the Nextcloud server \\ ✓ push server is a trusted proxy \\ ✓ push server is running the same version as the app \\ configuration saved | ||
| + | |||
| + | Gespeicherten Endpunkt prüfen: | ||
| + | |||
| + | < | ||
| + | docker compose exec -u www-data < | ||
| + | config: | ||
| + | |||
| + | </ | ||
| + | |||
| + | erwartet wird | ||
| + | |||
| + | https://< | ||
| + | |||
| + | ===== 10. Firewall ===== | ||
| + | |||
| + | Port '' | ||
| + | |||
| + | < | ||
| + | ports: | ||
| + | - " | ||
| + | |||
| + | </ | ||
| + | |||
| + | Daher ist keine öffentliche UFW-Freigabe nötig. | ||
| + | |||
| + | ===== 11. Client prüfen ===== | ||
| + | |||
| + | Nach erfolgreichem Setup: | ||
| + | |||
| + | - Nextcloud Desktop oder Nextcloud Talk Desktop vollständig abmelden. | ||
| + | - Client auch im Infobereich beziehungsweise Tray beenden. | ||
| + | - Client neu starten. | ||
| + | - Konto erneut anmelden. | ||
| + | - Diagnose prüfen. | ||
| + | |||
| + | Die Diagnose sollte nicht mehr melden: | ||
| + | |||
| + | < | ||
| + | notify_push app enabled = no | ||
| + | |||
| + | </ | ||
| + | |||
| + | Metriken des Push-Dienstes prüfen: | ||
| + | |||
| + | < | ||
| + | docker compose exec -u www-data < | ||
| + | notify_push: | ||
| + | |||
| + | </ | ||
nextcloud/notify_push.1785137014.txt.gz · Zuletzt geändert: von franz