ownCloud is an open-source (commercial version also available) web suite that provides a cloud storage over the network; data can be uploaded/downloaded via browser or through the software clients available free for download.
ownCloud is based on PHP, and you can run this on all platforms that meet requirements. It offers almost all possibility of functions that are available in commercial suites; released under the AGPLv3 license, so you can setup owncloud storage server without any additional cost.
The commercial version of ownCloud is also available.
What’s new in ownCloud 9:
- Access your existing data on an intranet/internet FTP drive; images shared with you on Dropbox, Files on Amazon S3 or your NAS at home–all through your ownCloud server.
- Automatically uploads pictures taken from your mobile using ownCloud apps.
- Edit documents together, and have video calls over your server.
As I said earlier, it is based on PHP and database combination. The database can be any of from SQLite, MySQL, Oracle or PostgreSQL database servers. For a demo, we will use MariaDB as a database for ownCloud installation; we will discuss the reason behind this later.
### Ubuntu ### sudo apt-get -y install wget mariadb-server php-mysql ### Debian ### sudo apt-get -y install wget mariadb-server php5-mysql
Download and Setup:
ownCloud provides you the official deb packages for the installation of ownCloud. Setup ownCloud repository using the following command.
### Ubuntu ### wget -nv https://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/Release.key -O Release.key sudo apt-key add - < Release.key sudo sh -c "echo 'deb http://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/ /' > /etc/apt/sources.list.d/owncloud.list" ### Debian ## wget -nv https://download.owncloud.org/download/repositories/stable/Debian_8.0/Release.key -O Release.key sudo apt-key add - < Release.key sudo sh -c "echo 'deb http://download.owncloud.org/download/repositories/stable/Debian_8.0/ /' > /etc/apt/sources.list.d/owncloud.list"
Install ownCloud using the following command.
sudo apt-get update sudo apt-get -y install owncloud
Restart Apache service.
sudo systemctl restart apache2
Auto-start the service at system start-up.
sudo systemctl enable apache2 sudo systemctl enable mysql
Create MySQL Database:
If you are bringing up a MariaDB for the first time, here is the tutorial on Securing MariaDB. Ensure MariaDB server is running. Log into MariaDB server to create a database.
sudo mysql -u root -p
Create database called “ownclouddb”
create database ownclouddb;
Allow “ownclouduser” to access the “ownclouddb” database on localhost with a predefined password.
grant all on ownclouddb.* to 'ownclouduser'@'localhost' identified by 'password';
Open up a web browser and navigate it to below URL. You will need to setup ownCloud before it is getting live.
Fill up the setup page with admin user details and then the location of the data folder.
You can choose any one of the databases from SQLite or MySQL. If you want to use SQLite database, you do not have to enter database details; but using SQLite in a larger (production) environment is not recommended.
Considering the above recommendation, we will use MariaDB here. Enter the MariaDB database details in the below page.
Alternately you can also download the ownCloud clients to sync the documents across your devices.
The home page will look like below; you can start uploading the contents using “+ sign” button.
ownCloud limits the file size for the upload, up to 513 MB by default. You can increase the upload limit by editing .htaccess file.
sudo vi /var/www/owncloud/.htaccess
Modify the below entries.
php_value upload_max_filesize 513M php_value post_max_size 513M