Skip to main content

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' => 'secretsalt',
  'secret' => 'supersecret',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '192.168.0.163',
    2 => 'nextcloudpi',
    3 => 'nextcloudpi',
    4 => 'yourexternalipmaybe',
    5 => '192.168.0.163',
    6 => 'cloud.whatever.com',
    11 => '98.171.114.152',
    14 => 'cloud.whatever.com',
    15 => '192.168.0.161',
  ),
  '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' => 'sillylongasspassword',
  'installed' => true,
  'instanceid' => 'someinstanceid',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '192.168.0.157',
    'port' => 6379,
    'timeout' => 0.0,
    'password' => 'AnotherCOOLPassword',
    'dbindex' => 1,
  ),
  'tempdirectory' => '/opt/ncdata/data/tmp',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'hello',
  'mail_domain' => 'yourdomain.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 (
    10 => '127.0.0.1',
    11 => '127.0.0.1',
    12 => '::1',
    13 => '192.168.0.100',
  ),
  'loglevel' => '2',
  'log_type' => 'file',
  'mail_sendmailmode' => 'smtp',
  'htaccess.RewriteBase' => '/',
  'mail_smtphost' => 'mail.server.whatever',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '[email protected]',
  'mail_smtppassword' => 'SomeCoolPassword',
  'mail_smtpsecure' => 'ssl',
  'enable_preview' => true,
  'preview_ffmpeg_path' => '/usr/bin/ffmpeg',
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\MP3',
    6 => 'OC\\Preview\\TXT',
    7 => 'OC\\Preview\\MarkDown',
    8 => 'OC\\Preview\\OpenDocument',
    9 => 'OC\\Preview\\Krita',
    10 => 'OC\\Preview\\HEIC',
    11 => 'OC\\Preview\\MP4',
    12 => 'OC\\Preview\\Movie',
  ),
  'theme' => '',
);