How to Install and Configure ownCloud on CentOS 8

How to Install and Configure ownCloud on CentOS 8


Linux Articles / All 58 Views comments

ownCloud is an open-source, self-hosted cloud platform for managing and sharing information. It may be used as an alternative choice to Dropbox, Microsoft OneDrive, and Google Drive. ownCloud is extensible by way of apps and has desktop and cellular shoppers for all main platforms.

This tutorial explains easy methods to set up and configure ownCloud with Apache on CentOS eight.


Earlier than persevering with with the steps under, please be sure that the next conditions are met:

Creating Database

ownCloud helps SQLite, Oracle 12g, PostgreSQL 9, MariaDB and MySQL. We'll use MariaDB as a database back-end.

Login in to the MariaDB shell by typing:

sudo mysql

Run the next SQL assertion to create a new database:

CREATE DATABASE owncloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

Create a new database user and grant access to the database:

GRANT ALL ON owncloud.* TO 'ownclouduser'@'localhost' IDENTIFIED BY 'change-with-strong-password';

As soon as executed, exit the MariaDB console by typing:


Putting in Apache and PHP Modules

ownCloud is a PHP software. CentOS eight ships with PHP 7.2, which is supported by ownCloud, however their official documentation recommends PHP 7.three.

Run the next command to put in all required PHP extensions:

sudo dnf set up php php-curl php-gd php-intl php-json php-ldap php-mbstring php-mysqlnd php-xml php-zip php-opcache 

Load the brand new modules by restarting the FPM service:

sudo systemctl restart php-fpm

Downloading ownCloud

On the time of writing this text, the newest secure model of ownCloud is model 10.three.2. Earlier than persevering with with the subsequent step, go to the ownCloud download page and verify if there's a new model of ownCloud out there.

Use the next wget command to obtain the ownCloud zip archive:

wget -P /tmp

As soon as the obtain is full, extract the archive to the /var/www listing:

sudo tar jxf /tmp/owncloud-10.three.2.tar.bz2 -C /var/www

Set the correct ownership in order that the Apache webserver can have full entry to the ownCloud's information and directories.

sudo chown -R apache: /var/www/owncloud

If SELinux is running in your system, you will have to replace the SELinux safety context:

sudo chcon -tR httpd_sys_rw_content_t /var/www/owncloud

Configuring Apache

Open your textual content editor and create the next Apache configuration file.

sudo nano /and so on/httpd/conf.d/owncloud.conf

/and so on/httpd/conf.d/owncloud.conf

Alias /owncloud "/var/www/owncloud/"

<Listing /var/www/owncloud/>
  Choices +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off

 SetEnv HOME /var/www/owncloud
 SetEnv HTTP_HOME /var/www/owncloud


Restart the Apache service to activate the modifications:

sudo systemctl restart httpd

Putting in ownCloud

Now that ownCloud is downloaded, and the providers are configured, open your browser and begin the ownCloud set up by visiting your server's area identify or IP handle adopted by /owncloud :


You may be introduced with the ownCloud setup web page.

If you cannot entry the web page, then in all probability your firewall is obstructing port 80 or 443.

Use the next instructions to open the required port:

sudo firewall-cmd --zone=public --add-port=80/tcpsudo firewall-cmd --zone=public --add-port=443/tcpsudo firewall-cmd --runtime-to-permanent

Enter your required admin username and password and the MySQL consumer and database particulars you beforehand created.

Click on on the End setup button. As soon as the set up course of is accomplished, you may be redirected to the ownCloud dashboard logged in as admin consumer.


You will have discovered find out how to set up and configure ownCloud in your CentOS eight machine. When you've got a website identify related together with your ownCloud server, it is best to safe your Apache with a free Let's Encrypt SSL certificates.

To seek out extra details about the best way to handle your ownCloud occasion, go to the ownCloud documentation web page.

When you have any questions, please depart a remark under.