Middleware does not exist with nextcloud

Hi, I have an error I have also read a couple of times here but I have a feeling its never exactly the setup I run so I'm already sorry for creating another one :confused:

The setup is I run portainer and have a docker compose file of traefik+nextcloud+mariadb and nextcloud has its super fancy gui telling one issues right now one issue is about well-known redirects to webdav caldav etc and from what I have read and also found out with gpt is I need middlewares for that but somehow even though they are in my traefik.yml I get does not exist and nothing works when I try to incorporate them.

# Enable access logs
accessLog:
  filePath: "/logs/traefik_access.log"
  format: json
  bufferingSize: 0
  fields:
    headers:
      defaultMode: drop
      names:
        User-Agent: keep  # Keep the User-Agent in logs

# Enable detailed logging for Traefik
log:
  level: DEBUG
  filePath: "/logs/traefik.log"
  format: json

# Define entry points (ports)
entryPoints:
  web:
    address: ":80"
  websecure:
    address: ":443"
  traefik:
    address: ":8080"  # Dashboard port

# Define providers
providers:
  docker:
    exposedByDefault: false  # Only expose containers explicitly

# Configure Let's Encrypt for HTTPS
certificatesResolvers:
  myresolver:
    acme:
      email: "myemail@123.com"  # Your email for notifications
      storage: "/letsencrypt/acme.json"  # Store certificates here
      tlsChallenge: true  # Use TLS challenge

http:
  middlewares:
    nextcloud-dav:
      redirectRegex:
        regex: "^/.well-known/(caldav|carddav)"
        replacement: "/remote.php/dav/"
        permanent: true

    redirect-to-https:
      redirectScheme:
        scheme: https
        permanent: true

and

services:
  traefik:
    image: traefik:v2.9
    command:
      - "--configFile=/traefik.yml"  # Use the updated traefik.yml file
    ports:
      - "80:80"  # HTTP for Let's Encrypt challenge
      - "443:443"  # HTTPS required by Let's Encrypt
      - "65386:443"  # Custom HTTPS port for external access (after certificate is issued)
      - "65385:8080"  # Map the new entry point for the dashboard
    dns:
      - 8.8.8.8
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"  # Allows Traefik to access Docker
      - "./letsencrypt:/letsencrypt"  # Folder to store the Let's Encrypt data (certificate, keys, etc.)
      - "/mnt/dietpi_userdata/docker-data/volumes/traefik/traefik.yml:/traefik.yml"  # Host to container volume mapping
      - "/mnt/dietpi_userdata/docker-data/volumes/traefik_logs:/logs"  # Host directory for logs
    networks:
      - nextcloud-net

[...]

  nextcloud:
    image: nextcloud:latest
    restart: unless-stopped
    environment:
[...]
    dns:
      - 8.8.8.8
    volumes:
      - /mnt/dietpi_userdata/docker-data/volumes/nextcloud_traefik:/var/www/html/
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.nextcloud.rule=Host(`fancyhost.net`)"
      - "traefik.http.routers.nextcloud.entrypoints=websecure"
      - "traefik.http.services.nextcloud.loadbalancer.server.port=80"
      - "traefik.http.routers.nextcloud.tls=true"
      - "traefik.http.routers.nextcloud.tls.certresolver=myresolver"  # Use the resolver defined in Traefik
      - "traefik.http.routers.nextcloud.middlewares=file:nextcloud-dav"  # Correct reference
      - "traefik.http.routers.nextcloud-http.entrypoints=web"
      - "traefik.http.routers.nextcloud-http.rule=Host(`fancy.host.net`)"
      - "traefik.http.routers.nextcloud-http.middlewares=file:redirect-to-https"  # Correct reference
    networks:
      - nextcloud-net

Seriously? You get multiple error messages, but you are not able to copy&paste them here?

Traefik is currently at v2.11 or v3.1, please upgrade for bugfixes and improved security.

And this is a chatbot hallucination, maybe use the search function of this forum (maybe with "nextcloud"), instead of a chatbot:

traefik.http.routers.nextcloud.middlewares=file:nextcloud-dav
1 Like

Traefik log whats interesting in the first static config loaded one can see the middleware names but later it still says not exist. the messages with port are there because I restarted the container directly.

