Jump to content
XPEnology Community

Nextcloud Zertifikat-Problem: keine Verbindung zu Update und App-Server


Tobias

Recommended Posts


Siehe hier:
https://help.nextcloud.com/t/certificate-has-expired-for-apps-nextcloud-and-nextcloud-com/124569


Wenn ich den Informationen aus dem Nextcloud-Hilfe-Forum folge (siehe Link) und das abgelaufene Zertifikat lösche (aus /etc/ssl/certs), ändert das leider nichts am Problem.


folgender Befehl auf der Befehlszeile ausgeführt:
curl -i https://apps.nextcloud.com


liefert nach wie vor:

curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
HTTPS-proxy has similar options --proxy-cacert and --proxy-insecure.


An anderer Stelle liest man, man müsste die neueren X1 und X1 Zertifikate installieren.

Nur wie und wo mache ich das?

Das Erneuern der Zertifikate im DSM-->Systemsteuerung-->Sicherheit-Zertifikat funktioniert, führt aber nicht zur Lösung des Problems.


Leider fehlen mir weitere Ideen, um die Nextcloud wieder zum Updaten und Apps installieren zu bekommen.

Ich hoffe, das Problem lässt sich nicht nur durch ein DSM-Update auf 6.2.4.25556 lösen, was ich mir mit dem derzeitigen Informationsstand nicht zutraue.

Ich bin daher für alle Hinweise dankbar.


Besten Dank und Gruß

Tobias

Link to comment
Share on other sites

Geht es hier um Letsencrypt Zertifikate?

 

Das Zertifikat für die Intermediate CA ISRG_Root_X1.crt ist im u3.pat enthalten. Genauso wie eine ne ca-certificates.crt Datei mit den neuen Zertifikaten.

Alles was die OpenSSL-Bibliotheken des OS verwendet, wird mit der aktuellen Version trotzdem nicht funktionieren (obwohl alle notwendingen Zertifikate vorliegen!). Hier wird ein Update der Bibliothek(en?) benötigt, dass mit den verwendeten Algorithmen bzw. der doppelten Zertifikatskette der LE-Zertifikate umgehen kann.

 

Das in dem OS enthaltende Curl braucht diese Bibliotheken und funktioniert seit dem 30.09.2021 nicht mehr mit LE Zertifikaten. Neu ausgestellt Zertifikate haben zwar nicht mehr die Expired-CA's, aber dafür kann die veraltet Version der OpenSSL-Bibliotheken nicht mit den LE-Zertifikaten umgehen. 

 

Wenn man eine statisch kompilierte (=openssl mit eingebacken) Variante verwendet, dann geht es mit dieser: wget -L https://github.com/moparisthebest/static-curl/releases/download/v7.79.1/curl-amd64 && chmod +x curl-amd64 && ./curl-amd64

 

Wenn die Zertifikatskette das Problem wäre, dann würde es auch mit der statisch kompilierten Curl-Variante nicht gehen...

 

Das löst aber das generelle Problem nicht, dass alles das von den OpenSSL-Bibliotheken abhängig ist, aktuell nicht funktioniert.

 

Wenn NC in einem Container läuft, dann ist es nicht abhängig von der veralteten OpenSSL-Bibliothek und das Problem kann hier nicht auftreten.

 

Natürlich muss auch der Client (Chrome hat bspw. kein Probleme) die neuen Zertifikate kennen und mit den Zertifikaten umgehen können.

 

 

Edited by haydibe
Link to comment
Share on other sites

haydibe, danke für deine Antwort.

 

Ist da noch ein Update zu erwarten? Ich vermute falls ja, dann wahrscheinlich über ein DSM-Update und nicht ein einzelnes App-Paket? Was mich dann wieder zu dem Redpill-Problem führt ...

 

Das aktuelle Docker-Image für die NC läuft leider seit kurzem auch nicht mehr. 

Problembeschreibung in diesem Fall siehe hier, im unteren Teil des Textes ab "Konkretes Beispiel vom August/September 2021":

 

https://nas-selber-bauen.de/nextcloud/

Link to comment
Share on other sites

Danke an haydibe für den Hinweis auf linuxserver.io. Ich bin im Bereich Docker noch Anfänger, konnte mir jetzt aber beginnend mit deinem Tipp einen Stack aus Nextcloud, MariaDB und Redis zusammenbauen. Läuft für meine privaten Zwecke soweit erstmal ohne Probleme, vor allem sind die Fehler mit den Zertifikaten bei der direkten Installation im DSM und der Fehler mit dem nicht funktionieren Zufallsgenerator im Standard-Nextcloud-Docker weg.

 

Ich poste mal das von mir zusammengebaute docker-yaml, falls es für andere von Interesse sein sollte - auch auf die Gefahr, dass da noch Fehler drin sind (bei mir läuft es jedenfalls). Quellen waren: https://hub.docker.com/r/linuxserver/nextcloud und https://www.smarthomebeginner.com/traefik-docker-nextcloud/

 

version: "3.7"
# Above we must declare the docker-compose file version which allows Docker to
#    understand the syntax we are using. Normally does not need to change.

