Changing the path for "appdata_<instanceid>"

Is there a way to change where the “appdata_instanceid” folder is mapped to? By default, it’s in the Nextcloud data directory. I don’t like this because my Nextcloud data directory is mapped to my HDD array, which is slow for reads.

I want all the small files on a faster SSD; for example, the preview generated files under “appdata_instanceid/preview”.

The Nextcloud log file is also located on the data directory by default (which I find bizarre) but I could change this by adding the line

‘logfile’ => ‘/ssd/config/log/nextcloud/nextcloud.log’,

to my config.php file.

Now I want to do the same thing for the entire appdata_instanceid directory, along with “files_external”, which contains a “rootcerts.crt” file that sometimes gets accessed.

I think it is not a new problem. E.g. i found this issue for you for appdata_instanceid folder and Docker. Maybe you can move the folder to the SSD and use a soft link. Read examples.

There’s a pending PR with support for this here:

And the original enhancement request that triggered the PR is here: