Anmelde-"Schleife" bei Neuinstallation

Hallo zusammen,

aktuell komme ich nicht mehr weiter. Mein Ziel ist es, dass ich via Docker/Portainer eine Nextcloud Instanz betreiben kann. Zuerst hatte ich vorgehabt, die AIO Variante zu installieren, aber dies war nicht von Erfolg gekrönt, da ich Traefik als Proxy betreibe und der Apache mir hier Probleme bereitet hatte, die ich nicht gelöst bekommen habe. Da daneben auch einige Container hochgefahren wurden, versuche ich nun den “old-school” Way mit einem schlanken eigenen Nextcloud-Stack.

version: "3.9"

services:

  nextcloudpostgres:
    # UTF8 de_DE
    # **********
    #
    # Unter IMAGES wurde ein eigenes Image zu Postres zum Setzen von de_DE erzeugt. Dort kann man die Version entsprechend
    # anheben.
    #
    # Inhalt zum Erstellen des Images:
    #
    # FROM postgres:15 
    # RUN sed -i 's/^# *\(en_US.UTF-8\|de_DE.UTF-8\)/\1/' /etc/locale.gen && locale-gen
    # ENV LANG de_DE.utf8
    #
    image: postgres-de
    container_name: nextcloud-db
    restart: always
    hostname: nextcloudpostgres
    environment:
      TZ: "Europe/Berlin"
      POSTGRES_DB: "nextcloud"
      POSTGRES_USER: "nchubdbu"
      POSTGRES_PASSWORD: "****"
      # https://www.postgresql.org/docs/current/app-initdb.html <-- alle Optionen
      POSTGRES_INITDB_ARGS: "--encoding=UTF-8"

    networks:
      - jarvis-proxy-network

    volumes:
      - nextcloudhub-postgres-volume:/var/lib/postgresql/data

  nextcloudredis:
    image: redis:7
    container_name: nextcloud-redis
    restart: always
    hostname: nextcloudredis
    command: /bin/sh -c "redis-server --requirepass '****'"

    networks:
      - jarvis-proxy-network

    volumes:
      - nextcloudhub-redis-volume:/data

  nextcloudhub:
    image: nextcloud:27
    container_name: nextcloud-hub
    restart: always
    hostname: nextcloud.mydomain.de
    environment:
      TZ: "Europe/Berlin"
      POSTGRES_HOST: "nextcloudpostgres"
      POSTGRES_DB: "nextcloud"
      POSTGRES_USER: "nchubdbu"
      POSTGRES_PASSWORD: "****"
#      NEXTCLOUD_ADMIN_PASSWORD: "****"
#      NEXTCLOUD_ADMIN_USER: "ncadmin"
      NEXTCLOUD_TRUSTED_DOMAINS: "nextcloud.mydomain.de"
      TRUSTED_PROXIES: "traefik"
      OVERWRITEPROTOCOL: "https"
#      NC_default_phone_region: "<EU>"
      REDIS_HOST: "nextcloudredis"
      REDIS_HOST_PASSWORD: "****"
   
    networks:
      - jarvis-proxy-network
    
    volumes:
      - nextcloudhub-data-volume:/var/www/html
      
    depends_on:
      - nextcloudpostgres
      - nextcloudredis
  
volumes:
  nextcloudhub-data-volume:
    external: true
  nextcloudhub-postgres-volume:
    external: true
  nextcloudhub-redis-volume:
    external: true

networks:
  jarvis-proxy-network:
      name: jarvis-proxy-network
  • Als Datenbank möchte ich eine Postgres nutzen. Zwecks Verwendung von de_DE.utf8 habe ich hier nach Recherche ein eigenes Images erstellt.
  • Redis als Memory Data Store find ich recht spannend, welches ich neben der eigentlichen Nextcloud HUB Instanz betreiben möchte
  • Wie oben bereits geschrieben hängt ein Traefik Proxy vor all meinen Services, so dass ich mittels verschiedenen Sub-Domains sauber via https (SSL Cert über meine eigene Domain) auf die einzelnen Dienste zugreifen kann

