title: nextcloud installed with docker shows Internal Server Error
body: <p>Nextcloud and mariadb were installed through docker-compose using the nextcloud official image posted on the docker hub. At first it ran fine, but at some point I get the following error:</p>
  
  <pre><code>version: '2'
  
  volumes:
    nextcloud:
    db:
  
  services:
    db:
      image: mariadb
      command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
      restart: always
      volumes:
        - db:/var/lib/mysql
      environment:
        - MYSQL_ROOT_PASSWORD=a1234!
        - MYSQL_PASSWORD=a1234!
        - MYSQL_DATABASE=taeil
        - MYSQL_USER=taeil
  
    app:
      image: nextcloud
      ports:
        - 8080:80
      links:
        - db
      volumes:
        - nextcloud:/var/www/html
      restart: always
  
  </code></pre>
  
  <pre><code>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.
  </code></pre>
  
  <p>Container log.</p>
  
  <pre><code>AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
  AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
  [Tue Feb 25 06:22:26.247273 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.15 configured -- resuming normal operations
  [Tue Feb 25 06:22:26.247325 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
  172.18.0.1 - - [25/Feb/2020:06:29:24 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:29:25 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:30:16 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:30:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:31:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:31:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:32:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:32:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:33:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:33:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:34:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:34:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:35:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:35:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:36:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:36:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:37:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:37:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:38:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:38:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:39:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:39:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:40:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:40:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:41:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:41:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:42:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:42:22 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:43:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:43:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:44:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:44:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:45:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:45:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:46:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:46:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:47:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:47:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:48:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:48:23 +0000] "-" 408 0 "-" "-"
  172.18.0.1 - - [25/Feb/2020:06:48:34 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:48:34 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:48:35 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:48:35 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:48:35 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:48:35 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:48:36 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:48:36 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:48:36 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:48:36 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:48:36 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:48:36 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:48:37 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:48:37 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:17 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:26 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:26 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:26 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:26 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:26 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:27 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:28 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:28 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:28 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:28 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:28 +0000] "GET / HTTP/1.1" 500 503 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  172.18.0.1 - - [25/Feb/2020:06:49:28 +0000] "GET /favicon.ico HTTP/1.1" 500 503 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36"
  </code></pre>
  
  <p>Log written inside container.</p>
  
  <pre><code>root@658b066e61eb:/var/www/html/data# cat nextcloud.log 
  {"reqId":"bZA84C2ahOfIiE5TUmlb","level":2,"time":"2020-02-25T02:18:05+00:00","remoteAddr":"172.18.0.1","user":"--","app":"appstoreFetcher","method":"POST","url":"/index.php","message":"Could not connect to appstore: cURL error 28: Resolving timed out after 10000 milliseconds (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36","version":"18.0.1.3"}
  {"reqId":"6bFnYDSahoUE6pPvElgg","level":2,"time":"2020-02-25T02:18:29+00:00","remoteAddr":"172.18.0.1","user":"keti","app":"appstoreFetcher","method":"GET","url":"/settings/apps/list","message":"Could not connect to appstore: cURL error 28: Resolving timed out after 10000 milliseconds (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36","version":"18.0.1.3"}
  {"reqId":"6bFnYDSahoUE6pPvElgg","level":2,"time":"2020-02-25T02:18:39+00:00","remoteAddr":"172.18.0.1","user":"keti","app":"appstoreFetcher","method":"GET","url":"/settings/apps/list","message":"Could not connect to appstore: cURL error 28: Resolving timed out after 10000 milliseconds (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36","version":"18.0.1.3"}
  </code></pre>
  
  <p>Looking at the result of error 28, it is a timeout error and I don't know what is wrong.</p>
  
  <p>I restarted docker with the systemctl command, deleted the docker image and the container and ran it again, but I keep getting the error.</p>
  
  <p>How can I fix this error?</p>