Skip to main content

NextCloud customization

Introduction

The solution indicated here works on a turnkeylinux LXC image for NextCloud.

Change the data location

To change the data location, you need to edit the /var/www/nextcloud/config/config.php file:

<?php
$CONFIG = array (
  'passwordsalt' => 'salt',
  'secret' => 'secret',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'example.com',
  ),

## data directory path
  'datadirectory' => '/var/www/nextcloud-data',#  <---- change that to '/path/to/your/data/folder'
  'dbtype' => 'mysql',
  'version' => '30.0.0.14',
  'overwrite.cli.url' => 'http://example.com',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'password',
  'installed' => true,
  'instanceid' => 'id-number',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'log_type' => 'file',

## log file path
  'logfile' => '/var/www/nextcloud-data/nextcloud.log',# <------ change that to '/path/to/your/data/folder/nextcloud.log'
  'loglevel' => 3,
  'maintenance' => false,
  'theme' => '',
  'updater.secret' => 'secret',
);