Cloud storage has gained huge popularity in recent years. Companies like Google, Apple, Dropbox, Microsoft etc. are providing us with different plans to choose from. All these companies offer some cloud storage for free and different apps to synchronize your data between your devices.
While these cloud storage services offer ease of use, there’s also a concern of privacy that comes with using them. Google leads the pact with accusations of using our data — be it our browsing history, emails or documents — to monetize their products. The company offers plenty of their products for free but makes sure to earn revenue from us by using various monetizing methods.
In recent years, I have grown more and more conscious about my digital privacy. If you don’t mind your data being used to make someone else rich, then these privacy concerns might not bother you. But if they do, then it’s about time you start believing in the value of your data and taking measures to protect your privacy online.
Before diving into the ‘how’ of this, you should familiarise yourself with the ‘why’ of it. If you don’t know what is Nextcloud, go ahead and read about it first. Once you are familiar with it and understand why you should use Nextcloud, it’s time to move forward.
Installing Nextcloud on a Shared Server
I will assume that you are already aware of the fact that Nextcloud does not provide storage on its own. It’s a software that will allow you to build your own cloud — a software which you will install on your server. This server could be a fully-owned server at your home/office premise or hosted on a rented space by a web host.
Please note that building your Nextcloud server on your own hardware is not the focus of this tutorial. It focuses on installing Nextcloud on a shared server which can act as a replacement to a cloud service like Google Drive. By using a server that you are already paying for hosting your website, you will be saving money because you are utilising the same server resources.
Before you begin, keep in mind that:
You need to have a shared server already up and running. This could be any shared server purchased from a web host that is already hosting your website(s), emails etc. I am using DreamHost as my hosting provider.
Building a cloud server and using it to backup your documents, photos and other files could be restricted by your host. For example, DreamHost does not permit using their storage for backup purpose. The storage usage must be a part of an active website according to their policy. Make sure to clear this with your host first. I have used DreamHost for demonstration only.
You should have some knowledge of operating the cPanel interface, setting up a domain or subdomain, creating MYSQL database, and FTP.
Step 1: Creating a Domain or Subdomain
You have three options to choose from while deciding where to install Nextcloud.
1. A primary domain (yourdomain.com)
2. A subdomain (cloud.yourdomain.com)
3. A directory under your domain (yourdomain.com/cloud)
The installation steps remain the same regardless of the option chosen. In my example, I will install my Nextcloud instance on the subdomain cloud.techstuffer.com. For this to work, I will create the subdomain in my DreamHost panel.
Depending on your host, it may take some time before your domain/subdomain is activated and ready for further steps. After your domain/subdomain is ready, install a TLS certificate (a free Let’s Encrypt certificate works). After this, your domain should be available via HTTPS.
Step 2: Setting Up A Database
Find the MySQL Database section in your hosting panel and create a new database. Make a note of your database name, hostname, username, and password. You will need this during Nextcloud installation.
Step 3: Downloading and Installing Nextcloud
Right click here and save the Nextcloud Web Installer (setup-nextcloud.php file) on your computer.
Establish an FTP connection to your server or use WebFTP/file manager option (if your web host offers it) and navigate to the directory where you want Nextcloud to be installed. I will browse to the following directory – /home/myusername/cloud. This is the same directory which I used while creating my subdomain (see screenshot in Step 1).
Now upload the setup-nextcloud.php file to this directory.
After that, point your browser to this file. I will open the following URL for my example: https://cloud.techstuffer.com/setup-nextcloud.php. You should see the following screen.
The installer will now check for dependencies. If all looks good, it will say All Nextcloud dependencies found.
On the same screen it asks you to choose where you want to install your Nextcloud instance.
Here you can enter a directory (default: nextcloud) which will install Nextcloud to this path: https://subdomain.yourdomain.com/nextcloud.
To make it easier to navigate to, I don’t want to install my Nextcloud under a subdirectory. In order to install it in the same directory as my subdomain, I will enter a dot (.) here which will install my Nextcloud to https://cloud.techstuffer.com.
Click Next and wait while Nextcloud is being installed. If all went well, you should see the success message. Click Next again.
Now enter an admin account and password for your Nextcloud. This user will have all administrative rights for your cloud installation. I recommend against using a simple username like admin. Choose a strong password too.
After this, click Storage and database. Leave Data Folder field unchanged and click MySQL.
Now enter the database information you noted down in Step 2. This includes database user and its password, database name, and hostmame.
Click Finish Setup and wait for the process to finish, after which, you will see your Nextcloud directory.
After your Nextcloud instance is installed, you can start creating directories and uploading your files. You can do so by opening your cloud URL (https://cloud.techstuffer.com) in a web browser or use Nextcloud apps for Windows, macOS, Linux, Android or iOS — just like you would with other cloud services like Google Drive or Dropbox.
Beside uploading your files, you can use Nextcloud for plenty of other things. You can sync your contacts and calendar, share files with others, use it for note-taking, run an email client and a lot more. You can install apps for different tasks by navigating to Apps section.
You can also enable the server-side encryption by going to Settings > Security.
Installing Nextcloud on a Shared Server: Summary
Building your own cloud server using Nextcloud is easy. You can choose to run your cloud on a dedicated hardware owned by you or rent server space from a web host.
There are many web hosts that provide shared hosting plans for cheap rates. You may already have a shared hosting plan and utilise its space and bandwidth without paying extra for an additional server. A Nextcloud instance can be installed on its dedicated domain, a subdomain or a subdirectory.
After setting up, you can use Nextcloud just like you use other cloud services like Google Drive or Dropbox. You can synchronise your files on multiple devices and share them with others or use it as a backup for your data among other things.
That’s all, folks. This was a step by step tutorial showing how to install Nextcloud on a shared server. I hope you found it useful and I’d like to thank you for reading.