How to Install ownCloud on Rocky Linux 9

ownCloud is a self-hosted open source file server that enables secure storage, collaboration, and sharing. ownCloud lets you access your files, calendar, contacts, and other data and they are available on any device and can be shared with a few clicks. You can synchronize everything between your devices and share files with others.


  • The LAMP stack should be installed and running, Click here for Instructions to Install the LAMP stack on the server.

Currently ownCloud supports PHP 7.4 or PHP 7.3.

Installing the EPEL and Remi Repository

For this, we use the PHP 7.4 and 8.1 packaged by Remi,

First, let us install the EPEL repository,

dnf install

Next, install the Remi repository with the following command,

dnf install

List the available PHP module stream

To check/list the available PHP versions, use the following command,

dnf module list php

Installing PHP 7.4

Now, let's install PHP 7.4 via the remi repository,

dnf module install php:remi-7.4

Create a Database for ownCloud

Command to login MariaDB database.

mysql -u root -p

Create a database for ownCloud.

CREATE DATABASE owncloud_db;

Create a User and grant permissions on the nextcloud-db database,

Note: Replace Enter-A-Password-Here with a strong and secure password.

GRANT ALL ON owncloud_db.* TO 'owncloud_user'@'localhost' IDENTIFIED BY 'Enter-A-Password-Here';

After creating a user and database for ownCloud Flush Privileges and exit the MariaDB database.



Installing ownCloud

Enter the following command to Download the ownCloud.


Extract into the /var/www/ directory with the following command,

tar -jxf owncloud-complete-latest.tar.bz2 -C /var/www/

To enable permission for Apache webserver to access the ownCloud files.

chown -R apache: /var/www/owncloud

Create a configuration file for ownCloud for Apache webserver to serve ownCloud.

Vi /etc/httpd/conf.d/owncloud.conf

Add the following lines to the configuration file and save and exit.

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

<Directory /var/www/owncloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off

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


Restart the apache webserver to reflect the changes,

systemctl restart httpd

Command to check the status for Webserver

systemctl status httpd

Command to check if SELinux is enabled and running



[root@server ~]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Memory protection checking:     actual (secure)
Max kernel policy version:      33

If SELinux is enabled, execute the following command to allow the Apache webserver to write to Owncloud’s directory.

setsebool -P httpd_unified 1

ownCloud is successfully installed, open the ownCloud on the browser and complete the final steps.

URL to open the ownCloud on the web browser.


In browser,

  • Enter Username and Password to create account.
  • Next click on Storage and Database and select MySQL/MariaDB
  • Fill in all the database details i.e database user, password, and database name.
  • And click the Finish Setup button to complete the setup.


Once the Setup is completed successfully, Login Page will appear, and enter the Username and Password that you specified earlier to get access.


After login, you will be presented with options for installing the ownCloud app on different platforms and this is what the dashboard looks like

This Concludes how you install ownCloud on Rocky Linux 9.

If you can not configure and face any technical difficulties, kindly reach out to us via Support Ticket.