Nextcloud (docker) - is it possible to separate user folders and config folders?

Topic says it.
To me it seems a bit messy that configuration files and user folders are in the same top folder.

Example:
image

So Iā€™m wondering if itā€™s possible to split these two things?
Wouldnā€™t it be better to have something like this:

  • nextcloud_top_folder
    • user_directory
    • config_directory
      or
  • nextcloud_config_folder
  • nextcloud_user_folder

Thanks

Hi,

your docker volume config or internal path defs in config.php are wrongā€¦
This should never appearsā€¦

Thanks for answering.
Iā€™m glad you say so. But at the same time I have no clue on how to fix it.
This is the official docker image in Unraid.

My config.php contains this:

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'instanceid',
  'passwordsalt' => 'sure',
  'secret' => 'doublesure',
  'trusted_domains' =>
  array (
    0 => '333.333.33.333:444',
    1 => 'nextcloud.somedomainname.com',
  ),
  'trusted_proxies' =>
  array (
    0 => 'swag',
  ),
  'dbtype' => 'mysql',
  'version' => '24.0.3.2',

In the docker settings, the data dir points to /mnt/user/nextcloud_docker/ (the image shown above).
The docker container itself (Container Path: /config) is located in /mnt/user/appdata/docker-containers/nextcloud

Iā€™m guessing Iā€™m missing a config parameter in config.php then?

Thanks again

I use Portainer and I have created one volume for /config, another volume for /data, and a third volume for /var/www/html.

yeah, but how?
do you create several ā€˜datadirectoryā€™ parameters?

Thanks

I am using only one nextcloud docker volume pointing to /var/www/html.

You can change your docker path with ā€œ/etc/docker/daemon.jsonā€ and set ā€œgraphā€: ā€œ/mnt/dockerā€ or where do you want, e.g. for external, mounted, mirrored or whatever storage if you want higher availability for your docker system.

For more nextcloud user storage i am using the external storage feature.

take a look at description of the official docker image:

Overview of the folders that can be mounted as volumes:

    /var/www/html Main folder, needed for updating
    /var/www/html/custom_apps installed / modified apps
    /var/www/html/config local configuration
    /var/www/html/data the actual data of your Nextcloud
    /var/www/html/themes/<YOUR_CUSTOM_THEME> theming/branding

Thank you for your answer.
But I was hoping that the data folder would just contain the users and their data.
I was able to move the nextcloud.log to another folder, but what about the other folders:

  • files_external
  • appdata_
  • index.html

Iā€™m guesssing .ocdata and .htaccess has to be present?

Thanks again

Iā€™m sorry I have no idea what are you trying to achieveā€¦ Take a look a the docs which folders you can mountā€¦ I donā€™t recommend to fiddle with data which is not expected persist outside of the container - you may introduce strange and hard to troubleshoot issues