Nextcloud Installation Fails - Internal Server Error After Creating Admin Account

Hello everyone,

I’m experiencing an issue with the initial installation of my Nextcloud instance using Docker. Every time I set up the server for the first time, create an admin account, and click “Install,” it loads briefly and then displays an “Internal Server Error.” it tryed restarting or just waiting a bit but nothing worked.

System Configuration:

  • Docker-based installation
  • Ubuntu Server 24.04
  • Nextcloud and MariaDB as separate containers
  • My Docker Compose:*
version: '2'
services:
  mariadb:
    image: mariadb
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed
    ports:
      - 9022:3306
    volumes:
      - /root/nextcloud/mariadb:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=****
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=root
  nextcloud:
    image: nextcloud
    restart: always
    ports:
      - 8080:80
    links:
      - mariadb:mysql
    volumes:
      - /home/magnus/nextcloud/nextcloud:/var/www/html
      - /home/magnus/nextcloud/apps:/var/www/html/custom_apps
      - /home/magnus/nextcloud/config:/var/www/html/config
      - /SataSSD/nextcloudData/:/var/www/html/data
    environment:
      - MYSQL_PASSWORD=****
      - MYSQL_USER=root
      - MYSQL_HOST=mariadb

Here are some Error from the docker container:

warning: /var/www/html/config/autoconfig.php differs from the latest version of this image at /usr/src/nextcloud/config/autoconfig.php
and like 10 times this one: 
192.168.178.83 - - [24/Aug/2024:16:48:48 +0000] "GET / HTTP/1.1" 500 702 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"

Steps Already Taken:

  • Checked the Docker-Compose file for obvious errors
  • Ensured all specified directories exist and have the correct permissions

I would appreciate any help or suggestions on how to resolve this issue because its very frustrating.
Thanks!
Magnus

Hi;

I’m a newbie and struggled with this same problem earlier this week; there’s an apparent bug wrt new installations so you need to change your docker to use a previous version of nextcloud as follows:

app:
image: nextcloud:28.0.9
restart: always
etc etc…

Hope this helps;

1 Like

Facing same issue here. Trying to install NC on docker since yesterday but always getting 500 Internal Server Error after the “Create admin User” page. Mine is Rocky Linux 9.2.

Here is my compose file

version: '3'

services:
  db:
    image: mariadb
    restart: unless-stopped
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed
    volumes:
      - db:/var/lib/mysql
    env_file:
      - db.env

  redis:
    image: redis
    restart: always
    command: redis-server --requirepass removed

  app:
    image: nextcloud:latest
    restart: unless-stopped
    ports:
      - 8080:80
    links:
      - db
      - redis
    volumes:
      - nextcloud:/var/www/html
    environment:
      - MYSQL_HOST=db
      - REDIS_HOST_PASSWORD=removed
    env_file:
      - db.env
    depends_on:
      - db
      - redis
volumes:
  db:
  nextcloud:

Getting the same error log as OP in the nextcloud.log. Any help would be appriciated…

Thanks

This one really healped.

Thank you!

Oh Thank you, now it finally worked!
But still Strange how the newest “Stable” version of Nextcloud has such a massive bug in the installation…

Do you guys think it safe to upgrade from 28.0.9 to the newest version of Nextcloud? I don’t want to risk an other Internal Error🥲

The issue seems to only impact manual and semi-manual Docker (installs that use the web based install finisher to enter the initial admin credentials). It does not impact updates nor automated installations.

You can either:

  • use a 29.0.4 image
  • specify the NEXTCLOUD_ADMIN_* variables with your db variables on the Compose (this bypasses the web installer).