Internal Server Error with Apache

Nextcloud version (eg, 20.0.5):
Operating system and version (eg, Ubuntu 20.04): Ubuntu Server 20.04.2
Apache or nginx version (eg, Apache 2.4.25): Unknown
PHP version (eg, 7.4): Unknown

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Start the server
  2. Connect to it

The output of your Nextcloud log in Admin > Logging:
Unable to access Nextcloud at all

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$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' => '[Removed],
  'passwordsalt' => '[Removed]',
  'secret' => '[Removed]',
  'trusted_domains' => 
  array (
    0 => '',
    1 => '[Removed]',
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'pgsql',
  'version' => '',
  'overwrite.cli.url' => '',
  'dbname' => 'postgres',
  'dbhost' => 'postgres',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_cesium',
  'dbpassword' => '[Removed]',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'no-reply',
  'mail_domain' => '[Removed]',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '[Removed]',
  'mail_smtpport' => '[Removed]',
  'mail_smtpname' => '[Removed]',
  'mail_smtppassword' => '[Removed]',
  '' => 'stable',

The output of your Apache/nginx/system log in /var/log/____:
Log file does not exist

I know this is probably not very helpful, but I’m hoping the error I got could lead us to where the log files are located. I launched it for the first time and it worked for a few hours. I moved the server (a Raspberry Pi) to a different location and ran a script used to remove the old containers, start the new ones, and start my Argo tunnel.

In the screenshot I sent in the issue portion, that was all I could see. There was nothing on any type of error and it didn’t lead me onto any logs. Connecting via the Argo tunnel and the direct IP yield the same results.

One more thing to note is that I used this video to install it this morning. Everything should be the latest version of what ships with the docker image.

I deleted the ~/nextcloud folder, which appears to have erased everything. Starting nextcloud again does successfully start the container and service.

Note: This was marked as a solution but it is not the solution. I no longer have access to that data that was on the instance because this was the equivalent of a fresh install, which I did do at one point. I have no clue when this issue will come up again.

1 Like

Most likely the logfile would have been somewhere in your datadirectory /var/www/html/data
e.g. /var/www/html/data/nextcloud.log

The /var/www/html directory is empty. I have a fresh functional installation right now, so this shouldn’t be what broke the original one.

Would anything change since I installed it with Docker?

Sorry, cannot say for sure. Without the nextcloud logs this is impossible to debug.

Which makes it all the more strange. Besides, the logs might have been overwritten by the new instance.


I found the logs in /var/lib/docker/containers/<container id>/<container id>.log and, as it turns out, Nextcloud was sending 500 errors because it couldn’t access the database. First, the user was incorrect in the config.php file, so I changed that. Then it said the password was incorrect, so I changed that.

Now, I’m getting errors about nonexistent tables.

{"log":"2021-03-02 12:42:10.482 UTC [73] ERROR:  relation \"oc_appconfig\" does not exist at character 15\n","stream":"stderr","time":"2021-03-02T12:42:10.483077726Z"}
{"log":"2021-03-02 12:42:10.482 UTC [73] STATEMENT:  SELECT * FROM \"oc_appconfig\"\n","stream":"stderr","time":"2021-03-02T12:42:10.483240642Z"}

One more thing to note is that this is my second installation and not the one I referenced when I made the question. Same error, though.

EDIT: I’ll mark this one as solved since we know it’s a 500 error. Now, I’ve got something else to look into…

1 Like