INTERNAL SERVER ERROR after changing data location and rebooting

Nextcloud version (eg, 12.0.2): 16.0.5.1
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04
Apache or nginx version (eg, Apache 2.4.25): unknown, installed by snap?
PHP version (eg, 7.1): unknown, installed by snap?

The issue you are facing:

I just got the NextCloud server up and running last night. It was working although it had a limitation on file size. Today I formatted, partitioned, and mounted a 4TB external hard drive and followed the instructions I found in this forum to move the data location and point to the new location in the config file. I rebooted and now when I try to log on from my internal network, I get the INTERNAL SERVER ERROR message. Also on the app on my phone whether on my network or outside, I still get the same error.

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

Steps to replicate it:

  1. Typed in the address.

The output of your Nextcloud log in Admin > Logging:

CANT ACCESS THE SERVER

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

<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' =>
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'instanceid' => 'ocjiafvqbzld',
  'passwordsalt' => 'r/(redacted)',
  'secret' => '(redacted)',
  'trusted_domains' =>
  array (
    0 => '192.168.0.159',
    1 => '(mysubdomainname.mydomainname.com)',
  ),
  'datadirectory' => '/media/ncexternal/data',
  'dbtype' => 'mysql',
  'version' => '16.0.5.1',
  'overwrite.cli.url' => 'http://192.168.0.159',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '(redacted)',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);


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

CANT FIND THIS LOG

Since you are using Nextcloud-Snap you have to use this guide to move the datadirectory: https://github.com/nextcloud/nextcloud-snap/wiki/Change-data-directory-to-use-another-disk-partition

That’s the guide I used.

I don’t know if you already found the answer as this was posted a while ago but the beginning of the instructions mention the removeable-media plug. You need to run the command:

sudo snap connect nextcloud:removable-media

Then follow the rest of the guide.

I had the same problem you did but after running this one line it was fixed.

4 Likes