Nextcloud not logging


I’m having trouble logging in on my NextCloud instance through the web (it seems the mobile app is able to log in although it has trouble syncing).

My first step to solving this issue is to get access to the logs but I can’t seem to convince NextCloud to log anything.

Version info:

  • Nextcloud version: 14:
  • Operating system and version: Ubuntu 14.04
  • Apache version: Apache 2.4.7
  • PHP version: 5.5.9

Old stuff but I need to get up and running again before I can upgrade to a new server.

So my problem is there is nothing appearing in any of the logfiles I’ve check. Here’s my config.php:

$CONFIG = array (
  'instanceid' => '...',
  'passwordsalt' => '...',
  'trusted_domains' => 
  array ( ...  ),
  'datadirectory' => '/home/owncloud_data',
  'overwrite.cli.url' => '',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => '...',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'forcessl' => true,
  'loglevel' => '0',
  'theme' => '',
  'maintenance' => false,
  'secret' => '...',
  'forceSSLforSubdomains' => false,
  'mail_from_address' => '...',
  'mail_domain' => '',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '',
  'mail_smtpport' => '587',
  'mail_smtpname' => '',
  'mail_smtppassword' => '...',
  'trashbin_retention_obligation' => 'auto',

With this config, I’m expecting the logs in /home/owncloud_data/nextcloud.log but this file is not being updated. It’s ownded by www-data but just to be sure I set the permissions to 777. No luck.

There is no Nextcloud info in syslog (grep -i Nextcloud /var/log/syslog yields nothing).

I also created a file /var/log/nextcloud.log owned by www-data and with 777 permissions, but it remains stubbornly empty.

Would you have any suggestion on what else to try?

Thank you!

‘loglevel’ => ‘0’,

set ‘loglevel’ to a value of 1 to 4 to get some results. explanation in config.sample.php, same directory


Thanks for responding. I set the loglevel to 1, restart the webserver (sudo service apache2 restart) and attempt another log-in, but no luck (not for the log-in or for any of the log files I mentioned).

Anyway I think loglevel 0 is valid, it should be the most verbose one. The sample config says: “Valid values are: 0 = Debug, 1 = Info, 2 = Warning, 3 = Error, and 4 = Fatal.”


Just to close this, I eventually figured out what the problem was. I was looking at the wrong installation: The installation I was connecting to via the web was not the one I was checking the log files for. All good now.