Hier die Traefik Config, welche ich mir anhand der vorhandenen AIO Doku erstellt habe:

# DYNAMIC CONFIGURATION
#######################

http:
  routers:
    nextcloud:
      service: nextcloud-service
      entryPoints:
        - websecure
#      middlewares:
#        - nextcloud-chain
      rule: "Host(`nextcloud.mydomain.de`)"
      tls:
        options: default

...

    traefik-dashboard:
      service: api@internal
      rule: "Host(`proxydashboard.mydomain.de`)"
      tls:
        options: default

...

  middlewares:
    nextcloud-secure-headers:
      headers:
        hostsProxyHeaders:
          - "X-Forwarded-Host"
        referrerPolicy: "same-origin"
        customResponseHeaders:
            X-Robots-Tag: "none"

    https-redirect:
      redirectscheme:
        scheme: https

    nextcloud-chain:
      chain:
        middlewares:
          # - ... (e.g. rate limiting middleware)
          - https-redirect
          - nextcloud-secure-headers

  services:
    nextcloud-service:
      loadBalancer:
        servers:
          - url: "http://nextcloudhub:80"

...

tls:
  certificates:
    - certFile: /etc/certs/live/mydomain.de/fullchain.pem
      keyFile: /etc/certs/live/mydomain.de/privkey.pem

Beim erstmaligen Aufruf über https://nextcloud.mydomain.de werde ich aufgefordert, ein Admin Account anzulegen. Nach dem Anlegen bleibt die UI auf der gleichen View und neben einem laufenden Spinner wird “Installiere…” angezeigt. Dies läuft nun eine kleine Weile.

Danach werde ich auf folgende Seite redirected: https://nextcloud.mydomain.de/login?redirect_url=/index.php/core/apps/recommended um mich anzumelden. HIer nutze ich nun das eben erstellte Admin Konto. Nach dem Klick auf Anmelden wird die Login View erneut geladen und soll mich wieder anmelden (SCHLEIFE / PROBLEM).

Die Web-Console liefert mir lediglich:

JQMIGRATE: Migrate is installed, version 3.4.1
index.es.js:2337 Proxying an event bus of version 3.0.2 with 1.3.0
e @ index.es.js:2337
68668 @ index.es.js:3314
a @ bootstrap:19
46631 @ requesttoken.js:11
a @ bootstrap:19
44332 @ index.js:25
a @ bootstrap:19
4820 @ index.js:14
a @ bootstrap:19
22152 @ PasswordLessLoginForm.vue:1
a @ bootstrap:19
(anonymous) @ startup:4
a.O @ chunk loaded:25
(anonymous) @ startup:5
(anonymous) @ startup:5
session-heartbeat.js:103 session heartbeat polling started

Via Network Tab lassen sich auch keine FAIL Calls feststellen. Es startet mit einem:

  1. https://nextcloud.mydomain.de/login (POST)
    → Status Code: 303
  2. https://nextcloud.mydomain.de/login?redirect_url=/index.php/core/apps/recommended&direct=1&user=ncadmin (GET)
    → Status Code: 200

Im Nextcloud-HUB Server Log finde ich lediglich Folgendes:

