• Welcome to Peterborough Linux User Group (Canada) Forum.
 

NextCloud on RPi 4

Started by fox, January 19, 2021, 12:18:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fox

Well I managed to set up a NextCloud server on my RPi 4. I did it on an SD card, following these instructions. The instructions website actually has an automatic setup script, but I chose to do it manually step by step so that I could get a better idea of how this works. I have my data set up on the SD card, but there is also an option for moving your data to a USB stick or USB drive. I didn't bother at this point, and I only explored NextCloud a little bit, including how to import my contacts and calendar to the "Cloud" (i.e. Nextcloud on my SD card). I also tested to see if I could access it from a computer while the Pi was on, and this worked easily. But I did all that with the Pi connected by ethernet; I haven't tried yet by connecting the Pi wirelessly. If I really wanted to use a NextCloud server, I could connect it by ethernet and run the box headless. I have yet to try to connect to the Pi via SSH; I'll do that another time.

NextCloud has a lot of features if you have a need for them, but for a simple file server, I don't yet see any advantage of it over using OpenMediaVault as your server. One small thing; you can set up NextCloud to give you the local weather upon startup and to send messages, but these aren't things I can't already do better from my computer or phone.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

ssfc72

Nicely done Mike!

So, I imagine trying to stream a video/movie from the SD card may not run very smoothly?  I guess a movie would stream ok if the Data was stored on a USB port/drive?
Mint 20.3 on a Dell 14" Inspiron notebook, HP Pavilion X360, 11" k120ca notebook (Linux Lubuntu), Dell 13" XPS notebook computer (MXLinux)
Cellphone Samsung A50, Koodo pre paid service

fox

#2
Quote from: ssfc72 on January 19, 2021, 03:46:14 PM
....
So, I imagine trying to stream a video/movie from the SD card may not run very smoothly?  I guess a movie would stream ok if the Data was stored on a USB port/drive?
I haven't tried that yet, but you've given me something to try. My next step is to set this up so that I can plug the Pi headless into ethernet and then move the data onto a USB stick. Then I can try streaming. But I have to find another ethernet cable first. I could also try this from OpenMediaVault, but I have set that up before so using NextCloud is teaching me something new.

Incidentally, I haven't considered security yet in my setup. If I were to leave this plugged into my router, I would have to do so. As I recall, it's relatively easy to set it up securely as long as the files are only being accessed on my internal network.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

Jason

You probably don't recall this but I put notes here about installing it on a Pi. Of course, using it with the RPi 4 it should run a lot better because it has more RAM. This is one area where having more RAM is a lot better. You can run more add-ons for NextCloud with more memory.

It's not really a file server although it does let you access files through the interface. What I mean by that is that you can't just go into the Networking feature in Linux or Windows and access files that way. You'd have to install something else (a plug-in perhaps) to do that. I believe that OpenMediaVault is better in this regard. The OMV website describes it as "the next generation network-attached storage (NAS) solution based on Debian Linux. It contains services like SSH, (S)FTP, SMB/CIFS, DAAP media server, RSync, BitTorrent client and many more." However, NextCloud likely has add-ons for these features as there are a lot of add-ons. I counted apps in their app store and got bored after counting a hundred. And I was only 1/3 down the page. I note that OMV has an option to SSH into it and with RSync you can sync your files on your desktop(s) with the files on it. But for plug-ins, OMV is quite limited. It's not at all the same thing.

The NextCloud website calls it a "productivity platform". It doesn't have an email server but you can access email similarly to Thunderbird except available anywhere on the network and Internet if you like. It also had an office suite option, OnlyOffice. NextCloud has tonnes of options you can add to extend its abilities. For example, you can do file syncing to Dropbox, Google Drive, whatever. There's even the ability to host video chats through RocketChat (an add-on) as well. You'd definitely need more RAM and a fast connection for that but I would expect the RPi 4 is up to the job if it can do the encoding.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

Jason

Quote from: fox on January 19, 2021, 05:10:19 PM
Incidentally, I haven't considered security yet in my setup. If I were to leave this plugged into my router, I would have to do so. As I recall, it's relatively easy to set it up securely as long as the files are only being accessed on my internal network.

Did you mean to access it through your router from the outside? Everything on your network is connected to your router. As far as security goes, you need to keep the server it runs on updated, especially security updates. I'd recommend subscribing to Ubuntu's security list. And you need to keep NextCloud updated. This might be a built-in feature. It should mention it in the manual.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

Quote from: Jason Wallwork on January 19, 2021, 09:57:00 PM
You probably don't recall this but I put notes here about installing it on a Pi. Of course, using it with the RPi 4 it should run a lot better because it has more RAM. This is one area where having more RAM is a lot better. You can run more add-ons for NextCloud with more memory.
Actually, I did check your notes. I downloaded your presentation a long time ago and went through that. But I didn't check the links. I looked independently for instructions because the Pi 4 hadn't come out when you did your presentation. The instructions I used were updated very recently, and covered the Pi 4. The only thing that wasn't updated was the NextCloud version, which is now 20. I downloaded the current version after I used the author's link to NextCloud 17. It was easy enough to replace the files in the locations given in the instructions.

