OwnCloud set on Raspberry Pi can be a good example of smart cloud storage. A cloud storage is a cloud computing model in which the data is stored on remote servers and maintained by a cloud storage service provider. This allows users to customize their data and share it with friends and business partners over the Internet.
OwnCloud as cloud storage server is a great opportunity, especially for those who would like to use OwnCloud on Raspberry Pi (or any other ARM device).
|This app is a free and open source software for storing data on a separate server. You can also use a desktop version which includes installing the OwnCloud client on your hardware, but for RPi the server version is much more productive. These servers are located in companies networks, on the internet or at home. It uses PHP scripts to access an SQLite, MySQL or PostgreSQL databases installed on the server and runs on Windows and Linux operating systems. Users can easily manage their own cloud server via web-interface to store, share and synchronize their own data. |
By the time this article has been written, the current version of OwnCloud is 10.0.2, released on May 30, 2017. The latest previous version was OwnCloud 9.
Why use OwnCloud on Raspbian
The Raspberry Pi (in short raspi, rpi or just pi) is a small but powerful mini-computer device. It is slightly larger than a credit card and its cost less is than 40 USD. The Raspberry Pi can connect to a wired network and has four USB-Ports for different external devices like keyboard and mouse or external storage devices.
The recommended operating system is Raspbian. Raspbian is a free and open source operating system based on Debian. It is optimized for the Raspberry Pi 2 and Raspberry Pi 3 hardware.
Because of its small design, the Raspberry Pi consumes only a very small amount of energy and saves additional money.
This points, small, cheap, energy saving but powerful computer make the Raspberry Pi an ideal device to operate your own cloud storage with OwnCloud.
Despite its size and features, RPI is a great device for different high technology or IoT projects and has a wide variety of opportunities. In our previous posts, we have already told you how to setup CrashPlan on Raspberry Pi, for example. This single board device can be very useful for absolutely different industries and fields. Recently, we have managed to launch MetaTrader 4 on Raspberry Pi to create a smart Forex robot for automated trading. Or you can simply relax and enjoy great PC games on Raspbian to entertain yourself (like Countr Strike or Diablo II). As you can see, the possibilities are literally borderless!
In this article, we assume that the operating system Raspbian is already installed and running on the Raspberry Pi. Connect your Raspberry Pi to the Network via a wired connection or via WLAN and open a terminal.
To update the operating system run the commands below.
$ sudo apt-get update
If the Raspbian is up to date, we can start to install the applications.
Install the web server and PHP packages
$ sudo apt-get install apache2 php5 php5-gd php-xml-parser php5-intl
$ sudo apt-get install php5-sqlite php5-mysql smbclient curl libcurl3 php5-curl
Add the www-data user to the www-data group
$ sudo usermod -a -G www-data www-data
Now the web server is ready and running.
Open your Browser and enter your ip-address of your Raspberry Pi. You should see the Apache2 starting page.
(Replace 192.168.17.13 with your own ip-address)
Visit the OwnCloud installation page https://ownCloud.org/install/#edition. On the right side “Download OwnCloud server” select the download link and copy the address of the .tar.bz2 file to install OwnCloud on your Pi. There used to be OwnCloud 9 as the latest version, but recently it’s been upgraded to the 10th.
Back on the terminal, download the OwnCloud image file with the wget command:
$ wget https://download.owncloud.org/community/owncloud-10.0.2.tar.bz2
NOTE! The link may be changed so you’d better either check it online yourself or simply download the archive from the website directly to your Raspbian via the Chromium browser.
After the download is finished, unpack the file to the target directory of your web server.
$ cd /var/www/html
$ sudo tar xfj /home/pi/owncloud-10.0.2.tar.bz2
Now, make sure that Apache owns all of those files you just added.
$ sudo chown -R www-data:www-data /var/www/html
Finally, restart the web server
$ sudo service apache2 restart
Now test your installation, by visiting your Raspberry Pi’s URL. http://[Your IP ADDRESS]/owncloud. You should be greeted with an installation wizard like this
First, you have to define a user name and a password for the admin account. Enter a user name and a password of your own choice into the form fields.
In the next step, you can configure your database system. You have the choice between SQLite3 and the MYSQL/MariaDB database system.
Click on “Storage & database” and new form field should open.
By default, the SQLite is selected in the “Configure the database” field. In the „Data folder“ field, you can enter the path where SQLite should save your data files. This is “/var/www/html/ownCloud/data” by default.
Select the SQLite database again and finish the setup procedure with a click on the “Finish setup” button. If everything is ok, you will be forwarded to the login page.
Speaking about another option for SQL databases, there is also MySQL available for your choice. The general difference between the two is in the number of users you’re going to operate your cloud storage with. If your deployment isn’t likely to exceed 15-20 users, so SQLite is highly recommended as it’s much easier to use. Everything that’s beyond this number will require much more powerful database system, which MySQL is. Mainly, all of us use the cloud storage for personal goals, so this tutorial is based on the SQLite option. However, using MySQL doesn’t change the installation process too much.
Now enter your new user name and password you have created before and you are logged into the admin area of your OwnCloud Server.
From here, you can copy and paste files, create directories, create users and prepare your files and directories for sharing with friends or business partners.
For detailed information about all the functions of OwnCloud, see the OwnCloud UserManual.pdf which is already in your main directory.
Nimbus cloud (https://cloudnimbus.org) is an open source cloud storage server software designed to run on external hard drive and Raspberry Pi devices. Nimbus is a simple, low-cost, easy to use personal file sharing software to store, share and stream your files anywhere.
Nextcloud (https://nextcloud.com) is another open source cloud storage server very similar to OwnCloud. It is an actively maintained fork of OwnCloud. Comparing to OwnCloud, Nextcloud is introducing new features such as monitoring capabilities, full-text search, and authentication with Kerberos.
Dropbox is a commercial service provider where users are offered a free account with a set of free storage size. Additionally, the storage is available with paid subscriptions.
Dropbox comes with apps for Windows, Mac OS, and Linux computers. Also, there are apps for Apples iPhone iOS, Android, and Windows Phone smartphones and tablets.
The Dropbox app creates a special folder on the user’s computer for file synchronization. All data in this folder are then synchronized to Dropbox’s servers and to other computers and devices that the user has installed Dropbox on to keep the same files up-to-date on all devices.
Because Dropbox app supports only x86-based computers, but not ARM-based as Raspberry Pi, you will find a solution with the ExaGear Desktop.
With ExaGear Desktop you can easily launch the original Dropbox app on your Raspberry Pi device. Follow this link for installation and setup instruction to run Dropbox on your Raspberry Pi.
With your OwnCloud on a Raspberry Pi, you are your own cloud service provider with lots of functions to handle, save and share your own data.
If you intend to try Dropbox with ExaGear Desktop, note, that ExaGear can launch almost any x86 app on any ARM-based device including, but not limited to Raspberry Pi, Odroid, Banana Pi, Beagleboard, Cubox, Jetson, Cubieboard and many others. So, Dropbox can be launched almost on any type of ARM devices as well.
ExaGear is registered trademark of Eltechs, Inc. Raspberry Pi is a trademark of the Raspberry Pi Foundation. Other trademarks and product names are the property of their respective owners.