My journey setting up Nextcloud on Raspberry pi4 with SSD HD

I’ve just joined this forum, and expect to be asking quite a few questions of the members in the future, so thought I should start off, before that, by offering the small amount of knowledge I have gained so far to those yet to come.
I’m not new to the raspberry pi itself (I’ve have had a pi3b running Kodi attached to a HHD full of kids/grown up movies for some years now), but I have not ventured far from that path and whilst I have reasonable skills in several IT areas, I only know a little about Linux and its derivatives, just enough to have gotten me by in the past.
The advent of the pi4 and the need for someone to have a Christmas present suggestion for me coupled with time on my hands, with the Covid lockdown, has led me to consider setting up a home based cloud service to replace all my ‘free’ offerings from the likes of ‘dropbox’ , ‘onecloud’ etc. The object being to provide some data security and sharing pathways for the working files and documents on the (several) computers in the house and media such as photo’s and video from our mobile phones - kids included! I did previously (some years ago) have a netgear ReadyNAS that did this, but I had quite a few issues with it and so eventually defaulted to Dropbox and others, but i’ve never felt happy leaving my data on their servers under whatever obscure terms they have in their T&C!
Ideally, I wanted a service running on the raspberry pi4 4gb, attached to my home network via Ethernet and running off a reasonably sized SSD HD via usb. Hopefully , once up and running and configured it could be almost maintenance free!
So, having researched it a bit I settled on giving ‘Nextcloud’ a go, and dug out some sd cards ,downloaded some images and set about trying out some installations to see how they went. There seems to be a wealth of tutorials and help out there, so I searched out and used what I could.
First, I tried installing it manually on top of Debian ‘Buster’ but I found the configuration of the apache server and then Nexcloud settings all a bit confusing. I googled around for setup guides etc and although I could use SSH on the descktop to cut and paste the lines of commands found into the terminal, I really never quite understood how all these instructions all connected up. Also, i’m not sure the info I found always related to my version of Debian and/or Nextcloud, and so, when something didn’t quite work, I was unsure where to look to modify the settings or commands i’d made.
Next, I tried a version that came bundled together with UBuntu Core 16 (is this also known as Ubuntu Appliance?). This was very straight forward and set up went well. Using this I was able to then have a good explore of Nexclouds features and confirm it was the product I wanted. However, this seemed to be based on Nextcloud 18 (currently Nexcloud version 20 is out). Another thing was that I could not seem to move my sd card installation over to the SSD; I could format the SSD disk as btrfs via Nextcloud, but I couldn’t seem to sort out moving the instance across. In fairness, this is probably down to my poor grasp of linux and confusion from several different results of google searches. Not sure how this system relates to ‘snap’ , but I kept coming across this term when searching for information.
Next, I tried NextcloudPi , which has several good instructional tutorials out there, and the installation went well and without issue (probably helped by my previous experiences above) on the SD card and ran fine. So, happy with this option, I then configured the pi4 to boot from USB first, via Raspi-confg, and then wrote the Nextcloud image to the SSD drive (rather than the sd card, as I had initially), removed the sd card from the pi4, plugged the usb/sata cable into the usb 3 port, booted up, let it extract itself and got the installation running on the SSD only. It’s been running a week so far without issue. I’ve set up several users, groups, shared/group folders and all seems good (so far!).
My next avenue would have been to try ‘docker’ but that looked like a steeper learning curve and so was pushed down the list. Hopefully, that’s not needed this time around, time will tell!
Just to add, for reference, the setup I have is a raspberry pi 4 4gb, USB 3.0 to SATA cable with a Kingston A400 240GB SSD HD running (without any extra power via a usb hub etc), connected to LAN via Ethernet and powered by the official Pi4 power supply.
I’ve only opted use this within my home network for the time being (where am I going to go during lockdown??) and so have not configured port forwarding/SSL/Fail2ban etc yet.
Next, for me, is to get my head around the backup systems and options for Nextcloud, but i’ll let it bed in for a week or 2 and resist the temptation to fiddle with it. Concentrate more on retrieving my data from Dropbox etc and sorting/archiving it.
Hope this has been useful if you are just starting this journey.

3 Likes