How do I configure the default data drive/folder during install?

#1

I’ve been trying to install/configure NextCloud for the first time on a Ubuntu 18.04 server. I’ve gone through the documentation and Google’d endlessly… Unfortunately I cannot find how to install Nextcloud and have it use a different location to store data files. I have a 2nd hard drive in my server and want to use that exclusively for data. I’ve mounted it as /mount/data and have created a folder on it called “nextcloud”. The documentation (https://docs.nextcloud.com/server/16/admin_manual/installation/installation_wizard.html#data-directory-location) states I should be able to click on “Storage & Database” during initial configuration, but I don’t have that option on the screen. It only lets me create the admin account/password and click “Finish setup”.

I’ve also tried the method described here: https://github.com/nextcloud/nextcloud-snap/issues/150#issuecomment-267641192

But that breaks Nextcloud and then I keep getting an internal server errror.

What am I missing? Is there another way to do it?

#2

there is a cli version of the initial installation step. did you try that one?

https://docs.nextcloud.com/server/16/admin_manual/configuration_server/occ_command.html?highlight=occ#command-line-installation

looks a kind of

cd /var/www/nextcloud/
sudo -u www-data php occ maintenance:install --database
"mysql" --database-name "nextcloud"  --database-user "root" --database-pass
"password" --admin-user "admin" --admin-pass "password"

which howto did you follow?

#3

I used the snap package in Ubuntu. I think I followed one of the many YouTube videos showing NextCloud being installed under Ubuntu.

#4

that would be a correct way to move the data folder. (in case of snap)

what’s in the error logs? (nextcloud.log)

#5

I’m not in my home office this weekend, so I’ll have to try again Sunday evening and check the logs then. With the snap package, is there any other way to configure the data file location at the time of install/configure? I don’t care if the database is on the primary drive, but I want all the user data on a 2nd HD.