linuxserver / docker-nextcloud

GNU General Public License v3.0
677 stars 128 forks source link

[BUG] rootcerts.crt in /data directory casues disks to spins up (Unraid) #309

Closed Nomelas closed 1 year ago

Nomelas commented 1 year ago

Is there an existing issue for this?

Current Behavior

In Unraid, nextcloud has its own share. In Docker, the /data directory is mapped to this share to utilize the array for storage of user-data.

Aside from logs also being written here (which can be overwritten in the config file), there's another problematic file located in /data/files_external/rootcerts.crt

This file is opened periodically and should be in the /config directory, not the /data directory.

Expected Behavior

/data/files_external/rootcerts.crt moved to /config/files_external/rootcerts.crt to avoid disk spin up in Unraid.

Steps To Reproduce

  1. Create docker container in Unraid
  2. Nextcloud share using the array
  3. Disks spin up every time nextcloud reads /data/files_external/rootcerts.crt

Environment

- OS: Unraid 6.11.5
- How docker service was installed: Community Applications Template

CPU architecture

x86-64

Docker creation

Community Applications Template

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    99
User GID:    100
───────────────────────────────────────

using keys found in /config/keys
**** The following site-confs have extensions other than .conf ****
**** This may be due to user customization. ****
**** You should review the files and rename them to use the .conf extension or remove them. ****
**** nginx.conf will only include site-confs with the .conf extension. ****
/config/nginx/site-confs/default
[custom-init] No custom files found, skipping...
[ls.io-init] done.
Nomelas commented 1 year ago

looks like it is referenced here:

/config/www/nextcloud/lib/private/Security/CertificateManager.php:            $certPath = $path . 'rootcerts.crt';
/config/www/nextcloud/lib/private/Security/CertificateManager.php:            return $this->getPathToCertificates() . 'rootcerts.crt';
aptalca commented 1 year ago

That's a Nextcloud thing. It should be reported to them.

nemchik commented 1 year ago

I don't see a way to change this in the documentation for nextcloud's config. You could however try the following:

While this may work, it is not the best way for it to work. The best way would be for nextcloud to have an option to configure where those files live.

chrisborell commented 4 months ago

looks like it is referenced here:

/config/www/nextcloud/lib/private/Security/CertificateManager.php:            $certPath = $path . 'rootcerts.crt';
/config/www/nextcloud/lib/private/Security/CertificateManager.php:            return $this->getPathToCertificates() . 'rootcerts.crt';

How did you end up resolving this? Experiencing the same issue!