Quote from: Jason Wallwork on January 19, 2021, 09:57:00 PM
It's not really a file server although it does let you access files through the interface. What I mean by that is that you can't just go into the Networking feature in Linux or Windows and access files that way. You'd have to install something else (a plug-in perhaps) to do that. I believe that OpenMediaVault is better in this regard. The OMV website describes it as "the next generation network-attached storage (NAS) solution based on Debian Linux. It contains services like SSH, (S)FTP, SMB/CIFS, DAAP media server, RSync, BitTorrent client and many more." However, NextCloud likely has add-ons for these features as there are a lot of add-ons. I counted apps in their app store and got bored after counting a hundred. And I was only 1/3 down the page. I note that OMV has an option to SSH into it and with RSync you can sync your files on your desktop(s) with the files on it. But for plug-ins, OMV is quite limited. It's not at all the same thing.
Yes, I get that NextCloud has a lot more features. I didn't get it at the time of your presentation, but I posted a question about the difference between the two and you answered it then. Still, I wanted to try installing NextCloud, just as an RPi project, and then see what features and plug-ins it has. And yes, it does have a lot of them. I only scanned them, but I didn't see any that would be of interest to me.

In fact, I don't even need a file server. I have plenty of space for files on my computers, and unlike most of our group, I don't have, or want to have, an extensive collection of video files. My pictures take up more gb than my videos; by a lot. I don't remember what prompted me to try OMV on my Pi 3B, but it may have been a club presentation before your NextCloud presentation. But I did set it up. Its file server function was of potential interest, but it worked poorly when the Pi was connected by wifi rather than ethernet. Now that I know about the headless operation and ability to control it remotely, I might set it up headless where my router is located. (A Pi without keyboard and monitor doesn't take up much space!) But I wouldn't do it now, as I bought the Pi to play with it and I want to try other things.

Actually, I already have a device that would work as a great file server - my 2015 iMac. It has a 2 TB internal drive, and sharing files on it is a cinch. But so much more fun to do this in Linux!
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

fox

#6
OK, moving along one step further, though not yet on my NextCloud installation. I started up Raspberry Pi OS from an SSD in BerryBoot. I enabled VNC in Raspberry Pi Configuration. (I enabled SSH there as well.) I downloaded VNC Viewer for Linux; did it on two different computers. (There is a version for almost every platform, including Windows, Mac, iOS and Android.) With the Pi on the network, even if by wifi, start up VNC viewer and enter the iP address of your Pi. Enter your Pi username and password, and you now have control of the Pi, with whatever is on its desktop showing on your remote device. I tried it from two different computers simultaneously, and it works from both. This is starting to look interesting. Next move would be to start up the NextCloud installation on my SD card remotely and see if I can access it, on wifi as well as ethernet.

Incidentally, if you do this on BerryBoot and you want NextCloud, you would want to make the distro with NextCloud your default if you have multiple distros installed. I don't see how you can control remotely which distro starts (other than the default) because you wouldn't have VNC access until the distro boots.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

fox

#7
More progress. I opened up NextCloud on Chromium on my RPi 4 SD card (running Raspberry Pi OS), but this time on wifi. To do it that way I had to use the Loopback IP address. Once in, I logged into the Pi through VNC on a remote computer (running Ubuntu 20.10). This worked. I then shut down Chromium on the Pi from the remote computer, and opened it again from same computer, and brought up NextCloud again with the Loopback IP address. I then shut down Chromium/NextCloud remotely, and then tried to open NextCloud directly from the computer using either the same loopback address as before (couldn't connect at all), and then by using the IP address of the Pi. The latter gave me the error "Access through untrusted domain". However, after I added my computer's IP address to the NextCloud trusted domains through a config file, I could access NextCloud directly. Problem with that is that I don't have any fixed IP addresses on any computer, so presumably a particular computer would be untrusted the next time I sign in if my router changes the assignments.

One other thing I tried that worked. With the Pi running on wifi, I opened NextCloud via the Pi's IP address on my computer. (In other words, not by VNC to control the PI, itself). I then navigated to a stored video file on the Pi (on SD card), and played it on my computer. It worked. This is considered streaming, right?
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

Jason

You should be able to allocate an IP address in your router to a computer-based on its IP address. Or, easier, assign a static IP address outside of the DHCP assignment in your router. There is info online about how to set up a static IP address on Linux. It should work in the Pi. You can edit a file, honestly can't remember which now or run a command that updates the file for you.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13