127.0.0.1 - - [21/Aug/2023:23:23:12 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:13 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:14 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:15 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:16 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:17 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:18 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:19 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:20 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:21 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:22 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:23 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:24 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:25 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:26 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:27 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:28 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:29 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:30 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:31 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:32 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:33 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:34 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:35 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:36 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:37 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:38 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:39 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:40 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:41 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
127.0.0.1 - - [21/Aug/2023:23:23:42 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.57 (Debian) PHP/8.2.8 (internal dummy connection)"
172.29.4.2 - - [21/Aug/2023:23:24:53 +0200] "POST /login HTTP/1.1" 303 1401 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.203"
172.29.4.2 - - [21/Aug/2023:23:24:53 +0200] "GET /login?redirect_url=/index.php/core/apps/recommended&direct=1&user=ncadmin HTTP/1.1" 200 5665 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.203"
172.29.4.2 - - [21/Aug/2023:23:24:53 +0200] "GET /core/js/oc.js?v=429cbcac HTTP/1.1" 200 2178 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.203"
172.29.4.2 - - [21/Aug/2023:23:24:54 +0200] "GET /core/css/guest.css.map HTTP/1.1" 200 1642 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.203"
172.29.4.2 - - [21/Aug/2023:23:24:54 +0200] "GET /core/css/server.css.map HTTP/1.1" 200 5497 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.203"
172.29.4.2 - - [21/Aug/2023:23:24:55 +0200] "GET /cron.php HTTP/1.1" 200 750 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.203"

Im DB-Server Log liegt Folgendes vor:

Die Dateien, die zu diesem Datenbanksystem gehören, werden dem Benutzer
»postgres« gehören. Diesem Benutzer muss auch der Serverprozess gehören.
Der Datenbankcluster wird mit der Locale »de_DE.utf8« initialisiert werden.
Die Standardtextsuchekonfiguration wird auf »german« gesetzt.
Datenseitenprüfsummen sind ausgeschaltet.
berichtige Zugriffsrechte des bestehenden Verzeichnisses /var/lib/postgresql/data ... ok
erzeuge Unterverzeichnisse ... ok
wähle Implementierung von dynamischem Shared Memory ... posix
wähle Vorgabewert für max_connections ... 100
wähle Vorgabewert für shared_buffers ... 128MB
wähle Vorgabewert für Zeitzone ... Europe/Berlin
erzeuge Konfigurationsdateien ... ok
führe Bootstrap-Skript aus ... ok
führe Post-Bootstrap-Initialisierung durch ... ok
synchronisiere Daten auf Festplatte ... ok
initdb: Warnung: Authentifizierung für lokale Verbindungen auf »trust« gesetzt
initdb: Tipp: Sie können dies ändern, indem Sie pg_hba.conf bearbeiten oder beim nächsten Aufruf von initdb die Option -A, oder --auth-local und --auth-host, verwenden.
Erfolg. Sie können den Datenbankserver jetzt mit
    pg_ctl -D /var/lib/postgresql/data -l logdatei start
starten.
warte auf Start des Servers....2023-08-21 22:54:25.281 CEST [48] LOG:  PostgreSQL 15.3 (Debian 15.3-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit startet
2023-08-21 22:54:25.320 CEST [48] LOG:  erwarte Verbindungen auf Unix-Socket »/var/run/postgresql/.s.PGSQL.5432«
2023-08-21 22:54:25.427 CEST [51] LOG:  Datenbanksystem wurde am 2023-08-21 22:54:22 CEST heruntergefahren
2023-08-21 22:54:25.509 CEST [48] LOG:  Datenbanksystem ist bereit, um Verbindungen anzunehmen
 fertig
Server gestartet
CREATE DATABASE
/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
warte auf Herunterfahren des Servers....2023-08-21 22:54:27.495 CEST [48] LOG:  schnelles Herunterfahren verlangt
2023-08-21 22:54:27.796 CEST [48] LOG:  etwaige aktive Transaktionen werden abgebrochen
2023-08-21 22:54:27.809 CEST [48] LOG:  Background-Worker »logical replication launcher« (PID 54) beendete mit Status 1
2023-08-21 22:54:27.809 CEST [49] LOG:  fahre herunter
2023-08-21 22:54:28.193 CEST [49] LOG:  Checkpoint beginnt: shutdown immediate
......2023-08-21 22:54:34.428 CEST [49] LOG:  Checkpoint komplett: 918 Puffer geschrieben (5.6%); 0 WAL-Datei(en) hinzugefügt, 0 entfernt, 0 wiederverwendet; Schreiben=2,172 s, Sync=2,176 s, gesamt=6,618 s; sync. Dateien=250, längste=1,182 s, Durchschnitt=0.009 s; Entfernung=4224 kB, Schätzung=4224 kB
2023-08-21 22:54:34.437 CEST [48] LOG:  Datenbanksystem ist heruntergefahren
 fertig
Server angehalten
PostgreSQL init process complete; ready for start up.
2023-08-21 22:54:34.627 CEST [1] LOG:  PostgreSQL 15.3 (Debian 15.3-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit startet
2023-08-21 22:54:34.628 CEST [1] LOG:  erwarte Verbindungen auf IPv4-Adresse »0.0.0.0«, Port 5432
2023-08-21 22:54:34.628 CEST [1] LOG:  erwarte Verbindungen auf IPv6-Adresse »::«, Port 5432
2023-08-21 22:54:34.707 CEST [1] LOG:  erwarte Verbindungen auf Unix-Socket »/var/run/postgresql/.s.PGSQL.5432«
2023-08-21 22:54:34.778 CEST [64] LOG:  Datenbanksystem wurde am 2023-08-21 22:54:34 CEST heruntergefahren
2023-08-21 22:54:34.824 CEST [1] LOG:  Datenbanksystem ist bereit, um Verbindungen anzunehmen
2023-08-21 22:59:34.877 CEST [62] LOG:  Checkpoint beginnt: time
2023-08-21 22:59:37.093 CEST [62] LOG:  Checkpoint komplett: 22 Puffer geschrieben (0.1%); 0 WAL-Datei(en) hinzugefügt, 0 entfernt, 0 wiederverwendet; Schreiben=1,973 s, Sync=0,053 s, gesamt=2,216 s; sync. Dateien=11, längste=0,051 s, Durchschnitt=0.005 s; Entfernung=36 kB, Schätzung=36 kB
2023-08-21 23:23:12.154 CEST [147] FEHLER:  doppelter Schlüsselwert verletzt Unique-Constraint »fs_storage_path_hash«
2023-08-21 23:23:12.154 CEST [147] DETAIL:  Schlüssel »(storage, path_hash)=(2, 328b8cd02585429e3b991d31959a0799)« existiert bereits.
2023-08-21 23:23:12.154 CEST [147] ANWEISUNG:  INSERT INTO "oc_filecache" ("mimepart", "mimetype", "mtime", "size", "etag", "storage_mtime", "permissions", "name", "parent", "checksum", "path_hash", "path", "storage") VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)
2023-08-21 23:24:34.585 CEST [62] LOG:  Checkpoint beginnt: time
2023-08-21 23:25:32.800 CEST [62] LOG:  Checkpoint komplett: 573 Puffer geschrieben (3.5%); 1 WAL-Datei(en) hinzugefügt, 0 entfernt, 0 wiederverwendet; Schreiben=57,708 s, Sync=0,142 s, gesamt=58,215 s; sync. Dateien=243, längste=0,055 s, Durchschnitt=0.001 s; Entfernung=3591 kB, Schätzung=3591 kB

Hier gibt es den Fehler: “FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint”.

Der Vollständigkeit Halber hier das REDIS Log:

9:C 21 Aug 2023 20:54:20.433 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
9:C 21 Aug 2023 20:54:20.433 # Redis version=7.0.12, bits=64, commit=00000000, modified=0, pid=9, just started
9:C 21 Aug 2023 20:54:20.433 # Configuration loaded
9:M 21 Aug 2023 20:54:20.434 * monotonic clock: POSIX clock_gettime
9:M 21 Aug 2023 20:54:20.435 * Running mode=standalone, port=6379.
9:M 21 Aug 2023 20:54:20.435 # Server initialized
9:M 21 Aug 2023 20:54:20.435 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
9:M 21 Aug 2023 20:54:20.436 * Ready to accept connections

Um Auszuschließen, ob es etwas mit dem Proxy zu tun hat, habe ich den 80ziger Port direkt nach Außen freigegeben (1234:80) und nach Löschen der Volumes es erneut probiert. Es bleibt aber beim Gleichen.

Hat hier jemand eine Idee zu, woran es hängt?

Ich bin gespannt.

Ich hab nun von der Version 27.0.1 auf 27.0.2 geupdatet, aber es bleibt beim gleichen Problem. Auch bei der Anmeldung könnte ich irgendein User oder Passwort angeben, was gar nicht existiert. Ich bekomme keine Fehlermeldung, sondern der Redirect wird einfach durchgeführt :frowning: .

Ich habe eben bei Docker HUB noch gesehen, dass neben dem Community Repo auch unter “linuxserver” Nextcloud Images bereitgestellt werden. Worin unterscheidet sich dieses Image vom Community Image?

Kann mir jemand eventuell einen Tipp geben, ob es noch Ablagen von Logs oder dergleichen gibt, die man prüfen kann, um einen Hinweis zu erlangen, warum der Redirect hier ständig auf “login” passiert?

look from experience this loop that is happening is because the nextcloud is behind a reverse proxy you need to add this to your config.php

  'overwritehost' => 'example.domain',
  'overwriteprotocol' => 'https',
1 Like

Thank you @Edson_Barbosa for your feedback :slight_smile: !

Do I have an option to set overwritehost, … via ENV variables or so inside my docker compose?

Now I have following properties in my compose file:

      OVERWRITEPROTOCOL: "https"
      OVERWRITEHOST: "nextcloud.mydomain.de"

The first one was already set. The OVERWRITEHOST I have added. Here are all options listed.

Sadly it is the same behavior :frowning: Everytime I see the login page.

Actually I’m playing with the options, but nothing changes:

Here the complete part of the config:

      POSTGRES_HOST: "nextcloudpostgres"
      POSTGRES_DB: "nextcloud"
      POSTGRES_USER: "nchubdbu"
      POSTGRES_PASSWORD: "****"
      NEXTCLOUD_TRUSTED_DOMAINS: "nextcloud.mydomain.de"
      TRUSTED_PROXIES: "traefik"
      OVERWRITEPROTOCOL: "https"
      OVERWRITEHOST: "nextcloud.mydomain.de"
      OVERWRITECLIURL: "https://nextcloud.mydomain.de"
      REDIS_HOST: "nextcloudredis"
      REDIS_HOST_PASSWORD: "****"

in my case

here I leave it with the internal number of my ip

Sadly it takes the same effect, if I set the IP to my Nextcloud Container. Everytime I’ve got the login page.

If you have running Nextcloud behind a proxy (maybe Traefik), can you tell me, if you have special proxy configuration like setting some headers or so?

This here I have configured (found it here in the AIO documentation):

  middlewares:
    nextcloud-secure-headers:
      headers:
        hostsProxyHeaders:
          - "X-Forwarded-Host"
        referrerPolicy: "same-origin"
        customResponseHeaders:
            X-Robots-Tag: "none"

    https-redirect:
      redirectscheme:
        scheme: https

    nextcloud-chain:
      chain:
        middlewares:
          # - ... (e.g. rate limiting middleware)
          - https-redirect
          - nextcloud-secure-headers

But I’m unsure, if this is the right way in my case.

Ich hatte auch das Problem, dass Nextcloud immer wieder das Anmeldefenster und einen Browser zum Verknüpfen geöffnet hat.
Ich habe dann im Hauptfenster gesehen, dass es noch ein 2. Konto von mir gab. Das habe ich entfernt und anschließend ging alles normal. :+1:
(vielleicht hilft das dem einen oder anderen)
Grüße Steffen