# Services (containers) we would like this document to run
services:
  ## All services/containers go below this line (note the two space indentation in front).
  
  
   # Nextcloud Docker Application
  nextcloud:
    # Use the official nextcloud image (v21.0.0 at time of writing this)
    image: lscr.io/linuxserver/nextcloud
    # Set to allow easy Docker DNS name resolution - not strictly necessary
    container_name: nextcloud
    # Same as above
    hostname: nextcloud
    # Container will restart unless we specifically stop it
    restart: unless-stopped
    # Defines how we want our container to connect outside
    networks:
      # Use an internal network for the nextcloud services
      - nextcloud
    # Open ports in the format host:container - We will remove this later
    ports:
      # INSECURE - we will remove this later after completing a few more steps in this guide
      - 443:443
      # Persistent volumes with bind mounts to easily move/backup data
    volumes:
      # I like to use the /volume1/docker/nexttest folder to hold my Docker bind mounted volumes
      - /volume1/docker/nexttest/config:/config
      - /volume1/docker/nexttest/data:/data

    # Environment (internal to the container) variables to simplify setup
    environment:
      # Redis host name (container_name)
          REDIS_HOST: nc-redis
          PUID: 1026
          PGID: 100
          TZ: Europe/Berlin
    #Nextcloud Database - Using MariaDB, but can also use MySQL or PostgreSQL
  nextcloud-db:
    # MariaDB 10.5 again not using latest to prevent future breakage
    image: mariadb:10.5
    # Set to allow easy Docker DNS name resolution - not strictly necessary
    container_name: nc-db
    # Same as above
    hostname: nc-db
    # Container will restart unless we specifically stop it
    restart: unless-stopped
    # Recommended database settings as listed in:
    # https://docs.nextcloud.com/server/21/admin_manual/configuration_database/linux_database_configuration.html
    command: --transaction-isolation=READ-COMMITTED --log-bin=msqyld-bin --binlog-format=ROW
    # Defines how we want our container to connect outside
    networks:
      # ONLY using an internal network and not exposing to the internet
      - nextcloud
    # Persistent volumes with bind mounts to easily move/backup data
    volumes:
      # I like to use the /opt folder to hold my Docker bind mounted volumes
      - /volume1/docker/nexttest/mysql:/var/lib/mysql
    
    # Environment (internal to the container) variables to simplify setup (notice the secrets used below)
    environment:
      MYSQL_USER: nextcloud
      MYSQL_DATABASE: nextcloud
      MYSQL_ROOT_PASSWORD: nextcloud
      MYSQL_PASSWORD: nextcloud
     
  # Nextcloud (in memory) Redis Cache - speed up lookup transactions
  # Speeds up Nextcloud by reducing the time spent "looking" for things
  nc-redis:
  # Official REDIS 6.2 image based upon alpine Linux (to keep it lightweight)
   image: redis:6.2-alpine
  # Set to allow easy Docker DNS name resolution - not strictly necessary
   container_name: nc-redis
  # Same as above
   hostname: nc-redis
    # Container will restart unless we specifically stop it
   restart: unless-stopped
    # Defines how we want our container to connect outside
   networks:
    # ONLY using an internal network and not exposing to the internet
     - nextcloud
    # Persistent volumes with bind mounts to easily move/backup data
   volumes:
    # I like to use the /opt folder to hold my Docker bind mounted volumes
     - /volume1/docker/nexttest/redis:/data

# Declare networks at the high level to avoid confusion and to access those
#   not initially started by this document.
networks:
  # Internal facing network for Nextcloud Docker containers
  nextcloud:
    name: nextcloud
    # Define how we want the network created
    driver: bridge

 

Link to comment
Share on other sites

Das compose file sieht soweit gut aus. Bis auf die abweichende Einrückung von "environment" beim "nextcloud" Service und der "REDIS_HOST" environment Variable - die ich in der Doku nicht finden kann - sieht alles gut aus.

 

Beim offiziellen NC Image kann man die Erstinstallation vollständig durch setzen von Variablen erreichen - man landet dann direkt im Login-Bildschirm, statt im Setup-Dialog.

In der Beschreibung von linuxserver/nextcloud ist das scheinbar nicht vorgesehen.

 

Wenn es mit der nicht dokumentierten REDIS_HOST Variable klappt, vielleicht gehen diese von offiziellen NC Image dann auch?

    environment:
      NEXTCLOUD_ADMIN_USER: {NEXTCLOUD_ADMIN_USER}
      NEXTCLOUD_ADMIN_PASSWORD: {NEXTCLOUD_ADMIN_PASSWORD}
      NEXTCLOUD_DATA_DIR: {muss zum volume mapping passen, oder einfach Variable weg lassen und Default verwenden}
      NEXTCLOUD_TRUSTED_DOMAINS: {domains auf die Nextcloud "horcht", Komma, Semicolon oder Leerzeichen separiert... keine Ahnung was davon genau}
      MYSQL_HOST: {exakter Wert wie bei nextcloud-db}
      MYSQL_DATABASE: {exakter Wert wie bei nextcloud-db}
      MYSQL_USER: {exakter Wert wie bei nextcloud-db}
      MYSQL_PASSWORD: {exakter Wert wie bei nextcloud-db}

 

Vermutlich werden die "ENV" Variablen ignoriert - wenn nicht, dann kann man so die Grundinstallation einer NC-Installation erzeugen (die Host-Seite des Volume-MAppings muss dabei leer sein, damit es überhaupt etwas bewirkt).

Link to comment
Share on other sites

Ergibt Sinn - nachdem oben eine "nicht Dokumentierte" Variable stand, hatte ich die Hoffnung das die anderen evtl. auch einfach nicht Dokumentiert sind..

Aber es ergibts schon Sinn das etwas das nicht dokumentiert ist auch nicht vorhanden ist ^^

 

Wobei es mich schon etwas wundert, dass das linux.io image weniger komfortabel als das offizielle ist.

Ist in diesem Fall wohl nicht so. Schade.

 

Edited by haydibe
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...