After we reviewed a few services that allow you to switch from Google’s, it’s time to move on to something a bit more complex, but more secure as well: hosting your own services ! To do so, there is something fantastic, that can replicate most of what Google offers: NextCloud. It’s not only a file storage solution, but it can also handle email, photos, music, calendar, an online office suite, and a lot more, since it has a giant gallery of apps that you can add to your own instance !

Set up your own Linux server with LINODE : http://www.linode.com/linuxexperiment (USE OFFER CODE LINUXEXP19)

Support the channel on Patreon: https://www.patreon.com/thelinuxexperiment

Follow me on Twitter : http://twitter.com/thelinuxEXP

Commands:

Create a user: adduser “YOUR USERNAME”

Give it the sudo permissions: usermod -aG sudo “YOUR USERNAME”

Log out of the root user: logout

Install Nextcloud: sudo snap install nextcloud

Setting up the server There are plenty of ways you can go about doing that. You could use an older computer, a rasperry Pie, or any machine at your house, and turn it into a server by installing the server version of your distro of choice. If you don’t want to mess with that or you don’t want to configure too many things, you can also turn yourself to cloud-hosted server providers, which is exactly what I’ll do. There are plenty around, some geared towards having more storage space, some providing powerful GPUs for distributed calculations, and some oriented towards CPU power. Here, I’ll be createing an entry-level server with Linode. I bet you didn’t see that one coming !

Most providers will allow you to pick between pre-selected distro to install, or will let you choose a custom one to put on the server. For servers, debian-based distros are often the most robust, as are everything based on Red Hat. But here, Ubuntu has a distinct advantage over most other available options: you can install nextcloud with just one command line, thanks to snap. I know some of you aren’t fans of this technology, but it’s honestly the easiest option here. I’ll be going with Ubuntu 18.04 LTS, which should be stable and perform perfectly well.

Here, I’ll pick a small Linode, called a Nanode, since I don’t plan on using my server for file storage, but if you’re planning on replacing Google Photos or Google Drive with Nextcloud, you should get something with a bigger hard drive. Most providers also allow you to add storage to your existing server afterwards, so no worries.

Creating a user Once your server is created, and your distro has booted, you can access its console to install whatever you need. That’s where we’ll be installing Nextcloud through snap. To begin, we’ll need to create a user that is not the superuser, called Root, so we’ll login as root to do that. Enter “root” as the login, and the root password you selected when you created your server. If you installed Ubuntu on your own server, you probably already created a user during the distro’s installation, so skip that step !

We’ll just type “adduser”, followed by a space, and the name of the user we want to create. We’ll have to answer a few questions such as the user’s full name and its password. The rest is not important here. Our user does not have the rights to run super user commands, which we’ll need to install anything, so we’ll start by adding our new user to the sudoers group.

Let’s type usermod -aG sudo. followed by a space then the name of the user.

And we’re done ! Now, we just type logout, to quit being root, and login as our new user, just by typing its username and password.

Installing Nextcloud and logging in Using SNAP, it’s only one command line: sudo snap install nextcloud

Once the command has completed its task, we’ll need to access our nextcloud instance. Simply get the IP address of your server. To do so, either look in your server manager, if you’re using a cloud provider, or type: ifconfig

Your server’s IP address is the first series of numbers in the first line.

Copy and paste that in a browser’s window to access your nextcloud instance. You’ll be asked to create an admin account, so just the username and password you’ll want to use to manage your nextcloud instance, and you’re in !

Now, this method is pretty easy, but is has one drawback: it will install using its own HTTP and mysql server, so if you want to use the same machine for something else on top of nextcloud, you’ll run two servers at the same time, which is not that efficient, but for our simple purposes here, it’s not an issue.

And that’s it ! Now you have a nextcloud instance up and running. You can explore its various settings, the apps you can install on it, all from the gear menu in the top right corner. I highly recommend you register a domain name and install an SSL certificate, so your server uses HTTPS instead of HTTP, it will be a lot more secure.