In this tutorial, we will explain how to install ownCloud on CentOS.

ownCloud is a suite of client-server software for creating and using file hosting services. ownCloud functionally has similarities to the widely used Dropbox. The primary functional difference between ownCloud and Dropbox is that ownCloud does not offer data centre capacity to host stored files. The Server Edition of ownCloud is free and open-source, thereby allowing anyone to install and operate it without charge on their own private server.


You will need:

  • VPS running CentOS

Step 1 – Install Apache and PHP

ownCloud requires a LAMP Server. First, install the epel repository:

yum install epel-release

After, add the webtatic repository:

rpm -Uvh

Now, install PHP and Apache:

yum install httpd php70w php70w-dom php70w-mbstring php70w-gd php70w-pdo php70w-json php70w-xml php70w-zip php70w-curl php70w-mcrypt php70w-pear php70w-intl setroubleshoot-server

Step 2 – Install ownCloud

Now it’s time to install ownCloud. First, add ownCloud repositories to the system:

rpm –import

And download repository:

curl | tee /etc/yum.repos.d/owncloud_CE:10.0.repo

Now, install ownCloud:

yum install owncloud

Step 3 – Install MySQL

MySQL is needed to store ownCloud information. Run this command to install MySQL:

yum install mariadb-server php70w-mysql

Now, start and enable MariaDB:

systemctl start mariadb

systemctl enable mariadb

After, set a strong password for MySQL root user:


Now, login to MySQL:

mysql -u root -p

Enter the password you have set and create a database for ownCloud:


CREATE USER ‘owncloud’@’localhost’ IDENTIFIED BY ‘password’;

GRANT ALL PRIVILEGES ON owncloud.* TO ‘owncloud’@’localhost’;



Step 4 – Configure firewall

First, install a firewall if is not present in your server:

yum install firewalld

And start it:

systemctl start firewalld

Now, you need to configure the firewall for ownCloud:

firewall-cmd –permanent –add-service=http

firewall-cmd –permanent –add-service=https

firewall-cmd –reload

Now, start and enable Apache:

systemctl start httpd

systemctl enable httpd

Step 5 – Finish Setup

Open browser and go to your ownCloud URL:http://youripaddress/owncloud

Create an admin account:

Click on Storage & Database and enter your data folder:

Now configure the database and click on Finish Setup button:

Now you can log in to ownCloud with the created account.

You have successfully installed ownCloud on CentOS.