Nextcloud: Unterschied zwischen den Versionen

aus www.kruedewagen.de, Homepage von Ralf und Judith Krüdewagen (Kruedewagen)
Zur Navigation springen Zur Suche springen
 
(22 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 12: Zeile 12:
*https://docs.nextcloud.org
*https://docs.nextcloud.org
*https://help.nextcloud.com
*https://help.nextcloud.com
*Version scannen: https://scan.nextcloud.com


Apps:
Apps:
Zeile 36: Zeile 37:
*[https://www.collaboraoffice.com/code/ CODE]
*[https://www.collaboraoffice.com/code/ CODE]
*https://hub.docker.com/r/collabora/code/
*https://hub.docker.com/r/collabora/code/
*https://help.nextcloud.com/t/nextcloud-collabora-integration/151879
*siehe iX 02/17 S.54
*siehe iX 02/17 S.54
*https://nextcloud.com/blog/how-to-install-collabora-online-in-nextcloud-hub/
*https://nextcloud.com/blog/how-to-install-collabora-online-in-nextcloud-hub/
*https://collabora-online-for-nextcloud.readthedocs.io/en/latest/install/
*https://sdk.collaboraonline.com/docs/installation/CODE_Docker_image.html


Tipps:
Tipps:
*Nach Update muss man manchmal die Einstellung der URL in "Collabora Online Server" erneut speichern.
*Nach Update muss man manchmal die Einstellung der URL in "Collabora Online Server" erneut speichern.
Release Notes:
*https://www.collaboraoffice.com/code-22-05-release-notes/ (CODE)
*https://www.collaboraoffice.com/collabora-online-22-05-release-notes/


== Only Office ==
== Only Office ==
Zeile 72: Zeile 80:
*Group Folders: Für gemeinsame Verzeichnisstruktur, siehe c't 11/20 S.129
*Group Folders: Für gemeinsame Verzeichnisstruktur, siehe c't 11/20 S.129
*Umfragen mit Nextcloud Forms: https://www.heise.de/news/Wie-Google-Forms-aber-mit-Privatsphaere-Nextcloud-veroeffentlicht-Umfrage-Tool-4855836.html
*Umfragen mit Nextcloud Forms: https://www.heise.de/news/Wie-Google-Forms-aber-mit-Privatsphaere-Nextcloud-veroeffentlicht-Umfrage-Tool-4855836.html
*Authentifizierung mit dem elektronischen Personalausweis
**[https://nextcloud.com/blog/german-government-supports-authentication-with-identity-card-in-nextcloud/ German government supports authentication with identity card in Nextcloud]
*Collectives (Wiki mit Markdown)
**https://apps.nextcloud.com/apps/collectives
**https://gitlab.com/collectivecloud/collectives
**https://collectivecloud.gitlab.io/collectives/
*[https://apps.nextcloud.com/apps/integration_mattermost Mattermost Integration] App: Files in Mattermost Channel senden
**[https://nextcloud.com/blog/introducing-the-nextcloud-and-mattermost-integration/ Introducing the Nextcloud and Mattermost Integration!]


== Tipps und Tricks ==
== Tipps und Tricks ==
*[https://nextcloud.com/blog/5-features-in-nextcloud-talk-you-didnt-know-about/ 5 features in Nextcloud Talk you didn’t know about]
=== URL ändern ===
=== URL ändern ===
*Verzeichnis im DocumentRoot anpassen
*Verzeichnis im DocumentRoot anpassen
Zeile 90: Zeile 108:
  https://example.com/nextcloud/remote.php/dav/calendars/<username>/<calendarname>/
  https://example.com/nextcloud/remote.php/dav/calendars/<username>/<calendarname>/
  https://example.com/nextcloud/remote.php/dav/addressbooks/users/<username>/<addressbookname>/
  https://example.com/nextcloud/remote.php/dav/addressbooks/users/<username>/<addressbookname>/
*[https://www.heise.de/ratgeber/Nextcloud-Kalender-in-ein-Android-Widget-integrieren-9323020.html Nextcloud-Kalender in ein Android-Widget integrieren | heise online] - Anzeige der Termine mittels jCal, c't 24/23 S.134, [[ct:yued]]
=== Google Kalender ===
*https://github.com/nextcloud/calendar/issues/2766
*https://github.com/pimutils/vdirsyncer


=== WebDAV ===
=== WebDAV ===
  https://example.com/nextcloud
  https://example.com/nextcloud
  https://example.com/nextcloud/remote.php/dav/files/<USERNAME>/
  https://example.com/nextcloud/remote.php/dav/files/<USERNAME>/
=== Update ===
*https://docs.nextcloud.com/server/21/admin_manual/maintenance/update.html
sudo -u wwwrun php updater/updater.phar
*Update Channel in config.php
'updater.release.channel' => 'beta'
=== Downgrade einer App ===
Beispiel "Nextcloud Office":
* Die betreffende App in Nextcloud UI deaktivieren
* Bestehende App entfernen
cd apps/
rm -rf richdocuments
* App herunterladen
wget https://github.com/nextcloud-releases/richdocuments/releases/download/v5.0.1/richdocuments-v5.0.1.tar.gz
* App entpacken, Owner setzen und Download-Paket entfernen
tar zxvf richdocuments-v5.0.1.tar.gz
chown -R wwwrun:www richdocuments
rm richdocuments-v5.0.1.tar.gz
* Die betreffende App in Nextcloud UI aktivieren
=== PHP Performance ===
*https://docs.nextcloud.com/server/22/admin_manual/configuration_server/caching_configuration.html
*https://docs.nextcloud.com/server/22/admin_manual/installation/server_tuning.html
==== PHP-FPM ====
Werte weit über Default setzen: https://spot13.com/pmcalculator/
==== Caching ====
*Opcache mit PHP-FPM
/etc/php7/fpm/php.ini
*APCu
zypper in php7-APCu
/etc/php7/conf.d/apcu.ini
Prüfen:
phpinfo();
=== Chaching mit redis ===
*Infos zu Cheching in Nextcloud mit redis
**https://docs.nextcloud.com/server/28/admin_manual/configuration_files/files_locking_transactional.html
**https://docs.nextcloud.com/server/28/admin_manual/configuration_server/caching_configuration.html
**Filelocking Cache: Für Locking von Dateien bei Operationen mit Dateien im Filestore von Nextcloud
**Distributed Server Cache: Für Webserver-Dateien wie SVGs der Weboberfläche
**Local cache: Für Objekte wie Dateien im Benutzer-Filestore von Nextcloud
*Redis installieren
zypper in redis php8-redis
systemctl enable redis@default
*Redis konfigurieren (Unix Socket statt TCP [https://ask.linuxmuster.net/t/nextcloud-mit-redis-als-unix-socket-geht-nicht/5602],[https://guides.wp-bullet.com/how-to-configure-redis-to-use-unix-socket-speed-boost/])
vi /etc/redis/default.conf
unixsocket /run/redis/redis.sock
unixsocketperm 770
*Socket Verzeichnis erstellen
mkdir /run/redis
chown redis:redis /run/redis
*Webserver-User in Gruppe "redis" aufnehmen
vi /etc/group
redis:x:453:wwwrun
*Redis starten
systemctl start redis@default
*Redis prüfen
systemctl status redis@default
*Logdatei prüfen
less /var/log/redis/default.log
*Nextcloud konfigurieren (nur Filelocking)
<pre>
'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
      ),
</pre>
*Nextcloud konfigurieren (Filelocking + distributed server cache)
<pre>
'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'memcache.distributed' => '\OC\Memcache\Redis',
'redis' => array(
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
      ),
</pre>
*Nextcloud konfigurieren (Filelocking + distributed server cache + local cache)
<pre>
'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.local' =>'\OC\Memcache\Redis',
'redis' => array(
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
      ),
</pre>
*Nextcloud Systemlog prüfen
*Redis Aktivitäten prüfen (bei Dateiaktivitäten) [https://help.nextcloud.com/t/how-to-check-if-redis-is-used-in-nc/22268/9]
redis-cli -s /run/redis/redis.sock MONITOR
redis-cli -s /run/redis/redis.sock KEYS "*"
*Regelmäßige Dumps bzw. Snapshots im Filesystem [https://stackoverflow.com/questions/28785383/how-to-disable-persistence-with-redis]:
/var/lib/redis/default/dump.rdb
*Laden der Snapshots nach Restart prüfen im Log (hier 326 Keys mit 1,59 MByte):
<pre>
28151:C 03 Apr 2024 10:46:40.982 * Configuration loaded
28151:M 03 Apr 2024 10:46:40.982 * monotonic clock: POSIX clock_gettime
28151:M 03 Apr 2024 10:46:40.982 * Running mode=standalone, port=0.
28151:M 03 Apr 2024 10:46:40.983 * Server initialized
28151:M 03 Apr 2024 10:46:40.983 * Loading RDB produced by version 7.2.4
28151:M 03 Apr 2024 10:46:40.983 * RDB age 0 seconds
28151:M 03 Apr 2024 10:46:40.983 * RDB memory usage when created 1.59 Mb
28151:M 03 Apr 2024 10:46:40.983 * Done loading RDB, keys loaded: 326, keys expired: 0.
28151:M 03 Apr 2024 10:46:40.983 * DB loaded from disk: 0.001 seconds
28151:M 03 Apr 2024 10:46:40.983 * Ready to accept connections unix
</pre>


== Sicherheit ==
== Sicherheit ==

Aktuelle Version vom 3. April 2024, 08:50 Uhr

Nextcloud ist ein Fork von ownCloud und dient vorrangig als Cloud-Speicherdienst für den eigenen Server.

Nextcloud Infos

Migration von Owncloud:

Homepage und Support:

Apps:

Artikel:

Collabora Online

Mit Collabora kann man sich einen Dienst für die kollaborative Arbeit an Office-Dokumenten einrichten. Es basiert auf LibreOffice und läuft typischerweise als Docker-Container.

Tipps:

  • Nach Update muss man manchmal die Einstellung der URL in "Collabora Online Server" erneut speichern.

Release Notes:

Only Office

  • Nachteile gegenüber Collabora
    • Bei geteilten Links ist der Editor immer "Anonym". Man kann keinen Namen setzen.
    • Chat und Videokonferenz via Nextcloud nicht möglich im Kontext des Dokuments.
    • Muss manuell geflusht werden, damit Änderungen im Cache in Datei geschrieben wird, z.B. per Cron
occ documentserver:flush

Talk

Mail

Andere Erweiterungen

Tipps und Tricks

URL ändern

  • Verzeichnis im DocumentRoot anpassen
  • Pfade in DocumentRoot/.htaccess anpassen
  • Pfade in Apache Config anpassen, z.B. in /etc/apache2/conf.d/nextcloud.conf
  • Nextcloud Config in config.php anpassen
  • Ggf. Pfad zu data in Datenbank-Tabelle oc_storages anpassen
  • Pfad in Collabora Online anpassen (Auth)

PHP Version

  • PHP 7.4 -> Check hier ändern [1]:
lib/versioncheck.php

CalDAV und CardDAV

https://example.com/nextcloud
https://example.com/nextcloud/remote.php/dav/calendars/<username>/<calendarname>/
https://example.com/nextcloud/remote.php/dav/addressbooks/users/<username>/<addressbookname>/

Google Kalender

WebDAV

https://example.com/nextcloud
https://example.com/nextcloud/remote.php/dav/files/<USERNAME>/

Update

sudo -u wwwrun php updater/updater.phar
  • Update Channel in config.php
'updater.release.channel' => 'beta'

Downgrade einer App

Beispiel "Nextcloud Office":

  • Die betreffende App in Nextcloud UI deaktivieren
  • Bestehende App entfernen
cd apps/
rm -rf richdocuments
  • App herunterladen
wget https://github.com/nextcloud-releases/richdocuments/releases/download/v5.0.1/richdocuments-v5.0.1.tar.gz
  • App entpacken, Owner setzen und Download-Paket entfernen
tar zxvf richdocuments-v5.0.1.tar.gz
chown -R wwwrun:www richdocuments
rm richdocuments-v5.0.1.tar.gz
  • Die betreffende App in Nextcloud UI aktivieren

PHP Performance

PHP-FPM

Werte weit über Default setzen: https://spot13.com/pmcalculator/

Caching

  • Opcache mit PHP-FPM
/etc/php7/fpm/php.ini


  • APCu
zypper in php7-APCu
/etc/php7/conf.d/apcu.ini

Prüfen:

phpinfo();

Chaching mit redis

  • Redis installieren
zypper in redis php8-redis
systemctl enable redis@default
  • Redis konfigurieren (Unix Socket statt TCP [2],[3])
vi /etc/redis/default.conf
unixsocket /run/redis/redis.sock
unixsocketperm 770
  • Socket Verzeichnis erstellen
mkdir /run/redis
chown redis:redis /run/redis
  • Webserver-User in Gruppe "redis" aufnehmen
vi /etc/group
redis:x:453:wwwrun
  • Redis starten
systemctl start redis@default
  • Redis prüfen
systemctl status redis@default
  • Logdatei prüfen
less /var/log/redis/default.log
  • Nextcloud konfigurieren (nur Filelocking)
'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
     'host' => '/var/run/redis/redis.sock',
     'port' => 0,
     'timeout' => 0.0,
      ),
  • Nextcloud konfigurieren (Filelocking + distributed server cache)
'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'memcache.distributed' => '\OC\Memcache\Redis',
'redis' => array(
     'host' => '/var/run/redis/redis.sock',
     'port' => 0,
     'timeout' => 0.0,
      ),
  • Nextcloud konfigurieren (Filelocking + distributed server cache + local cache)
'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.local' =>'\OC\Memcache\Redis',
'redis' => array(
     'host' => '/var/run/redis/redis.sock',
     'port' => 0,
     'timeout' => 0.0,
      ),
  • Nextcloud Systemlog prüfen
  • Redis Aktivitäten prüfen (bei Dateiaktivitäten) [4]
redis-cli -s /run/redis/redis.sock MONITOR
redis-cli -s /run/redis/redis.sock KEYS "*"
  • Regelmäßige Dumps bzw. Snapshots im Filesystem [5]:
/var/lib/redis/default/dump.rdb
  • Laden der Snapshots nach Restart prüfen im Log (hier 326 Keys mit 1,59 MByte):
28151:C 03 Apr 2024 10:46:40.982 * Configuration loaded
28151:M 03 Apr 2024 10:46:40.982 * monotonic clock: POSIX clock_gettime
28151:M 03 Apr 2024 10:46:40.982 * Running mode=standalone, port=0.
28151:M 03 Apr 2024 10:46:40.983 * Server initialized
28151:M 03 Apr 2024 10:46:40.983 * Loading RDB produced by version 7.2.4
28151:M 03 Apr 2024 10:46:40.983 * RDB age 0 seconds
28151:M 03 Apr 2024 10:46:40.983 * RDB memory usage when created 1.59 Mb
28151:M 03 Apr 2024 10:46:40.983 * Done loading RDB, keys loaded: 326, keys expired: 0.
28151:M 03 Apr 2024 10:46:40.983 * DB loaded from disk: 0.001 seconds
28151:M 03 Apr 2024 10:46:40.983 * Ready to accept connections unix

Sicherheit

Siehe auch