Nextcloud is a client server software suite for creating and using the file hosting services. It is functionally similar to Dropbox with a difference, i.e., Nextcloud is free and open source. It allows anyone to install and operate it on a private server.
In contrast to proprietary services like Dropbox, it is an open architecture allows adding functionality to the server in the form of applications. It enables users to have full control of their data.
Nextcloud is self-hosted file share and communication platform. We can easily access and sync our files, contacts, calendars, communicate and collaborate.
- Root privileges of Ubuntu OS
- LAMP stack (Linux, Apache, MySQL, PHP).
Step 1: Install PHP packages
In the first step we need to install the required packages. There are a many PHP packages available, but we don’t need all of them. So we will only install the required one separately. The below command serves the purpose
$ sudo apt install php7.2-xml php7.2-cgi php-7.2-cli php7.2-mysql php7.2-mbstring php7.2-gd php7.2-curl php7.2-zip
As we can see in the above command, the required packages are mentioned and installed.
Step 2: Download nextCloud
We can download the Nextcloud from its website. We can find the file in the downloads section. Other than that, we can download it using wget. Below is the command for it.
$ cd Downloads $ wget https://download.nextcloud.com/server/releases/nextcloud-13.0.2.zip
Next, we will unzip Nextcloud and copy/move the resulting file into the web root or any directory we have configured our web server to serve it out of.
$ unzip nextcloud-13.0.2.zip $ sudo cp -r ~/Downloads/nextcloud /var/www/
Next, we need to change the ownership of the directory to match our web server. The default is www-data. The below command serves the purpose.
$ sudo chown -R www-data:www-data /var/www/nextcloud
Step 3: Install Nextcloud
Nextcloud has its own installer setup process. This process helps us to configure Nextcloud and place everything that we need where it should be placed within our web root directory. We have to open the web browser and navigate to the address which we have set to host it. In this guide, we have set localhost:8090 to host it.
After login with an admin account, we will see the next screen asking to enter database details.
If we click on "Storage & database", we will find options for connecting to our database. Nextcloud can connect to different types of databases. In our case, we have set up MySQL/MariaDB so we will configure it. We will enter the database username and password.
We will leave localhost as it is. Next, we will submit the form. Nextcloud will start its setting process. When it's finished, it will show the dummy files that are created in its default directories. Now we are ready to create our own users and directories. We can use the web interface to upload our files.
To install Nextcloud on Ubuntu, we need root privileges to make system changes apply properly. There should be LAMP setup already because it is necessary for the software to be functional. After downloading and installing the Nextcloud, we have to configure through its own setup process. Following all the instructions we can use the software on Ubuntu successfully.