Nextcloud 26.0.0 do not write logfile

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 26.0.0
Operating system and version (eg, Ubuntu 20.04): rocky 9
Apache or nginx version (eg, Apache 2.4.25): 2.4.53
PHP version (eg, 7.4): 8.0.27

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. configure log as logfile in config.php
  2. restart httpd
  3. admire the empty logfile

The output of your Nextcloud log in Admin > Logging:


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

  'logtimezone' => 'Europe/Paris',
  'log_type' => 'file',
  'logfile' => 'nextcloud.log',
  'loglevel' => '3',

The output of your Apache/nginx/system log in /var/log/____:

not relevant here

not relevant here

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.


Hi friends. Hope everyone is doing well.

I got this issue today i really feel dumb about it.

i double checked the location of the file with :

sudo -u apache php /var/www/html/nextcloud/occ log:file

Log backend file: enabled
Log file: nextcloud.log
Rotate at: 100 MB

i found the log file

find / -name nextcloud.log | xargs ls -lah

-rw-rw-rw-. 1 apache apache 0 May 29 10:58 /var/www/html/nextcloud/data/nextcloud.log

at some point the conf worked but after adding the timezone it failed.
So i removed this options and tried many other possibilities

the official documentation config :

"log_type" => "file",
"logfile" => "nextcloud.log",
"loglevel" => 3,
"logdateformat" => "F d, Y H:i:s",

this sub workaround config :

nothing works anymore but it worked at some point that’s why i’m puzzled.

am i missing an obvious point here ?

SElinux is disabled.
I cannot find the log which can tell me why logging doesn’t work.

Can some nexctloud wizard give me a hint here cause i feel so dumb about this.

Thank you very much and have a good day.

i changed the config with this block :

  'log_type' => 'file',
  'logfile' => 'nextcloud.log',
  'loglevel' => 2,
  'logdateformat' => 'F d, Y H:i:s',
  'log.condition' =>
  array (
    'apps' =>
    array (
      0 => 'admin_audit',

i removed all logfiles with :

find / -name nextcloud.log | xargs rm

and immediately i can see all those logfile :

-rw-r-----. 1 apache apache 552 May 29 15:04 /srv/cloudata/nextcloud.log
-rw-r--r--. 1 apache apache   0 May 29 15:04 /var/www/html/nextcloud/nextcloud.log
-rw-r--r--. 1 apache apache   0 May 29 15:04 /var/www/html/nextcloud/ocs/nextcloud.log

i’m really puzzled how it works. it touch different files in different locations (i don’t get why) and those files apparently are read only or cannot be written by nextcloud.