help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com 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:
example
Or for longer, use three backticks above and below the code snippet:
longer
example
here
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
Nextcloud version (eg, 20.0.5): 27.1.5
Operating system and version (eg, Ubuntu 20.04): Debian GNU/Linux 12
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.57 (Debian)
PHP version (eg, 7.4): PHP 8.2.7
The issue you are facing:
As admin audit log record connections to NextCloud (login = personal data).
As the GDPR requires personal data to have a limited lifespan by default (generally between 6 months and 1 year for this type of data). Art. 5 GDPR, (e): “kept in a form which permits identification of data subjects for no longer than is necessary for the purposes for which the personal data are processed”.
Insofar as NextCloud does not allow any control over how long Admin audit log are kept and only allows rotation on file size, I’m afraid that no NextCloud user can claim to be GDPR compliant.
Am I wrong? Is there a way to control the length of time connection logs are kept with NextCloud?
Here are the main lines used for deleting log files based on age:
rotate 7: Keeps up to 7 older log files. maxage 30: Deletes log files older than 30 days.
You can adjust these values according to your requirements. Note that daily ensures that log rotation occurs daily. The dateext parameter adds the current date to the rotated log file name, and dateformat -%Y%m%d specifies the date in year-month-day format.
You have to change the log settings from your config.php (example):
With 'log_rotate_size' => 0,Nextcloud does not logrotate at all and so it can be carried out by the operating system’s logrotate service, which guarantees GDPR compliency.