Error messages in Nextcloud Docker Setup with Reverse Proxy

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.5
  • Operating system and version (e.g., Ubuntu 24.04):
    • Nextcloud Docker running on Fedora 41
  • Web server and version (e.g, Apache 2.4.25):
    • Docker
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Traefik 2
  • PHP version (e.g, 8.3):
    • 8.2.27
  • Is this the first time you’ve seen this error? (Yes / No):
    • No, but i did not get to fix it yet
  • When did this problem seem to first start?
    • since installation
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Docker
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

After Installing Nextcloud i am facing various error messages.
Even after having read the docs multiple times i still dont understand how i could fix this… In the config section i pasted my nextcloud config.php, traefiks dynamic.yml and the docker compose file of my nextcloud.


Would really appreciate any hints on whats wrong in my config!
About my setup:
I have installed nextcloud as a docker service on a fedora 41 machine with the ip 192.168.177.110
In front of it i am running traefik as a reverse proxy on 192.168.177.103

Steps to replicate it (hint: details matter!):

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

PASTE HERE

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

PASTE

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

sudo docker exec -ti --user www-data nextcloud-docker-app-1 /var/www/html/occ config:list system
{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "upgrade.disable-web": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "172.20.10.13:8080",
            "192.168.177.110:8080",
            "bar.bar.tld",
            "foo.bar.tld",
            "domain.tld",
            "www.domain.tld",
            "192.168.177.110:8443"
        ],
        "trustes_proxies": [
            "192.168.177.103"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.5.1",
        "overwritehost": "www.domain.tld",
        "overwriteprotocol": "https",
        "overwritewebroot": "\/",
        "overwritecondaddr": "^192\\.168\\.177\\.103$",
        "overwrite.cli.url": "https:\/\/www.domain.tld",
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED_FOR"
        ],
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "maintenance_window_start": 1,
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "loglevel": 2
    }
}
volumes:
  #nextcloud:
  db:

services:
  db:
    image: mariadb:10.6
    restart: always
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=bahvie6v
      - MYSQL_PASSWORD=
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  app:
    image: nextcloud
    restart: always
    ports:
      - 8080:80
      - 8443:443
    links:
      - db
    volumes:
      - ./nextcloud:/var/www/html
    environment:
      - PHP_UPLOAD_MAX_FILESIZE=2G
      - PHP_POST_MAX_SIZE=2G
      - MYSQL_PASSWORD=
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db
      - REDIS_HOST=redis

  redis:
    image: redis:alpine
    restart: unless-stopped
http:
    middlewares:
        auth:
            basicAuth:
                users:
                    - user:password
                removeHeader: true
        nextcloud-secure-headers:
            headers:
                hostsProxyHeaders:
                    - "X-Forwarded-Host"
                referrerPolicy: "same-origin"
        https-redirect:
            redirectscheme:
                scheme: https
        nextcloud-chain:
            chain:
                middlewares:
          # - ... (e.g. rate limiting middleware)
                    - https-redirect
                    - nextcloud-secure-headers
    routers:
      api-internal:
        rule: PathPrefix(`/dashboard`) || PathPrefix(`/api`)
        middlewares: auth@file
        service: api@internal
        entryPoints: ["dash"]
      nextcloud:
        rule: "Host(`domain.tld`)"
        service: "domain-service"
        entrypoints:
          - "websecure"
        middlewares:
          - nextcloud-chain
      nextcloud2:
        rule: "Host(`www.domain.tld`)"
        service: "domain-service"
        entrypoints:
          - "websecure"
        middlewares:
          - nextcloud-chain

    services:
      domains-service:
        loadBalancer:
          servers:
            - url: "https://192.168.177.110:8443"
      domain-service:
        loadBalancer:
          servers:
            - url: "http://192.168.177.110:8080"

Apps

The output of occ app:list (if possible).

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.