NextCloud Config Example
This is an example of my config.php
file for NC. Its usually found in: /var/www/nextcloud/config/
<?php
$CONFIG = array (
'passwordsalt' => 'your-password-salt',
'secret' => 'your-secret-string',
'trusted_domains' =>
array (
0 => 'localhost',
7 => 'nextcloudpi',
5 => 'nextcloudpi.local',
8 => 'nextcloudpi.lan',
3 => 'nextcloudpi',
11 => 'server-wan-ip',
1 => 'another-ip',
14 => 'cloud.domain.com',
),
'datadirectory' => '/opt/ncdata/data',
'dbtype' => 'mysql',
'version' => '30.0.1.2',
'overwrite.cli.url' => 'https://nextcloudpi/',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'ncadmin',
'dbpassword' => 'your-password',
'installed' => true,
'instanceid' => 'your-instance-id',
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis.sock',
'port' => 0,
'timeout' => 0.0,
'password' => 'your-password',
),
'tempdirectory' => '/opt/ncdata/data/tmp',
'mail_smtpmode' => 'sendmail',
'mail_smtpauthtype' => 'LOGIN',
'mail_from_address' => 'email',
'mail_domain' => 'domain.com',
'preview_max_x' => '2048',
'preview_max_y' => '2048',
'jpeg_quality' => '60',
'overwriteprotocol' => 'https',
'maintenance' => false,
'maintenance_window_start' => 1,
'default_phone_region' => 'US',
'logfile' => '/opt/ncdata/data/nextcloud.log',
'trusted_proxies' =>
array (
11 => '127.0.0.1',
12 => '::1',
13 => '192.168.123.456',
15 => '192.168.987.654',
),
'loglevel' => '2',
'log_type' => 'file',
'mail_sendmailmode' => 'smtp',
'htaccess.RewriteBase' => '/',
);