It’s no secret that I like messing around with my Raspberry Pi to see if they can perform as well as our other computers in the server world. I don’t have a lot of potential of using my Pi in the robotics world, so I’ll stick to general computing and see where we go.
Thus far I’ve built out one RPi as a multi-site web server, a Plex media server (I’m almost done with all my kid’s darn Disney DVD transfers), and my third RPi is being used as my NextCloud (it’s actually Nextcloud with a lower case “c,” but it looks better to me in uppercase) server.
On this particular RPI (RPi 3) I’ve installed Pydio (too heavy), Seafile (I did like it, but NextCloud won out), and two different ways of installing NextCloud on the RPi. This post is about those two ways, one is easy, and the other is easier.
The easier way
If you follow the NextCloud Reddit community (and you should), you’ll see the Raspberry Pi image of NextCloudPi talked about quite a bit. There’s a reason it is too; it’s “the easier way” and drop-dead simple to install Nexcloud on an RPi. It’s baked image file that’s got all the goodies pre-installed. All in all, you burn the image (direct download) using your favorite method (I still recommend using etcher) and start ‘er up! The NexCloudPi link above has the entire install how-to on their site which they keep updated.
The easy way
The easy way is still pretty straightforward. However, you get the bonus of actually building the install from the ground up. This is a two-part process, my part, and Carsten Rieger‘s part (he’s one smart mo-fro).
So, part one starts with a blank SD card. You can use Raspbian for this install, I have, but there are a few things that are Ubuntu specific that it just makes it a lot easier to install an Ubuntu derivative on your RPI and get it over with. For that, I recommend using Lubuntu which is one of only a few Ubuntu distros that have an official RPi version. You could go with Ubuntu server, but you’ll quickly find out that it’s a little buggy and not officially supported. So Lubuntu it is.
If you’re used to working with your RPi headless over SSH, there’s a little prep work you need to do to get there. I haven’t found an out-of-the-box SSH solution with Lubuntu, but it’s straightforward to get you there.
With your newly baked image of Lubuntu plugged in go ahead and start your RPi. Now, if you’re like me and run everything headless this is going to kind of suck- you’ll need to plug in a monitor/TV, a keyboard, and a mouse to start with. After the initial set up, we can then go headless and put all of those things away.
Anyway, now that all is plugged in and the system is started up it should be downloading a few things and doing it’s initial set up. Soon you’ll get to the point of making a user, be sure to click on “encrypt my home folder” for that little bit of added security. Once you’ve created your user and logged in let’s open up Terminal (found in the lower left, use the mouse, Luke). We’re going to be doing two things in here:
- Turning on SSH; and
- Disabling the GUI. We won’t need it as we’re running headless.
Turning on SSH is as comfortable as a single command:
sudo systemctl enable ssh
Bam! SSH is on. Please be sure to test it before we move on.
Now, we’ll disable the desktop GUI since we won’t be using it. This too is done with a single super easy command:
sudo systemctl set-default multi-user.target
Now, if you reboot you should be prompted with the simple text login. If for some reason you want to get back into the GUI desktop you can run the command:
sudo systemctl set-default graphical.target and you should be back to normal.
Afer you’ve rebooted to make sure the GUI is no longer active and that you can SSH in, you can shutdown, remove the keyboard, mouse, and monitor cords then boot back up, SSH in, and you’re ready to move on. Head on over to Carsten’s site @ https://www.c-rieger.de and follow his directions from top to bottom. It shouldn’t take long (less that of creating your dhparam SSL file- that may take a bit). Other than that, it should be smooth, and it works great. Again, this method is helpful if you like to be in control of what’s going on. Though it’s a lot of copy/paste, you can see it all.
So, what’s the difference between these two? Well to be honest, not a whole lot as of today. Only a few months ago I would have warned you to stay away from NextCloudPi as it ran super slow. However, to be fair, it was just starting up, and they hadn’t worked all the cache bugs out. So, my tune has changed. If you want a quick and straightforward method, go with NextCloudPi (I’m currently using it myself). If you want to see how the sausage is made, I’d follow Carsten’s site.