A bid clarification:
-
mount /dev/sdb /mnt/cloud
just mounts the drive by it’s current /dev/ path and just for the current session (until reboot).- Mostly using the /dev/ path works fine, but theoretically it can change, if you unplug/plug other drives. The drive available via
/dev/sdb
first might be available via/dev/sdc
another time. For this reason the UUID method is more secure, as every drive has it’s own unique UUID. Possible would be e.g.mount UUID=c42fe6ea-8529-4f05-9b79-f72cafcfb88c /mnt/cloud
- As mentioned, the mount command just mounts a drive temporary until reboot.
/etc/fstab
will be read on boot and automounts the entries. Thus yes it is enough to do the fstab entry and reboot. If you want to avoid the reboot, themount
command is needed as well.
- Mostly using the /dev/ path works fine, but theoretically it can change, if you unplug/plug other drives. The drive available via
- Within the commands you provide you used
/mnt/data
as well as/mnt/cloud
? I guess this should be the same.
- If you use a default Ubuntu installation (no VM, docker, snap or something), then I would not use the external storage app mentioned by 3Dscrewer, but using the drive directly as Nextcloud data location. If your Nextcloud is already installed, thus data folder is already set, there are possibilities to switch it afterwards: Howto: Change / Move data directory after installation However if you did not yet actively use your Nextcloud, I would recommend to just install it fresh:
- As far as I understood you installed a LAMP server now according to one of the guides? Then it would be something like:
-
rm /path/to/nextcloud/config/config.php
//remove config.php to reset Nextcloud install stage. -
mysqladmin -uroot -p<password> drop nextcloud
//remove existing nextcloud mysql database -
mysql -uroot -p<password> "drop user 'ncuser'@'localhost'"
//remove existing nextcloud mysql user -
sudo -u www-data php /path/to/nextcloud/occ maintenance:install --database "mysql" --database-name "nextcloud" --database-user "root" --database-pass "<password>" --admin-user "Coyote" --admin-pass "<Coyotes_password>" --data-dir "/mnt/cloud"
//This command automatically creates the database user and password and the data directory, configures config.php accordingly and creates the Nextcloud admin user with chosen password. Thus afterwards you can directly log into your Nextcloud without web ui installation.
About NextcloudPi / DietPi:
- NextcloudPi was created for Raspberry Pi first, that’s true. But you can (now) install it on any Debian based system: https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/ It is officially supported by Nextcloud for a while and therefore the only official ready-to-use non container/vitalized solution, as far as I know. It automates many of the recommended settings, also security wise, and/or allow easy setup via web interface.
- DietPi on the other hand provides images for a wide range of SBCs, as well as x86_64 and VMs: http://dietpi.com/#download But it is not for Nextcloud only, thus does not make it as easy as NextcloudPi to setup a proper Nextcloud instance with HTTPS etc enabled. But on the other hand it provides easy installation scripts for a wide range of additional software titles, thus is more flexible from that point of view and starting with a small efficient base image. I myself implemented and maintain a proper Nextcloud (and ownCloud) installation via DietPi’s UI
.
- If you just need Nextcloud, nothing else, I guess NextcloudPi is the more specialized and complete solution for this and provides great support via this forum. If you think about doing some more stuff later on with your machine, then DietPi might be worth looking at, providing a highly efficient base image with easy to use automated installation and configuration scripts (via UI) for a wide range of software titles.