Pesonal Cloud Storage System using Raspberry Pi

Hello Internet people In this article I am showing you how to make a personal cloud storage system. The cloud server is configured on a Raspberry Pi 3 model B+ module with external Hard disk drive for storage. The admin access to own Cloud account and also add user to access this Own cloud server for storing his Data. The data of all users is stored separately in separate folder in encrypted form.

The admin access to own Cloud account and also add user to access this Own cloud server for storing his Data. The data of all users is stored separately in separate folder in encrypted form.


Hardware Requirement

  1. Raspberry Pi 3 B+Raspberry Pi 4 B
  2. Hard Disk
  3. Hard Disk adapter
  4. SD card
  5. 5V power adapter

Software requirment

  1. Raspbian OS
  2. Apache server
  3. Owncloud

Raspberry Pi3 Model B+
The Raspberry Pi is a low cost, small sized computer that plugs into a monitor or TV, and uses a standard keyboard and mouse. It’s capable of doing everything which a desktop computer to do, from browsing the internet and playing HD videos, to making spreadsheets, word-processing, and playing games.

personal cloud storage system using raspberry pi
Raspberry Pi 3 Model B+

Hard Disk
A hard disk drive (HDD) is a non-volatile computer storage device containing magnetic disks or platters rotating at high speeds. It is a secondary storage device used to store data permanently. In this project we use a laptop hard disk drive for storing our data.

SD card:
A Secure Digital card (SD card) is a non-volatile form of flash memory for portable and mobile devices. In this Project we use SD card as the ROM of the raspberry pi. For storing the operating system.

Own cloud
n Own Cloud is suite of client-server software for creating and using services. Own Cloud is a self-hosted open source file sync and share is similar as Google Drive, Droop Box and others, own Cloud lets you access your files, calendar, contacts, and other data.

System Design

personal cloud storage system
System Design |image- google

This figure shows that how does the Personal cloud storage system works. Here Raspberry Pi acts as a server. The admin can add or delete user and provide “User id” and “Password” and also manage the uses of storage. User login in own cloud using “User id” and “password” after login user can change password, and upload and download his files like photos, audio, videos and documents.

Personal cloud storage architecture is a process of defining the component, modules and data for a cloud storage to fulfill the specific requirement. It implies a systematic and exact approach to design for personal cloud storage. The design to an abstract representation of the data flows, inputs and outputs of the personal cloud storage.

The design often conducted via modelling, using a graphical model of the actual personal cloud storage using Raspberry Pi. The main purpose of personal cloud storage design is to create the technical solution to fulfil the functional requirement of the cloud storage.

Step to install Owncloud

Turn on the Raspberry Pi.

From the terminal, enter the following command:

sudo raspi-config

The following changes needs to be made in the Raspberry Pi configuration:

a. Expand the root file system to have enough space for the cloud Select
“Advanced Options” –> “Expand File system”
b. Change user password
“For Security when accessing form the WAN”
c. Change locale to en_US.UTF8
Select “Localization Options” –> “Change Locale”
d. Memory split, allocate 16M to video graphics Select
“Advanced Options”–> “Memory Split”
e. Overclock to Modest or Medium Select “Overclock”
Then Finish, and auto reboot. Upon re-boot, we need to update the Raspberry PI and its packages.

Update the Raspberry Pi and its packages

sudo su 
apt update && apt upgrade

Installing Lamp Server

 apt install apache2 –y 

Starting services

systemctl start apache2
systemctl enable apache2

Installing OwnCloud

cd /tmp

Now Extract the Owncloud and change the permissions By following command

tar -xvf owncloud-10.0.10.tar.bz2
chown -R www-data:www-data owncloud

It will Generate a new directory called “owncloud” . We need to move this directory to /var/www/html/directory by following command

mv owncloud /var/www/html/

Now this time to Configure Apache Web Server

Now Create a new configuration file under /etc/apache2/sites-available

sudo nano /etc/apache2/sites-available/owncloud.conf

then Paste this line on owncloud.conf and then save it

Alias /owncloud "/var/www/html/owncloud/"

<Directory /var/www/html/owncloud/>
Options +FollowSymlinks
AllowOverride All 

<IfModule mod_dav.c>
Dav off

SetEnv HOME /var/www/html/owncloud
SetEnv HTTP_HOME /var/www/html/owncloud


Create symbolic link

sudo su
 ln -s /etc/apache2/sites-available/owncloud.conf /etc/apache2/sites-enabled/owncloud.conf

Additional Apache configuration

executing this commands for enabling some modules

a2enmod headers
systemctl restart apache2
a2enmod env
a2enmod dir
a2enmod mime 

Now need to create MySQL database and User

 mysql -u root -p

You’ll be enter the Pi User password. Then execute the underneath commands in green:

MariaDB [(none)]> create database owncloud;
  Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> create user owncloud@localhost identified by '12345';
  Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> grant all privileges on owncloud.* to owncloud@localhost identified by '12345';
  Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;  
  Query OK, 0 rows affected (0.00 sec) 

MariaDB [(none)]> exit; 

Now configure owncloud by web browser

If you’re mounting an external hard drive for additional storage capacity so please skip this step and continue Mounting and Setting up an external hard drive

If you are NOT mounting and external hard drive then skip and proceed to open the web browser and the type the ip address of pi and owncloud directory: Note: replace IP address with your IP address

This Owncloud window will appear

owncloud UI
owncloud login screen

In this window enter a username and password to create an admin account then immediately enter MySQL details as follow:

Username: owncloud
Password: 12345
Database: owncloud
Server: localhost

Click on ‘Finish Setup’ button. That’s it.The Owncloud is installed on Raspbian Stretch is now ready for use.

Presentation Report on this project

Presentation Report

Leave a Reply

Your email address will not be published. Required fields are marked *