{"level":"info","msg":"Traefik version 2.9.10 built on 2023-04-06T16:15:08Z","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"Static configuration loaded {\"global\":{\"checkNewVersion\":true},\"serversTransport\":{\"maxIdleConnsPerHost\":200},\"entryPoints\":{\"traefik\":{\"address\":\":8080\",\"transport\":{\"lifeCycle\":{\"graceTimeOut\":\"10s\"},\"respondingTimeouts\":{\"idleTimeout\":\"3m0s\"}},\"forwardedHeaders\":{},\"http\":{},\"http2\":{\"maxConcurrentStreams\":250},\"udp\":{\"timeout\":\"3s\"}},\"web\":{\"address\":\":80\",\"transport\":{\"lifeCycle\":{\"graceTimeOut\":\"10s\"},\"respondingTimeouts\":{\"idleTimeout\":\"3m0s\"}},\"forwardedHeaders\":{},\"http\":{},\"http2\":{\"maxConcurrentStreams\":250},\"udp\":{\"timeout\":\"3s\"}},\"websecure\":{\"address\":\":443\",\"transport\":{\"lifeCycle\":{\"graceTimeOut\":\"10s\"},\"respondingTimeouts\":{\"idleTimeout\":\"3m0s\"}},\"forwardedHeaders\":{},\"http\":{},\"http2\":{\"maxConcurrentStreams\":250},\"udp\":{\"timeout\":\"3s\"}}},\"providers\":{\"providersThrottleDuration\":\"2s\",\"docker\":{\"watch\":true,\"endpoint\":\"unix:///var/run/docker.sock\",\"defaultRule\":\"Host(`{{ normalize .Name }}`)\",\"swarmModeRefreshSeconds\":\"15s\"}},\"log\":{\"level\":\"DEBUG\",\"filePath\":\"/logs/traefik.log\",\"format\":\"json\"},\"accessLog\":{\"filePath\":\"/logs/traefik_access.log\",\"format\":\"json\",\"filters\":{},\"fields\":{\"defaultMode\":\"keep\",\"headers\":{\"defaultMode\":\"drop\",\"names\":{\"User-Agent\":\"keep\"}}}},\"certificatesResolvers\":{\"myresolver\":{\"acme\":{\"email\":\"myemail@123.com\",\"caServer\":\"https://acme-v02.api.letsencrypt.org/directory\",\"storage\":\"/letsencrypt/acme.json\",\"keyType\":\"RSA4096\",\"certificatesDuration\":2160,\"tlsChallenge\":{}}}}}","time":"2024-10-26T19:46:17Z"}
{"level":"info","msg":"\nStats collection is disabled.\nHelp us improve Traefik by turning this feature on :)\nMore details on: https://doc.traefik.io/traefik/contributing/data-collection/\n","time":"2024-10-26T19:46:17Z"}
{"entryPointName":"traefik","level":"debug","msg":"Starting TCP Server","time":"2024-10-26T19:46:17Z"}
{"level":"info","msg":"Starting provider aggregator aggregator.ProviderAggregator","time":"2024-10-26T19:46:17Z"}
{"entryPointName":"websecure","level":"debug","msg":"Starting TCP Server","time":"2024-10-26T19:46:17Z"}
{"entryPointName":"web","level":"debug","msg":"Starting TCP Server","time":"2024-10-26T19:46:17Z"}
{"level":"info","msg":"Starting provider *traefik.Provider","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"*traefik.Provider provider configuration: {}","time":"2024-10-26T19:46:17Z"}
{"level":"info","msg":"Starting provider *docker.Provider","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"*docker.Provider provider configuration: {\"watch\":true,\"endpoint\":\"unix:///var/run/docker.sock\",\"defaultRule\":\"Host(`{{ normalize .Name }}`)\",\"swarmModeRefreshSeconds\":\"15s\"}","time":"2024-10-26T19:46:17Z"}
{"level":"info","msg":"Starting provider *acme.ChallengeTLSALPN","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"*acme.ChallengeTLSALPN provider configuration: {}","time":"2024-10-26T19:46:17Z"}
{"level":"info","msg":"Starting provider *acme.Provider","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"*acme.Provider provider configuration: {\"email\":\"myemail@123.com\",\"caServer\":\"https://acme-v02.api.letsencrypt.org/directory\",\"storage\":\"/letsencrypt/acme.json\",\"keyType\":\"RSA4096\",\"certificatesDuration\":2160,\"tlsChallenge\":{},\"ResolverName\":\"myresolver\",\"store\":{},\"TLSChallengeProvider\":{},\"HTTPChallengeProvider\":{}}","time":"2024-10-26T19:46:17Z"}
{"ACME CA":"https://acme-v02.api.letsencrypt.org/directory","level":"debug","msg":"Attempt to renew certificates \"720h0m0s\" before expiry and check every \"24h0m0s\"","providerName":"myresolver.acme","time":"2024-10-26T19:46:17Z"}
{"ACME CA":"https://acme-v02.api.letsencrypt.org/directory","level":"info","msg":"Testing certificate renew...","providerName":"myresolver.acme","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"Configuration received: {\"http\":{\"services\":{\"noop\":{}},\"serversTransports\":{\"default\":{\"maxIdleConnsPerHost\":200}}},\"tcp\":{},\"udp\":{},\"tls\":{}}","providerName":"internal","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"Configuration received: {\"http\":{},\"tcp\":{},\"udp\":{},\"tls\":{}}","providerName":"myresolver.acme","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"Provider connection established with docker 27.3.1 (API 1.47)","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"traefik-nextcloud-traefik-442b29b9328659fc037891d538c1fc9cb6c8f88eb5d9bb5bfd998c77f7ac6ffc","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"db-nextcloud-traefik-1b8ed0b61cc473ac3781c3cca5472143c53e2796740d8e61202a33a5013caa4a","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"pihole-pihole-server-6415a580f84ebff11633c97d48d8da65fdfe450a30dbc6a11a6824c9045325f8","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"plex-b47ce00c754949574ea26b9c0d77c29eec6fce2a2a26d5caa3f9343f2a7af41c","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"webserver-paperless-ngx-b6b35f2ba6bbd99fa4dad7e6211c5b64086e0dd27edc48b54f759f21562c8946","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"db-paperless-ngx-dab74a5ff1020b0973a7275a8bfa2210ab3d9a6f743e75df6acd0d47954200fb","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"broker-paperless-ngx-6a93200095adc1de826534a3dba6ae023a9ad232d7f085c6867a3aa034fb6c20","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"portainer-332584079d1ff6bafd0439c4317d52da0fcd7bc0b8d94b5a149ddd1a349d5c70","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"Configuration received: {\"http\":{\"routers\":{\"nextcloud\":{\"entryPoints\":[\"websecure\"],\"middlewares\":[\"file:nextcloud-dav\"],\"service\":\"nextcloud\",\"rule\":\"Host(`myfancy.net`)\",\"tls\":{\"certResolver\":\"myresolver\"}},\"nextcloud-http\":{\"entryPoints\":[\"web\"],\"middlewares\":[\"file:redirect-to-https\"],\"service\":\"nextcloud\",\"rule\":\"Host(`myfancy.net`)\"}},\"services\":{\"nextcloud\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://172.19.0.3:80\"}],\"passHostHeader\":true}}}},\"tcp\":{},\"udp\":{}}","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"No default certificate, fallback to the internal generated certificate","time":"2024-10-26T19:46:19Z","tlsStoreName":"default"}
{"level":"debug","msg":"Adding certificate for domain(s) myfancy.net","time":"2024-10-26T19:46:19Z"}
{"level":"debug","msg":"No default certificate, fallback to the internal generated certificate","time":"2024-10-26T19:46:20Z","tlsStoreName":"default"}
{"entryPointName":"web","level":"debug","middlewareName":"pipelining","middlewareType":"Pipelining","msg":"Creating middleware","routerName":"nextcloud-http@docker","serviceName":"nextcloud","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"web","level":"debug","msg":"Creating load-balancer","routerName":"nextcloud-http@docker","serviceName":"nextcloud","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"web","level":"debug","msg":"Creating server 0 http://172.19.0.3:80","routerName":"nextcloud-http@docker","serverName":0,"serviceName":"nextcloud","time":"2024-10-26T19:46:20Z"}
{"level":"debug","msg":"child http://172.19.0.3:80 now UP","time":"2024-10-26T19:46:20Z"}
{"level":"debug","msg":"Propagating new UP status","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"web","level":"debug","middlewareName":"tracing","middlewareType":"TracingForwarder","msg":"Added outgoing tracing middleware nextcloud","routerName":"nextcloud-http@docker","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"web","level":"error","msg":"middleware \"file:redirect-to-https@docker\" does not exist","routerName":"nextcloud-http@docker","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"web","level":"debug","middlewareName":"traefik-internal-recovery","middlewareType":"Recovery","msg":"Creating middleware","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"debug","middlewareName":"pipelining","middlewareType":"Pipelining","msg":"Creating middleware","routerName":"nextcloud@docker","serviceName":"nextcloud","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"debug","msg":"Creating load-balancer","routerName":"nextcloud@docker","serviceName":"nextcloud","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"debug","msg":"Creating server 0 http://172.19.0.3:80","routerName":"nextcloud@docker","serverName":0,"serviceName":"nextcloud","time":"2024-10-26T19:46:20Z"}
{"level":"debug","msg":"child http://172.19.0.3:80 now UP","time":"2024-10-26T19:46:20Z"}
{"level":"debug","msg":"Propagating new UP status","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"debug","middlewareName":"tracing","middlewareType":"TracingForwarder","msg":"Added outgoing tracing middleware nextcloud","routerName":"nextcloud@docker","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"error","msg":"middleware \"file:nextcloud-dav@docker\" does not exist","routerName":"nextcloud@docker","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"debug","middlewareName":"traefik-internal-recovery","middlewareType":"Recovery","msg":"Creating middleware","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"debug","msg":"Adding route for myfancy.net with TLS options default","time":"2024-10-26T19:46:20Z"}
{"ACME CA":"https://acme-v02.api.letsencrypt.org/directory","level":"debug","msg":"Trying to challenge certificate for domain [myfancy.net] found in HostSNI rule","providerName":"myresolver.acme","routerName":"nextcloud@docker","rule":"Host(`myfancy.net`)","time":"2024-10-26T19:46:20Z"}
{"ACME CA":"https://acme-v02.api.letsencrypt.org/directory","level":"debug","msg":"Looking for provided certificate(s) to validate [\"myfancy.net\"]...","providerName":"myresolver.acme","routerName":"nextcloud@docker","rule":"Host(`myfancy.net`)","time":"2024-10-26T19:46:20Z"}
{"ACME CA":"https://acme-v02.api.letsencrypt.org/directory","level":"debug","msg":"No ACME certificate generation required for domains [\"myfancy.net\"].","providerName":"myresolver.acme","routerName":"nextcloud@docker","rule":"Host(`myfancy.net`)","time":"2024-10-26T19:46:20Z"}

And the nextcloud warnings

Your web server is not properly set up to resolve `.well-known` URLs, failed on: `/.well-known/caldav` For more details see the documentation ↗.
24 errors in the logs since October 19, 2024, 10:04:49 PM
One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command `occ maintenance:repair --include-expensive` to perform the migrations.
Detected some missing optional indices. Occasionally new indices are added (by Nextcloud or installed applications) to improve database performance. Adding indices can sometimes take awhile and temporarily hurt performance so this is not done automatically during upgrades. Once the indices are added, queries to those tables should be faster. Use the command `occ db:add-missing-indices` to add them. Missing indices: "systag_by_objectid" in table "systemtag_object_mapping". For more details see the documentation ↗.
The database is used for transactional file locking. To enhance performance, please configure memcache, if available. For more details see the documentation ↗.
You have not set or verified your email server configuration, yet. Please head over to the "Basic settings" in order to set them. Afterwards, use the "Send email" button below the form to verify your settings. For more details see the documentation ↗.

This is the explicit link for the well known issue but I have already these rewrite rules in my .htcaccess its just because of traefik reverse proxy who needs to do more from what I have understood (doc: General troubleshooting — Nextcloud latest Administration Manual latest documentation )

I'm sorry here is the missing information...

nextcloud server
Your web server is not properly set up to resolve `.well-known` URLs, failed on: `/.well-known/caldav` For more details see the documentation ↗. 24 errors in the logs since October 19, 2024, 10:04:49 PM One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command `occ maintenance:repair --include-expensive` to perform the migrations. Detected some missing optional indices. Occasionally new indices are added (by Nextcloud or installed applications) to improve database performance. Adding indices can sometimes take awhile and temporarily hurt performance so this is not done automatically during upgrades. Once the indices are added, queries to those tables should be faster. Use the command `occ db:add-missing-indices` to add them. Missing indices: "systag_by_objectid" in table "systemtag_object_mapping". For more details see the documentation ↗. The database is used for transactional file locking. To enhance performance, please configure memcache, if available. For more details see the documentation ↗. You have not set or verified your email server configuration, yet. Please head over to the "Basic settings" in order to set them. Afterwards, use the "Send email" button below the form to verify your settings. For more details see the documentation ↗.

the wellknown issue sends me here General troubleshooting — Nextcloud latest Administration Manual latest documentation and there it states something about .htaccess but I have already these lines inside and it has to be connected to the traefik reverse proxy not doing enough as I have found some threads about it

and traefik.log

{"level":"debug","msg":"Static configuration loaded {\"global\":{\"checkNewVersion\":true},\"serversTransport\":{\"maxIdleConnsPerHost\":200},\"entryPoints\":{\"traefik\":{\"address\":\":8080\",\"transport\":{\"lifeCycle\":{\"graceTimeOut\":\"10s\"},\"respondingTimeouts\":{\"idleTimeout\":\"3m0s\"}},\"forwardedHeaders\":{},\"http\":{},\"http2\":{\"maxConcurrentStreams\":250},\"udp\":{\"timeout\":\"3s\"}},\"web\":{\"address\":\":80\",\"transport\":{\"lifeCycle\":{\"graceTimeOut\":\"10s\"},\"respondingTimeouts\":{\"idleTimeout\":\"3m0s\"}},\"forwardedHeaders\":{},\"http\":{},\"http2\":{\"maxConcurrentStreams\":250},\"udp\":{\"timeout\":\"3s\"}},\"websecure\":{\"address\":\":443\",\"transport\":{\"lifeCycle\":{\"graceTimeOut\":\"10s\"},\"respondingTimeouts\":{\"idleTimeout\":\"3m0s\"}},\"forwardedHeaders\":{},\"http\":{},\"http2\":{\"maxConcurrentStreams\":250},\"udp\":{\"timeout\":\"3s\"}}},\"providers\":{\"providersThrottleDuration\":\"2s\",\"docker\":{\"watch\":true,\"endpoint\":\"unix:///var/run/docker.sock\",\"defaultRule\":\"Host(`{{ normalize .Name }}`)\",\"swarmModeRefreshSeconds\":\"15s\"}},\"log\":{\"level\":\"DEBUG\",\"filePath\":\"/logs/traefik.log\",\"format\":\"json\"},\"accessLog\":{\"filePath\":\"/logs/traefik_access.log\",\"format\":\"json\",\"filters\":{},\"fields\":{\"defaultMode\":\"keep\",\"headers\":{\"defaultMode\":\"drop\",\"names\":{\"User-Agent\":\"keep\"}}}},\"certificatesResolvers\":{\"myresolver\":{\"acme\":{\"email\":\"myemail@123.com\",\"caServer\":\"https://acme-v02.api.letsencrypt.org/directory\",\"storage\":\"/letsencrypt/acme.json\",\"keyType\":\"RSA4096\",\"certificatesDuration\":2160,\"tlsChallenge\":{}}}}}","time":"2024-10-26T19:46:17Z"}
{"level":"info","msg":"\nStats collection is disabled.\nHelp us improve Traefik by turning this feature on :)\nMore details on: https://doc.traefik.io/traefik/contributing/data-collection/\n","time":"2024-10-26T19:46:17Z"}
{"entryPointName":"traefik","level":"debug","msg":"Starting TCP Server","time":"2024-10-26T19:46:17Z"}
{"level":"info","msg":"Starting provider aggregator aggregator.ProviderAggregator","time":"2024-10-26T19:46:17Z"}
{"entryPointName":"websecure","level":"debug","msg":"Starting TCP Server","time":"2024-10-26T19:46:17Z"}
{"entryPointName":"web","level":"debug","msg":"Starting TCP Server","time":"2024-10-26T19:46:17Z"}
{"level":"info","msg":"Starting provider *traefik.Provider","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"*traefik.Provider provider configuration: {}","time":"2024-10-26T19:46:17Z"}
{"level":"info","msg":"Starting provider *docker.Provider","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"*docker.Provider provider configuration: {\"watch\":true,\"endpoint\":\"unix:///var/run/docker.sock\",\"defaultRule\":\"Host(`{{ normalize .Name }}`)\",\"swarmModeRefreshSeconds\":\"15s\"}","time":"2024-10-26T19:46:17Z"}
{"level":"info","msg":"Starting provider *acme.ChallengeTLSALPN","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"*acme.ChallengeTLSALPN provider configuration: {}","time":"2024-10-26T19:46:17Z"}
{"level":"info","msg":"Starting provider *acme.Provider","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"*acme.Provider provider configuration: {\"email\":\"myemail@123.com\",\"caServer\":\"https://acme-v02.api.letsencrypt.org/directory\",\"storage\":\"/letsencrypt/acme.json\",\"keyType\":\"RSA4096\",\"certificatesDuration\":2160,\"tlsChallenge\":{},\"ResolverName\":\"myresolver\",\"store\":{},\"TLSChallengeProvider\":{},\"HTTPChallengeProvider\":{}}","time":"2024-10-26T19:46:17Z"}
{"ACME CA":"https://acme-v02.api.letsencrypt.org/directory","level":"debug","msg":"Attempt to renew certificates \"720h0m0s\" before expiry and check every \"24h0m0s\"","providerName":"myresolver.acme","time":"2024-10-26T19:46:17Z"}
{"ACME CA":"https://acme-v02.api.letsencrypt.org/directory","level":"info","msg":"Testing certificate renew...","providerName":"myresolver.acme","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"Configuration received: {\"http\":{\"services\":{\"noop\":{}},\"serversTransports\":{\"default\":{\"maxIdleConnsPerHost\":200}}},\"tcp\":{},\"udp\":{},\"tls\":{}}","providerName":"internal","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"Configuration received: {\"http\":{},\"tcp\":{},\"udp\":{},\"tls\":{}}","providerName":"myresolver.acme","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"Provider connection established with docker 27.3.1 (API 1.47)","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"traefik-nextcloud-traefik-442b29b9328659fc037891d538c1fc9cb6c8f88eb5d9bb5bfd998c77f7ac6ffc","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"db-nextcloud-traefik-1b8ed0b61cc473ac3781c3cca5472143c53e2796740d8e61202a33a5013caa4a","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"pihole-pihole-server-6415a580f84ebff11633c97d48d8da65fdfe450a30dbc6a11a6824c9045325f8","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"plex-b47ce00c754949574ea26b9c0d77c29eec6fce2a2a26d5caa3f9343f2a7af41c","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"webserver-paperless-ngx-b6b35f2ba6bbd99fa4dad7e6211c5b64086e0dd27edc48b54f759f21562c8946","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"db-paperless-ngx-dab74a5ff1020b0973a7275a8bfa2210ab3d9a6f743e75df6acd0d47954200fb","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"broker-paperless-ngx-6a93200095adc1de826534a3dba6ae023a9ad232d7f085c6867a3aa034fb6c20","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"container":"portainer-332584079d1ff6bafd0439c4317d52da0fcd7bc0b8d94b5a149ddd1a349d5c70","level":"debug","msg":"Filtering disabled container","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"Configuration received: {\"http\":{\"routers\":{\"nextcloud\":{\"entryPoints\":[\"websecure\"],\"middlewares\":[\"file:nextcloud-dav\"],\"service\":\"nextcloud\",\"rule\":\"Host(`myfancy.net`)\",\"tls\":{\"certResolver\":\"myresolver\"}},\"nextcloud-http\":{\"entryPoints\":[\"web\"],\"middlewares\":[\"file:redirect-to-https\"],\"service\":\"nextcloud\",\"rule\":\"Host(`myfancy.net`)\"}},\"services\":{\"nextcloud\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://172.19.0.3:80\"}],\"passHostHeader\":true}}}},\"tcp\":{},\"udp\":{}}","providerName":"docker","time":"2024-10-26T19:46:17Z"}
{"level":"debug","msg":"No default certificate, fallback to the internal generated certificate","time":"2024-10-26T19:46:19Z","tlsStoreName":"default"}
{"level":"debug","msg":"Adding certificate for domain(s) myfancy.net","time":"2024-10-26T19:46:19Z"}
{"level":"debug","msg":"No default certificate, fallback to the internal generated certificate","time":"2024-10-26T19:46:20Z","tlsStoreName":"default"}
{"entryPointName":"web","level":"debug","middlewareName":"pipelining","middlewareType":"Pipelining","msg":"Creating middleware","routerName":"nextcloud-http@docker","serviceName":"nextcloud","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"web","level":"debug","msg":"Creating load-balancer","routerName":"nextcloud-http@docker","serviceName":"nextcloud","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"web","level":"debug","msg":"Creating server 0 http://172.19.0.3:80","routerName":"nextcloud-http@docker","serverName":0,"serviceName":"nextcloud","time":"2024-10-26T19:46:20Z"}
{"level":"debug","msg":"child http://172.19.0.3:80 now UP","time":"2024-10-26T19:46:20Z"}
{"level":"debug","msg":"Propagating new UP status","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"web","level":"debug","middlewareName":"tracing","middlewareType":"TracingForwarder","msg":"Added outgoing tracing middleware nextcloud","routerName":"nextcloud-http@docker","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"web","level":"error","msg":"middleware \"file:redirect-to-https@docker\" does not exist","routerName":"nextcloud-http@docker","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"web","level":"debug","middlewareName":"traefik-internal-recovery","middlewareType":"Recovery","msg":"Creating middleware","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"debug","middlewareName":"pipelining","middlewareType":"Pipelining","msg":"Creating middleware","routerName":"nextcloud@docker","serviceName":"nextcloud","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"debug","msg":"Creating load-balancer","routerName":"nextcloud@docker","serviceName":"nextcloud","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"debug","msg":"Creating server 0 http://172.19.0.3:80","routerName":"nextcloud@docker","serverName":0,"serviceName":"nextcloud","time":"2024-10-26T19:46:20Z"}
{"level":"debug","msg":"child http://172.19.0.3:80 now UP","time":"2024-10-26T19:46:20Z"}
{"level":"debug","msg":"Propagating new UP status","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"debug","middlewareName":"tracing","middlewareType":"TracingForwarder","msg":"Added outgoing tracing middleware nextcloud","routerName":"nextcloud@docker","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"error","msg":"middleware \"file:nextcloud-dav@docker\" does not exist","routerName":"nextcloud@docker","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"debug","middlewareName":"traefik-internal-recovery","middlewareType":"Recovery","msg":"Creating middleware","time":"2024-10-26T19:46:20Z"}
{"entryPointName":"websecure","level":"debug","msg":"Adding route for myfancy.net with TLS options default","time":"2024-10-26T19:46:20Z"}
{"ACME CA":"https://acme-v02.api.letsencrypt.org/directory","level":"debug","msg":"Trying to challenge certificate for domain [myfancy.net] found in HostSNI rule","providerName":"myresolver.acme","routerName":"nextcloud@docker","rule":"Host(`myfancy.net`)","time":"2024-10-26T19:46:20Z"}
{"ACME CA":"https://acme-v02.api.letsencrypt.org/directory","level":"debug","msg":"Looking for provided certificate(s) to validate [\"myfancy.net\"]...","providerName":"myresolver.acme","routerName":"nextcloud@docker","rule":"Host(`myfancy.net`)","time":"2024-10-26T19:46:20Z"}
{"ACME CA":"https://acme-v02.api.letsencrypt.org/directory","level":"debug","msg":"No ACME certificate generation required for domains [\"myfancy.net\"].","providerName":"myresolver.acme","routerName":"nextcloud@docker","rule":"Host(`myfancy.net`)","time":"2024-10-26T19:46:20Z"}

I'm sorry here is the missing information...

nextcloud server
Your web server is not properly set up to resolve `.well-known` URLs, failed on: `/.well-known/caldav` For more details see the documentation ↗. 24 errors in the logs since October 19, 2024, 10:04:49 PM One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command `occ maintenance:repair --include-expensive` to perform the migrations. Detected some missing optional indices. Occasionally new indices are added (by Nextcloud or installed applications) to improve database performance. Adding indices can sometimes take awhile and temporarily hurt performance so this is not done automatically during upgrades. Once the indices are added, queries to those tables should be faster. Use the command `occ db:add-missing-indices` to add them. Missing indices: "systag_by_objectid" in table "systemtag_object_mapping". For more details see the documentation ↗. The database is used for transactional file locking. To enhance performance, please configure memcache, if available. For more details see the documentation ↗. You have not set or verified your email server configuration, yet. Please head over to the "Basic settings" in order to set them. Afterwards, use the "Send email" button below the form to verify your settings. For more details see the documentation ↗.

the wellknown issue sends me here General troubleshooting — Nextcloud latest Administration Manual latest documentation and there it states something about .htaccess but I have already these lines inside and it has to be connected to the traefik reverse proxy not doing enough as I have found some threads about it

and traefik.log {"level":"info","msg":"Traefik version 2.9.10 built on 2023-04-06T16:15:08Z","ti - Pastebin.com

Did you search for your issue? Maybe this helps: