Installation Questions

Also consider to use some automated install scripts or ready to use images, like NextcloudPi or DietPi, depending on how much flexibility you need.

Iā€™ll check those out. I really wish I knew how to make scripts because it would be easier when I screw things up, lol. They will work ok even though theyā€™re for the raspberry pi? I figure things will be minimal on those but Iā€™m not sure.

I have one more question. I have an issue with my mount (data folder) does not mounting correctly after reboot. I fixed this before but I donā€™t remember what I did. I think it had something to do with delaying NC or something until after the mount is mounted.

It works correctly when I install NC and then it doesnā€™t after reboot. It shows up on the left side of the screen and is mounted but itā€™s disconnected from NC.

This is what I do:

mkdir /mnt/cloud

mount /dev/sdb /mnt/cloud

gedit /etc/fstab

UUID /mnt/data ext4 defaults, noatime 0 0

chown -R www-data:www-data /mnt/cloud

Am I missing something here? I really appreciate your help.

I donā€™t understand what you are doing. Are we still talking about the VM? In that case there is nothing to mount. After booting the unused space is available for NC.
You have to activate the last app external Storage ā€¦
extern
There you do something like that ā€¦

If you like to use the Windows Drives you have to choose SMB/CIFS in that App

Because there is a bug, you canā€™t add a whole WinDrive in that app, but Folder is ok.

Iā€™m sorry. This is a normal NC installation in Ubuntu. I want my data to go to the mount. I am using a 512 GB SSD for the boot drive and the mount for the NC data. I have too much stuff that wonā€™t fit on the boot drive. The mount is on the same machine. Sorry for the confusion.

Ok, but that should be the same behavior, in the Picture above the ā€œFilesā€ is an mounted 8TB Drive, also to /mnt/xxxx
I am only working at VM so this will definitively work, but also there could be another way ā€¦

When this happens the NC login page says it canā€™t access the data folder. Itā€™s because the mount doesnā€™t mount before NC I guess.

Now I have it, you are doing different things at the mount command and the line in fstab. You are mounting the drive sdb to mnt/cloud by the mount command, but the line in fstab is totally different.

this in fstab should work
/dev/sdb /mnt/cloud ext4 defaults 0 1

So I donā€™t have to do the UUID thing in fstab? Instead do it like you did it?

The UUID is looking like this 6a12a4d5-e9e6-4568-afcc-34c70b24a668.

ls -l /dev/disk/by-uuid

that will show the UUID of your drives but as mentioned above that should work also.

maybe this command is more helpfull

sudo lsblk -o NAME,UUID,FSTYPE,SIZE,LABEL,MOUNTPOINT

Iā€™m sorry for being so difficult, it just shows how this confuses me. I do have NC installed successfully thanks to your help. Itā€™s now just getting this mounted for the data. Below are the steps that I do to add the second HDD for the mount:

mkdir /mnt/cloud

mount /dev/sdb /mnt/cloud

gedit /etc/fstab

add line:

UUID=c42fe6ea-8529-4f05-9b79-f72cafcfb88c /mnt/data ext4 defaults, noatime 0 0

Is there a setting Iā€™m missing for this to mount before NC runs?

chown -R www-data:www-data /mnt/cloud

chmod 775 /mnt/cloud

chmod u+rw -R /mnt/cloud

What do I need to change? The mounting part is confusing to me. Do I just put it in fstab and not mount it earlier like I do? I know you have better stuff to do than help a stranger but I am really grateful for your help with this.
I donā€™t know why the lines are huge above, lol.

fstab is enough (and reboot), if you got no error during booting (red letters, may be to fast to read) the drive is available. Simply move to that mnt/cloud and try to make a folder if that works, everything is fine. The next part is to use the external app (as mentioned above) inside Nextcloud to make it available.

Try the midnight-commander as mentioned in private mail, it is much easier to use.

BTW I am also a beginner at linux. I have started in last December and have to google and read a lot.

A bid clarification:

  1. 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, the mount command is needed as well.
  2. Within the commands you provide you used /mnt/data as well as /mnt/cloud? I guess this should be the same :wink:.
  3. 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 :wink:.
  • 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.

Thank you for explaining how it works. I canā€™t seem to get the concept but
this helps a bunch. In windows itā€™s so much easier because I know it fairly
well. Great catch on the data and cloud. I have changed the name a few
times so I guess I missed that and didnā€™t update the document. Maybe that
was my issue?? I had set everything up in OC 9 and had no issue with it.
There were some changes on the new one and I couldnā€™t figure it out. That
is why Iā€™m installing NC. I know theyā€™re very similar but NC has a much
better community and options.
I keep all of this in a text document and I forgot to change it. I
will try this tonight when I get home and see what happens. I have
everything installed up to this point. Once this is done I can go to the NC
setup and see if it works. Yā€™all are awesome for helping others out with
this stuff.

As far as I understand, he used the Tech and Me script. The script is originally written for an VM using Ubuntu 16.04 LTS, but he is using it on a standard PC, so he wasted some space for the VM Utils.
I have suggested this script because I know that it is working, I have used it a lot ā€¦
I think he is happy enough that the Cloud is now running. So keep it simple ā€¦
He has an 500GB BootDrive, thats imho enough storage for syncing Files (I have only 100), using the 2nd Drive as Filestorage by the External APP should be the easiest way.
Since his other PC('s) are Windows based (so far I understand), I see the next problem coming ā€¦

1 Like

Jep, sorry for interfering in case, since you guys already talked via PM?

If itā€™s working now, or after fixing the /mnt/cloud /mnt/data typo, then itā€™s properly not worth it to reinstall again. And as said, my installation advice is just valid for non-VM/container installations, where in these cases thinks might be very different due to special pre-configurations.

No, he is using normal hardware with an Ubuntu installation, but he is using this script which is intended for an VM ā€¦ or with other words, enoch85 is selling a ready VM and in this VM he is using this script ā€¦
My opinion was that the script must also work in normal configuration and yes it is.

https://raw.githubusercontent.com/nextcloud/vm/master/nextcloud_install_production.sh

The PM was because Midnight Commander. Iā€™m this year 60 and I know the Norton Commander very well. It is usefull to examine a non GUI System without typing a lot ā€¦ :grinning:

Coyote_Hunter wrote that he has a personal issue, he has to write down a lot to remember it and so my idea was the script to get the cloud running ā€¦

any help is appreciated and welcome because I am also a beginner, Thanks

1 Like

Iā€™ve read a lot on Linux but I canā€™t remember the information well. If I do anything I have to keep track because I wonā€™t remember 10 minutes later if I did it or not. I had a bad head injury in 2006 so itā€™s something I have to deal with. Changes arenā€™t good for me, lol.

Itā€™s working now!!! I really appreciate everything you did for me. I also appreciate your patience too. Hopefully they wonā€™t change it anytime soon. One of these days I will try to get the SSL working but Iā€™m happy that it just works now. I have it all noted so if I mess it up I can always fix it easily. It would be nice to just run a script and it will be set up but this will do just fine. Again, thank you for all of your help.

1 Like

Just for the record, the script can be used on a barebone server/PC and inside a VM. There is no difference between a VM and a baremetal machine really, the only thing I can think of now is that we use additional cloud kernels in the scripts to adapt to the virtual environment. But, as I said, it will work to use the scripts on a regular PC as well, or even a laptop if you feel like it. As long as itā€™s running Ubuntu Server 16.04.