Maschinenraum/cp.uugrn.org: Unterschied zwischen den Versionen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 2: | Zeile 2: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Bereich | |||
! | |||
| ! Wert | | |||
| --------------------------- | | |||
| URL | | |||
| https://cp.uugrn.org | | | https://cp.uugrn.org | | ||
| -- | | - | | ||
| | | Sandbox | | ||
| https://sandboxcp.uugrn.org | | |||
| - | | |||
| Betriebssystem | | |||
| Debian 13.6 (Trixie) | | | Debian 13.6 (Trixie) | | ||
| - | | | - | | ||
| | | CryptPad | | ||
| | | v2026.5.1 | | ||
| - | | | - | | ||
| | | nginx | | ||
| | | 1.30.4 | | ||
| - | | | - | | ||
| | | Node.js | | ||
| 24.18.1 | | | 24.18.1 | | ||
| - | | | - | | ||
| | | Installation | | ||
| | | /home/cryptpad/cryptpad | | ||
| - | | |||
| Dienstbenutzer | | |||
| cryptpad | | |||
| } | | | } | | ||
CryptPad dient zur verschlüsselten gemeinsamen Bearbeitung von Dokumenten. Der öffentliche Zugriff erfolgt über nginx. CryptPad selbst ist nur über Loopback erreichbar. | |||
CryptPad | |||
Der öffentliche Zugriff erfolgt | |||
CryptPad | |||
**TOC** | |||
== Betrieb == | |||
Wichtige Dienste: | |||
* CryptPad: systemctl status cryptpad | |||
systemctl status cryptpad | * nginx: systemctl status nginx | ||
systemctl status nginx | * SSH: systemctl status ssh | ||
systemctl status ssh | * Firewall: systemctl status nftables | ||
systemctl status nftables | * Fail2ban: systemctl status fail2ban | ||
systemctl status fail2ban | * Fehlerhafte Dienste: systemctl --failed | ||
CryptPad | CryptPad: | ||
* Starten: systemctl start cryptpad | |||
systemctl restart cryptpad | * Stoppen: systemctl stop cryptpad | ||
* Neustarten: systemctl restart cryptpad | |||
* Log anzeigen: journalctl -u cryptpad -f | |||
nginx | nginx: | ||
* Konfiguration prüfen: nginx -t | |||
nginx -t | * Konfiguration neu laden: systemctl reload nginx | ||
systemctl reload nginx | |||
Diagnose: | |||
* https://cp.uugrn.org/checkup/ | |||
== SSH == | == SSH == | ||
Administrativer Benutzer: | Administrativer Benutzer: adminBenutzer | ||
adminBenutzer | |||
Anmeldung: | Anmeldung: | ||
* ssh -4 -i ~/.ssh/ssh-rsa-private-4096-key [adminBenutzer@cp.uugrn.org](mailto:adminBenutzer@cp.uugrn.org) | |||
ssh -4 -i ~/.ssh/ssh-rsa-private-4096-key adminBenutzer@cp.uugrn.org | * anschließend sudo -i | ||
sudo -i | |||
Härtung: | |||
LoginGraceTime 30 | * direkter Root-Login deaktiviert | ||
MaxAuthTries 3 | * Passwort-Login deaktiviert | ||
MaxStartups 10:30:30 | * ausschließlich Public-Key-Authentifizierung | ||
PerSourceMaxStartups 3 | * SSH nur für Mitglieder der Gruppe sshusers | ||
* LoginGraceTime 30 | |||
* MaxAuthTries 3 | |||
* MaxStartups 10:30:30 | |||
* PerSourceMaxStartups 3 | |||
Prüfung: | Prüfung: | ||
* sshd -t | |||
sshd -t | * sshd -T | ||
sshd -T | |||
== Firewall == | == Netzwerk und Firewall == | ||
{| class="wikitable" | |||
! Port | |||
| ! Dienst | | |||
/ | | -------- | | ||
| 22/tcp | | |||
| SSH | | |||
| - | | |||
| 80/tcp | | |||
| HTTP | | |||
| - | | |||
| 443/tcp | | |||
| HTTPS | | |||
| } | | |||
CryptPad lauscht intern auf Loopback, unter anderem auf Port 3000 und 3003. | |||
nftables: | |||
* Konfiguration: /etc/nftables.conf | |||
* Regeln anzeigen: nft list ruleset | |||
* Tabellen anzeigen: nft list tables | |||
Standardrichtlinien: | |||
* INPUT DROP | |||
* FORWARD DROP | |||
* OUTPUT ACCEPT | |||
Zusätzlich erlaubt sind Loopback, bestehende Verbindungen, ICMP, ICMPv6 und DHCPv4. | |||
== Fail2ban == | == Fail2ban == | ||
| Zeile 158: | Zeile 124: | ||
Konfiguration: | Konfiguration: | ||
* /etc/fail2ban/jail.d/sshd.local | |||
/etc/fail2ban/jail.d/sshd.local | |||
SSH-Jail: | SSH-Jail: | ||
* 4 Fehlversuche innerhalb von 10 Minuten | |||
* Sperrdauer 1 Stunde | |||
* Backend systemd | |||
* Sperren über nftables | |||
* DNS-Auflösung deaktiviert | |||
Status: | Status: | ||
* fail2ban-client status sshd | |||
fail2ban-client status sshd | |||
nftables enthält | nftables enthält normalerweise: | ||
* table inet filter | |||
table inet f2b-table | * table inet f2b-table | ||
Nach einem manuellen Neustart von nftables | Nach einem manuellen Neustart von nftables: | ||
# systemctl restart nftables | |||
systemctl restart nftables | |||
systemctl restart fail2ban | # systemctl restart fail2ban | ||
== Updates == | == Updates == | ||
Debian-Sicherheitsupdates werden automatisch | Debian-Sicherheitsupdates werden automatisch mit unattended-upgrades installiert. | ||
Nicht automatisch aktualisiert werden: | Nicht automatisch aktualisiert werden: | ||
* normale Debian-Updates | * normale Debian-Updates | ||
* Node.js | * Node.js | ||
* nginx | * nginx | ||
* CryptPad | * CryptPad | ||
| Zeile 204: | Zeile 162: | ||
Automatische Neustarts sind deaktiviert. | Automatische Neustarts sind deaktiviert. | ||
Manuelle Kontrolle: | |||
* apt update | |||
* apt list --upgradable | |||
* unattended-upgrade --dry-run | |||
Neustart erforderlich: | |||
* test -f /var/run/reboot-required && cat /var/run/reboot-required | |||
== CryptPad aktualisieren == | |||
Vor einem Update: | |||
# Release Notes lesen. | |||
# Wartung ankündigen. | |||
# Backup mit /root/sichercp erstellen. | |||
# CryptPad stoppen. | |||
# Update durchführen. | |||
# CryptPad starten. | |||
# Funktion prüfen. | |||
Update: | |||
# systemctl stop cryptpad | |||
# su - cryptpad | |||
# cd /home/cryptpad/cryptpad | |||
# git fetch --depth 1 origin tag VERSION | |||
# git checkout VERSION | |||
# npm ci | |||
# npm run install:components | |||
# ./install-onlyoffice.sh | |||
# exit | |||
# systemctl start cryptpad | |||
Anschließend prüfen: | |||
* systemctl status cryptpad | |||
* journalctl -u cryptpad -n 100 | |||
* https://cp.uugrn.org/checkup/ | |||
/ | |||
Zusätzlich Anmeldung, Pads, Datei-Upload und OnlyOffice testen. | |||
== Backup == | == Backup == | ||
| Zeile 240: | Zeile 224: | ||
Backup-Skript: | Backup-Skript: | ||
* /root/sichercp | |||
/root/sichercp | |||
Backup-Verzeichnis: | |||
* /root/backups/ | |||
/root/backups | |||
Aufbewahrung: | Aufbewahrung: | ||
* 180 Tage | |||
180 Tage | |||
Gesichert werden: | Gesichert werden: | ||
* | * data/ | ||
* | * datastore/ | ||
* | * block/ | ||
* blob/ | |||
* config/config.js | |||
* customize/ | |||
* onlyoffice-conf/ | |||
* nginx-Konfiguration | * nginx-Konfiguration | ||
* SSH-Konfiguration | * SSH-Konfiguration | ||
| Zeile 273: | Zeile 253: | ||
Nicht gesichert werden reproduzierbare Daten: | Nicht gesichert werden reproduzierbare Daten: | ||
* .git/ | |||
.git | * node_modules/ | ||
node_modules | * www/ | ||
www | * OnlyOffice-Distribution | ||
Backup starten: | Backup starten: | ||
* /root/sichercp | |||
/root/sichercp | |||
Backups anzeigen: | Backups anzeigen: | ||
* ls -lh /root/backups/ | |||
ls -lh /root/backups | |||
Die Backups liegen derzeit nur lokal auf dem Server. Gegen einen vollständigen Verlust der VM besteht damit noch kein Schutz. | |||
== Restore == | == Restore == | ||
| Zeile 298: | Zeile 272: | ||
Backup testweise entpacken: | Backup testweise entpacken: | ||
# BACKUP=$(ls -1t /root/backups/cp-backup-*.tar.gz | head -1) | |||
BACKUP=$(ls -1t /root/backups/cp-backup-*.tar.gz | head -1) | |||
mkdir -p /root/restore-test | # mkdir -p /root/restore-test | ||
tar | # tar --acls --xattrs --numeric-owner -C /root/restore-test -xzf "$BACKUP" | ||
Nach der Kontrolle: | |||
# rm -rf /root/restore-test | |||
rm -rf /root/restore-test | |||
=== Notfall-Restore === | |||
Bei vollständigem Serververlust: | |||
# | # Debian 13 installieren. | ||
# | # Node.js 24, nginx und CryptPad in passender Version installieren. | ||
# | # npm-Abhängigkeiten und OnlyOffice installieren. | ||
# | # CryptPad stoppen. | ||
# | # CryptPad-Daten aus dem Backup zurückspielen. | ||
# | # Besitzer cryptpad:cryptpad prüfen. | ||
# | # Serverkonfiguration wiederherstellen. | ||
# | # Dienste starten. | ||
# CryptPad vollständig testen. | |||
== Wichtige Pfade == | |||
{| class="wikitable" | |||
! Bereich | |||
| ! Pfad | | |||
| ---------------------------------------- | | |||
| CryptPad | | |||
| /home/cryptpad/cryptpad | | |||
| - | | |||
| Konfiguration | | |||
| /home/cryptpad/cryptpad/config/config.js | | |||
| - | | |||
| Anpassungen | | |||
| /home/cryptpad/cryptpad/customize/ | | |||
| - | | |||
| nginx | | |||
| /etc/nginx/ | | |||
| - | | |||
| SSH | | |||
| /etc/ssh/ | | |||
| - | | |||
| Firewall | | |||
| /etc/nftables.conf | | |||
| - | | |||
| Fail2ban | | |||
| /etc/fail2ban/ | | |||
| - | | |||
| Backup-Skript | | |||
| /root/sichercp | | |||
| - | | |||
| Backups | | |||
| /root/backups/ | | |||
| } | | |||
== Regelmäßige Kontrolle == | |||
* Dienste: systemctl --failed | |||
* Ports: ss -lntup | |||
* Firewall: nft list ruleset | |||
* Fail2ban: fail2ban-client status sshd | |||
* Updates: apt list --upgradable | |||
* Speicherplatz: df -h | |||
* Warnungen: journalctl -p warning..alert --since today | |||
== | == Dokumentation == | ||
* [https://docs.cryptpad.org/en/admin_guide/ CryptPad Admin Guide] | |||
* [https://docs.cryptpad.org/en/admin_guide/maintenance.html CryptPad Wartung] | |||
* [https://github.com/cryptpad/cryptpad/releases CryptPad Releases] | |||
* [https://forum.cryptpad.org/ CryptPad Forum] | |||
Version vom 2. August 2026, 10:54 Uhr
cp.uugrn.org
| Bereich |
CryptPad dient zur verschlüsselten gemeinsamen Bearbeitung von Dokumenten. Der öffentliche Zugriff erfolgt über nginx. CryptPad selbst ist nur über Loopback erreichbar.
BetriebWichtige Dienste:
CryptPad:
nginx:
Diagnose: SSHAdministrativer Benutzer: adminBenutzer Anmeldung:
Härtung:
Prüfung:
Netzwerk und Firewall
|
|---|