Install ownCloud server on CentOS 8

In this guide, we will learn how to install ownCloud Server on CentOS 8. If you are here, then we assume you already know something. ownCloud Yes and its role.

Install ownCloud server on CentOS 8

Install and set up LAMP stack

ownCloud requires LAMP stack components to run. For best ownCloud performance, make sure you are running;

databaseMariaDB 10 and above
Network ServerApache 2.4

So please follow the link below for a guide on installing LAMP stack on CentOS 8.

Install LAMP Stack on CentOS 8

Install other important PHP modules.

dnf install php-{bz2,curl,gd,imagick,intl,zip}

Install ownCloud server

There are two ways to install ownCloud server on CentOS 8 system.

  • Install ownCloud from ownCloud repository
  • Install ownCloud using RPM binary package

Install ownCloud from ownCloud repository

CentOS 8’s default repository does not contain the ownCloud package. So you need to install ownCloud repository on CentOS 8.

Install ownCloud repository signing key.

rpm --import

Install ownCloud repository on CentOS 8

dnf config-manager --add-repo

Run system update

dnf update

Install ownCloud server

dnf install owncloud-files

Install ownCloud using RPM binary package

You can also install ownCloud using its binary package, which can be downloaded from If you do not want to install the repository on your system. You just need to get the url of the rpm binary file and install it according to the following steps;

dnf localinstall

This will install ownCloud 10.3.2-2.1. Replace the version accordingly.

Configure ownCloud on CentOS 8

Create ownCloud database and database user

Log in to the MariaDB database server and create the ownCloud database and a database user with all the privileges granted to the ownCloud database.

mysql -u root -p
create database ownclouddb;
grant all on ownclouddb.* to [email protected] identified by "[email protected]";
flush privileges;

When using MariaDB / MySQL as the ownCloud database backend, it is recommended that you Disable binary logging to avoid data loss during high loads If you are not running any replication.

echo -e "[mysqld]nskip-log-bin" >> /etc/my.cnf
systemctl restart mariadb

Verify that binary logging is disabled.

mysql -u root -p
show variables like 'log_bin';
| Variable_name | Value |
| log_bin       | OFF   |
1 row in set (0.003 sec)

Create Apache VirtualHost configuration file for ownCloud

After installation, ownCloud creates a default web root directory below /var/www/html/owncloud/.

So if you don’t want to use the default Apache configuration, just create a VirtualHost configuration as shown below. Make the necessary changes.

vi /etc/httpd/conf.d/owncloud.conf

    DocumentRoot /var/www/html/owncloud

        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted

    ErrorLog /var/log/httpd/owncloud.kifarunix-demo.com_error.log
    CustomLog /var/log/httpd/owncloud.kifarunix-demo.com_access.log combined

Check the Apache configuration syntax for errors.

apachectl configtest

If you get, Syntax OKAnd restart Apache.

systemctl restart httpd

If SELinux is running, run the following command to enable Apache to write to the ownCloud configuration directory.

setsebool -P httpd_unified 1

You can always consult /var/log/audit/audit.log Documents for any rejected requests and uses audit2why See how to fix it.

Finalize ownCloud configuration

To complete ownCloud configuration settings, access ownCloud from your browser. http://Server_IP_or_hostname.

Create the ownCloud administrator username and password.

Next, configure the database configuration settings. Please click Storage and database Drop-down button.

ownCloud data directory is set to /var/www/owncloud/data by default. You can leave the default value.

Select your database backend, and in this demo, use MariaDB. Enter the database connection details created above.

Install ownCloud server on CentOS 8

Next, click Finish Setup Complete the ownCloud configuration on CentOS 8.

Log in with administrator credentials to enter the ownCloud dashboard.

OwnCloud server on CentOS 8

ownCloud is now successfully installed on CentOS 8. You can navigate on the dashboard to learn about one or two things about ownCloud.

read more ownCloud user manual.


ownCloud installation guide