How to Install OwnCloud on Ubuntu 18.04

How to Install OwnCloud on Ubuntu 18.04


OwnCloud is a leading open source file sharing and interactive cloud services platform and their functionality is similar to that provided by DropBox and Google Drive. However, unlike Dropbox, OwnCloud does not have the data capacity to store managed files. However, you can still share files such as documents, photos and videos to name a few and access them on many devices such as smartphones, tablets, and PCs.

Step 1: Update the system & Install Apache and PHP 7.2 in Ubuntu

$ sudo apt update -y
$ sudo apt install apache2 libapache2-mod-php7.2 openssl php-imagick php7.2-common php7.2-curl php7.2-gd php7.2-imap php7.2-intl php7.2-json php7.2-ldap php7.2-mbstring php7.2-mysql php7.2-pgsql php-smbclient php-ssh2 php7.2-sqlite3 php7.2-xml php7.2-zip

Once your installation is completed, verify if Apache is installed by running the dpkg command

$ sudo dpkg -l apache2

Now, start and enable Apache to run on boot, run the commands:

$ sudo systemctl start apache2
$ sudo systemctl enable apache2

Now open your browser and type in your server’s IP address in the URL & you should get Apache page as shown below:


To check if PHP is installed.

$ sudo php -v

Step 2 : Install MariaDB in Ubuntu

$ sudo apt install mariadb-server

To securing your MySQL server, run the command below:

$ sudo mysql_secure_installation

Press ENTER for root password and press ‘Y’ to set the root password & you can’t set the password blank as shown below:

Simply type the ‘Y’ to all as shown below :

Your MariaDB server is now secured .

Step 3 : Create a OwnCloud Database

$ sudo mysql -u root -p

Run the command below in MariaDB

CREATE DATABASE owncloud_db;
create user 'ownclouduser'@'localhost' identified BY 'YOUR_PASSWORD';
grant all privileges on owncloud_db.* to ownclouduser@localhost ;

Step 4: Download OwnCloud in Ubuntu

After creating the database, download the OwnCloud zipped file & unzip it

$ sudo wget
$ sudo unzip -d /var/www/

Step 5: Configure Apache for OwnCloud

$sudo vim /etc/apache2/conf-available/owncloud.conf

Add the Configuration below  –

Alias /owncloud "/var/www/owncloud/"
Options +FollowSymlinks
AllowOverride All
Dav off
SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud

Save the file &  you need to enable all the required Apache modules as shown below :

$ sudo a2enconf owncloud
$ sudo a2enmod rewrite
$ sudo a2enmod headers
$ sudo a2enmod env
$ sudo a2enmod dir
$ sudo a2enmod mime

For the Changes restart the apache :

$ sudo systemctl restart apache2

Step 6: Test the installation

Now open your favorite browser and type your server-IP


Now, Installation Completed.


No responses yet

Leave a Reply

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

Latest Comments

No comments to show.