Internal server error in Nextcloud + MariaDB docker on RPI4

Hello everyone,

I’m having a nextcloud installation of Nextcloud on my RaspberryPi 4.
It was working well until I downed the docker. Now I’ve got an internal server error while trying to access.

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

I’m using npm as a front reverse proxy.

Here is my compose script :

version: '3'

networks:
  frontend: # my npm network
    external: true
  backend:

services:

  app:
    image: nextcloud
    restart: always
    volumes:
      - ./data/nextcloud:/var/www/html
    environment:
      MYSQL_PASSWORD: 'MY_PASSWORD'
      MYSQL_DATABASE: 'nextcloud'
      MYSQL_USER: 'nextcloud'
      MYSQL_HOST: 'nextcloud-db'
      TZ: 'Europe/Paris'
    networks:
      - frontend
      - backend
    links:
      - db
    external_links:
      - npm-web
    container_name: nextcloud-app

  db:
    image: 'linuxserver/mariadb:arm32v7-latest'
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: 'MY_PASSWORD'
      MYSQL_DATABASE: 'nextcloud'
      MYSQL_USER: 'nextcloud'
      MYSQL_PASSWORD: 'W1lFWpL42nXb3HyxGT0='
      TZ: 'Europe/Paris'
    volumes:
      - ./data/mariadb/mysql:/var/lib/mysql
    networks:
      - backend
    container_name: nextcloud-db

No line was added since I’ve got my problem to my

nextcloud.log

Thinking it may be a file problem I tried to recreate it but with no effect.

Here is the result of my docker-compose up (please note that the last 2 lines appear every time I try to access my Nextcloud installation which makes me think that it’s not a npm error as I seem to be able to reach my container) :

Starting nextcloud-db ... done
Starting nextcloud-app ... done
Attaching to nextcloud-db, nextcloud-app
nextcloud-db | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nextcloud-db | [s6-init] ensuring user provided files have correct perms...exited 0.
nextcloud-db | [fix-attrs.d] applying ownership & permissions fixes...
nextcloud-db | [fix-attrs.d] done.
nextcloud-db | [cont-init.d] executing container initialization scripts...
nextcloud-db | [cont-init.d] 01-envfile: executing...
nextcloud-db | [cont-init.d] 01-envfile: exited 0.
nextcloud-db | [cont-init.d] 10-adduser: executing...
nextcloud-db | usermod: no changes
nextcloud-db |
nextcloud-db | -------------------------------------
nextcloud-db |           _         ()
nextcloud-db |          | |  ___   _    __
nextcloud-db |          | | / __| | |  /  \
nextcloud-db |          | | \__ \ | | | () |
nextcloud-db |          |_| |___/ |_|  \__/
nextcloud-db |
nextcloud-db |
nextcloud-db | Brought to you by linuxserver.io
nextcloud-db | -------------------------------------
nextcloud-db |
nextcloud-db | To support LSIO projects visit:
nextcloud-db | https://www.linuxserver.io/donate/
nextcloud-db | -------------------------------------
nextcloud-db | GID/UID
nextcloud-db | -------------------------------------
nextcloud-db |
nextcloud-db | User uid:    911
nextcloud-db | User gid:    911
nextcloud-db | -------------------------------------
nextcloud-db |
nextcloud-db | [cont-init.d] 10-adduser: exited 0.
nextcloud-db | [cont-init.d] 30-config: executing...
nextcloud-db | [cont-init.d] 30-config: exited 0.
nextcloud-db | [cont-init.d] 40-initialise-db: executing...
nextcloud-db | [cont-init.d] 40-initialise-db: exited 0.
nextcloud-db | [cont-init.d] 90-custom-folders: executing...
nextcloud-db | [cont-init.d] 90-custom-folders: exited 0.
nextcloud-db | [cont-init.d] 99-custom-files: executing...
nextcloud-db | [custom-init] no custom files found exiting...
nextcloud-db | [cont-init.d] 99-custom-files: exited 0.
nextcloud-db | [cont-init.d] done.
nextcloud-db | [services.d] starting services
nextcloud-db | [services.d] done.
nextcloud-db | 220211 15:57:03 mysqld_safe Logging to '/config/databases/771bf7b9d88d.err'.
nextcloud-db | 220211 15:57:03 mysqld_safe Starting mariadbd daemon with databases from /config/databases
nextcloud-app | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.128.3. Set the 'ServerName' directive globally to suppress this message
nextcloud-app | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.128.3. Set the 'ServerName' directive globally to suppress this message
nextcloud-app | [Fri Feb 11 15:57:03.995002 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.52 (Debian) PHP/8.0.15 configured -- resuming normal operations
nextcloud-app | [Fri Feb 11 15:57:03.995176 2022] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
nextcloud-app | 192.168.128.2 - - [11/Feb/2022:15:57:33 +0100] "GET / HTTP/1.1" 500 717 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36 Edg/98.0.1108.43"
nextcloud-app | 192.168.128.2 - - [11/Feb/2022:15:57:33 +0100] "GET /favicon.ico HTTP/1.1" 500 717 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36 Edg/98.0.1108.43"

And finally, here is my config.php. Please not that I never manually edited it :

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => 'ocfladpczmjt',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'subdomain.duckdns.org',
  ),
  'auth.bruteforce.protection.enabled'=> true,
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '23.0.0.10',
  'overwrite.cli.url' => 'https://subdomain.duckdns.org',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => 'nextcloud-db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'MY_PASSWORD',
  'installed' => true,
  'mail_from_address' => 'xxx',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'gmail.com',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpname' => 'xxx@gmail.com',
  'mail_smtppassword' => 'xxx',
  'mail_smtpport' => '587',
);

Don’t hesitate to ask me anything even if that may sound stupid. I’m quite a newbie to docker and also to nextcloud (I used to use nextcloudpi which was much easier but I needed to change to nextcloud).

And of course, I know that if I do a new clear installation, it will work but I would like to understand the error, how to find the logs which are missing and if possible I would like to avoid parametring everything again.

Thanks