Change path for user data

Hi help me pls
i installed ubuntu 22.04.3 and nextcloud 27.1.3 (snap)
I haven’t created an administrator yet.
i want change path for user data
I can’t find information on how to do this.

image

I want to store data on disk sdb

Your disk sdb has 2 partitions choose one or create one big partition and mount it somewhere like /media/nextcloud or /srv/nextcloud-data or …

then adjust your nextcloud installation where you installed nextcloud config/config.php and adjust your datadirectory there or use the occ command to change the datadirectory.

I can’t figure out where to change let to data.
NextCloud installed /var/snap/nextcloud
there is a file in the folders
/38457/nextcloud/config/config.php or
/39212/nextcloud/config/config.php

<?php
$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' => 
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'log_type' => 'file',
  'logfile' => '/var/snap/nextcloud/current/logs/nextcloud.log',
  'logfilemode' => 416,
  'instanceid' => 'ocfradjjgish',
);

I can’t figure out what needs to be changed

i created
mkdir /mnt/ncdata/
mount /dev/sdb1 /mnt/ncdata/

I want to place data files in “ncdata”

Hello,

Check this → Files inside of External storage won’t show in nextcloud (Snap Package) - :information_source: Support - Nextcloud community

Thanks.,