Hey, thank you for your fast reply!
This is how my config.php looks like - I have no line called datadirectory and if I understand the description correct, I don’t want to change the directory for the apps but for (my) data, which I’ll share over the network.
<?php
$snap_name = getenv('SNAP_NAME');
$CONFIG = array(
/**
* Use the ``apps_paths`` parameter to set the location of the Apps directory,
* which should be scanned for available apps, and where user-specific apps
* should be installed from the Apps store. The ``path`` defines the absolute
* file system path to the app folder. The key ``url`` defines the HTTP web path
* to that folder, starting from the Nextcloud web root. The key ``writable``
* indicates if a web server can write files to that folder.
*/
'apps_paths' => array(
/**
* These are the default apps shipped with Nextcloud. They are read-only.
*/
array(
'path'=> '/snap/'.$snap_name.'/current/htdocs/apps',
'url' => '/apps',
'writable' => false,
),
/**
* This directory is writable, meant for apps installed by the user.
*/
array(
'path'=> '/var/snap/'.$snap_name.'/current/nextcloud/extra-apps',
'url' => '/extra-apps',
'writable' => true,
),
),
/**
* Database types that are supported for installation.
*
* Available:
* - sqlite (SQLite3 - Not in Enterprise Edition)
* - mysql (MySQL)
* - pgsql (PostgreSQL)
* - oci (Oracle - Enterprise Edition Only)
*/
'supportedDatabases' => array(
'mysql',
),
'memcache.locking' => '\OC\Memcache\Redis',
'memcache.local' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_SOCKET'),
'port' => 0,
),
);
Interestingly I initially had to login over webinterface for the first time, before the config.php had been automatically changed. But isn’t that more a “changing data directory after installation” way?
<?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' => 'nicetryxD',
'passwordsalt' => 'nicetryxD',
'secret' => 'nicetryxD',
'trusted_domains' =>
array (
0 => '192.168.1.2',
),
'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
'overwrite.cli.url' => 'http://192.168.1.2',
'dbtype' => 'mysql',
'version' => '13.0.5.2',
'dbname' => 'nextcloud',
'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => 'nicetryxD',
'installed' => true,
);
Unfortunately after changing the datadirectory and restarting the server, I get the following error message in the webbrowser:
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 didn’t do the thing which you called “rescan the whole new datalocation”, because I can’t use the occ command. As written here, the occ
should be in the nextcloud/
directory. Unfortunately i can’t use the command - I tried all possible folders:
root@server-linux:/var/snap/nextcloud/8267/nextcloud# find / -iname nextcloud
/root/snap/nextcloud
/var/snap/nextcloud
/var/snap/nextcloud/8267/nextcloud
/var/snap/nextcloud/8267/mysql/nextcloud
/var/snap/nextcloud/common/nextcloud
/snap/nextcloud
/snap/nextcloud/8267/htdocs/apps/gallery/js/vendor/nextcloud
root@server-linux:/var/snap/nextcloud/8267/nextcloud# cd /root/snap/nextcloud
root@server-linux:~/snap/nextcloud# occ
Command 'occ' not found, but there are 21 similar ones.
root@server-linux:~/snap/nextcloud# cd /var/snap/nextcloud
root@server-linux:/var/snap/nextcloud# occ
Command 'occ' not found, but there are 21 similar ones.
root@server-linux:/var/snap/nextcloud# cd /var/snap/nextcloud/8267/nextcloud
root@server-linux:/var/snap/nextcloud/8267/nextcloud# occ
Command 'occ' not found, but there are 21 similar ones.
root@server-linux:/var/snap/nextcloud/8267/nextcloud# cd /snap/nextcloud
root@server-linux:/snap/nextcloud# occ
Command 'occ' not found, but there are 21 similar ones.