Build your own private cloud drive

Since last few years cloud storage has become popular among users. It offers ease of content management from multiple platforms like PC, mobile, tabs and users can share content on the fly.

But public cloud storage is not in your control. For better safety and security of data and users you can think of building your own cloud. This provides you peace of mind and flexibility to build tailored solution as per your requirements.

You can build your own cloud drive using nextcloud software. Follow these simple steps to do it on Debian Linux or on raspbian running on Raspberry pi.

First install nextcloud prerequisites apache2 webserver, php 7 and some apache2 and php modules required for nextcloud.

aptitude install apache2 php-http libapache2-mod-php7.0 php-zip php-dom php7.0-xmlwriter php7.0-xmlreader php7.0-xml php-mbstring php7.0-gd php-simplexml php7.0-curl mysql-server php-mysql php-ldap

You can use sqlite or mysql databases to configure nextcloud. We have used mysql.

As mysql “root” user do following

Create database:

CREATE DATABASE clouddb;

Create database user:

CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'some_good_password';

Allow above user to use database:

GRANT ALL PRIVILEGES ON clouddb.* TO 'nextcloud'@'localhost';

FLUSH PRIVILEGES;

Go to default document root of apache

cd /var/www/html/

Download Nextcloud software from https://download.nextcloud.com/server/releases/ in /var/www/html/ directory
Note: We have used version 14.01

wget -c "https://download.nextcloud.com/server/releases/nextcloud-14.0.1.zip"

uncompress nextcloud

unzip nextcloud-14.0.1.zip

Now in your web browser point to http://your_ip_address/nextcloud , select mysql/mariaDB and fill in required details, do remember that data folder should not be in Document Root of apache, and “Finish Setup”
It will take a while to complete installation.

To use nextcloud again point your browser to http://your_ip_address/nextcloud , login as the admin user created at the time of setup.

You can create more users and groups as per your requirements. You can do much more config and customization in settings section. for details refer nextcloud documentation

There is mobile client available for android and apple (iOS). You can download it from respective app stores to access cloud content from mobile.