How to install ownCloud on RHEL 8

Share on Social Media

Learn how to install ownCloud on RHEL 8 with our detailed guide. Follow our step-by-step instructions to set up ownCloud for secure file sharing and collaboration on your Linux server. #centlinux #linux #saas

What is ownCloud?

ownCloud is an open-source software platform that allows you to create your own private cloud storage service. It provides a secure and flexible way to store, sync, and share files, similar to services like Dropbox, Google Drive, or OneDrive, but with the added advantage of complete control over your data.

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 can build your own cloud storage by using this software.

Key Features of ownCloud

  • File Storage and Sharing:
  • Store files securely and access them from any device.
  • Share files and folders with others, with the ability to set permissions and access controls.
  • Synchronization:
  • Sync files across multiple devices, ensuring that the latest version is always available.
  • Use desktop clients and mobile apps for seamless integration across different platforms.
  • Collaboration:
  • Collaborate on documents in real-time using integrated office suites like Collabora Online or OnlyOffice.
  • Comment on files and use activity feeds to keep track of changes and updates.
  • Security and Privacy:
  • Encrypt files for added security, both in transit and at rest.
  • Implement access controls and user authentication to protect sensitive information.
  • Customization and Extensibility:
  • Customize the ownCloud interface and functionality with apps and plugins.
  • Integrate with other services and systems using APIs.
  • Data Control:
  • Host ownCloud on your own servers or use a trusted hosting provider, giving you full control over your data.
  • Comply with data privacy regulations and organizational policies by keeping data within your infrastructure.

Use Cases for ownCloud

  • Enterprise File Sync and Share (EFSS): Enable secure file sharing and collaboration within businesses and organizations.
  • Personal Cloud Storage: Create a private cloud storage solution for personal use, ensuring privacy and control over your data.
  • Educational Institutions: Facilitate collaboration and file sharing among students, teachers, and staff.
  • Government and Public Sector: Implement secure and compliant data storage solutions for government agencies.

ownCloud offers a robust and versatile platform for managing files and collaborating securely. Whether for personal use or organizational deployment, ownCloud provides the tools needed to create a private cloud storage solution tailored to your specific needs.

ownCloud Alternatives

There are several alternatives to ownCloud, each offering unique features and capabilities for file storage, synchronization, and sharing. Here are some popular ownCloud alternatives:

1. Nextcloud

  • Description: Nextcloud is a fork of ownCloud and is one of the most popular alternatives. It offers a comprehensive suite of collaboration tools, including file storage, sharing, calendar, contacts, and more.
  • Strengths: Rich feature set, strong security, active community, excellent support for integrations and extensions.

2. Seafile

  • Description: Seafile is a file hosting software system that focuses on providing reliable and high-performance file synchronization and sharing.
  • Strengths: Efficient syncing, robust version control, strong encryption, and enterprise-grade features.

3. Pydio

  • Description: Pydio (formerly AjaXplorer) is a mature open-source software solution for file sharing and synchronization designed for the enterprise.
  • Strengths: User-friendly interface, strong security features, mobile and desktop clients, and extensive administrative controls.

4. Syncthing

  • Description: Syncthing is a decentralized file synchronization tool that allows you to sync files directly between devices without relying on a central server.
  • Strengths: Decentralized architecture, strong security and privacy, cross-platform support, and easy to use.

5. Resilio Sync

  • Description: Resilio Sync (formerly BitTorrent Sync) is a peer-to-peer file synchronization tool that uses the BitTorrent protocol for fast and secure file transfers.
  • Strengths: High-speed file transfer, strong encryption, decentralized design, and easy setup.

6. SparkleShare

  • Description: SparkleShare is an open-source file synchronization tool that uses Git for version control and file storage.
  • Strengths: Integration with Git, ease of use, strong version control, and good for collaborative projects.

7. ownCloud Enterprise Edition

  • Description: The enterprise edition of ownCloud provides additional features and support for business users.
  • Strengths: Advanced security features, professional support, and additional enterprise integrations.

8. Dropbox Business

  • Description: Dropbox Business is a cloud-based file storage and collaboration platform designed for businesses.
  • Strengths: User-friendly interface, robust sharing features, extensive integrations, and strong collaboration tools.

9. Google Drive (G Suite/Google Workspace)

  • Description: Google Drive is a cloud storage service that is part of Google Workspace, offering file storage, sharing, and collaboration features.
  • Strengths: Integration with Google apps, strong collaboration features, cloud-based, and extensive storage options.

10. Microsoft OneDrive (OneDrive for Business)

  • Description: OneDrive is Microsoft’s cloud storage service, integrated with Microsoft 365, offering file storage, sharing, and collaboration features.
  • Strengths: Integration with Microsoft 365 apps, strong security, cloud-based, and robust collaboration features.

Each of these alternatives has its own strengths and is suited for different use cases. The choice of tool depends on factors such as the specific features you need, your preferred deployment model (self-hosted vs. cloud-based), and your security and compliance requirements.

Recommended Book: Getting Started with ownCloud Kindle Edition (PAID LINK) by Aditya Patawari
Recommended Online Training: ownCloud NAS – Secure and Storage for Home and Business

629498 2602 5show?id=oLRJ54lcVEg&offerid=1074652.629498&bids=1074652

Environment Specification

We are using a minimal RHEL 8 virtual machine with following specification.

  • CPU – 3.4 Ghz (2 cores)
  • Memory – 2 GB
  • Storage – 100 GB
  • Operating System – Red Hat Enterprise Linux 8.4
  • Hostname – owncloud-01.centlinux.com
  • IP Address – 192.168.116.238 /24

Update Your Linux Operating System

Connect with owncloud-01.centlinux.com as root user by using a ssh client.

Before installing a new software, it is a best practice to update existing packages in your Linux operating system.

# dnf update -y

If the above command installs a new Linux Kernel, then you should reboot your Linux operating system with the new Kernel.

# reboot

Verify the Linux operating system and Kernel versions in use.

# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.4 (Ootpa)

# uname -r
4.18.0-305.12.1.el8_4.x86_64

Installing ownCloud Prerequisites

ownCloud is written in PHP programming language, therefore, you are required a LAMP or LEMP server to deploy this application. Here, we are installing a LAMP server.

All of the ownCloud prerequisite packages are available in standard yum repositories. Therefore, you can install all these software packages by using a single dnf command.

# dnf install -y httpd mariadb-server mariadb php php-curl php-gd php-intl php-json php-ldap php-mbstring php-mysqlnd php-xml php-zip php-opcache wget bzip2

Enable and start LAMP services.

# systemctl enable --now httpd php-fpm mariadb
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
Created symlink /etc/systemd/system/multi-user.target.wants/php-fpm.service → /usr/lib/systemd/system/php-fpm.service.
Created symlink /etc/systemd/system/mysql.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.

Configure initial settings and security of MySQL database server.

# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Connect with MySQL database server as root user.

# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 16
Server version: 10.3.28-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]>

Create a database, that serves as the back end repository for ownCloud server.

MariaDB [(none)]> CREATE DATABASE oc_db;
Query OK, 1 row affected (0.001 sec)

Create a database user for accessing the ownCloud database.

MariaDB [(none)]> CREATE USER 'oc_user'@'localhost' IDENTIFIED BY 'P@ssw0rd';
Query OK, 0 rows affected (0.001 sec)

Grant complete privileges on oc_db database to oc_user.

MariaDB [(none)]> GRANT ALL ON oc_db.* TO 'oc_user'@'localhost';
Query OK, 0 rows affected (0.001 sec)

Reload privileges tables and exit from MySQL shell.

MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> EXIT
Bye

Install ownCloud on RHEL 8

ownCloud file hosting server is available for free download at their official website. You can get the download link of the latest version from there and use the wget command to download it on your Linux server machine.

# wget https://download.owncloud.org/community/owncloud-complete-20210721.tar.bz2
--2021-08-24 12:49:19--  https://download.owncloud.org/community/owncloud-complete-20210721.tar.bz2
Resolving download.owncloud.org (download.owncloud.org)... 167.233.14.167, 2a01:4f8:1c1d:3d1::1
Connecting to download.owncloud.org (download.owncloud.org)|167.233.14.167|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 37541418 (36M) [application/x-bzip2]
Saving to: ‘owncloud-complete-20210721.tar.bz2’

owncloud-complete-2 100%[===================>]  35.80M  29.8KB/s    in 14m 30s

2021-08-24 13:03:51 (42.1 KB/s) - ‘owncloud-complete-20210721.tar.bz2’ saved [37541418/37541418]

We have downloaded the BZIP compressed Tar file. ALternatively, you can choose to download other formats.

Execute the following tar command to extract downloaded file in /var/www directory.

# tar xjf owncloud-complete-20210721.tar.bz2 -C /var/www/

Give the ownership of extracted files to Apache user.

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

Create a Apache configuration file to deploy ownCloud application. You can use vim text editor for this purpose.

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

Add following Apache directives in this file.

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

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

 <IfModule mod_dav.c>
  Dav off
 </IfModule>

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

</Directory>

Save and exit from vim text editor.

Execute following command to test your Apache configurations.

# httpd -t
Syntax OK

Restart Apache service to load changes.

# systemctl restart httpd

Apache process requires explicit read/write access to ownCloud software directory. You can either configure this by defining a SELinux fcontext by using semanage command. or by enabling the httpd_unified SELinux boolean.

Here, we are enabling SELinux boolean by using setsebool command.

# setsebool -P httpd_unified 1

To make your storage cloud accessible across the network, you need to allow the Apache default service port in Linux firewall.

# firewall-cmd --permanent --add-service=http
success
# firewall-cmd --reload
success

Access ownCloud Dashboard

Open URL http://owncloud-01.centlinux.com/owncloud in a web browser.

ownCloud - Create Admin User
ownCloud – Create Admin User

Create an admin user and set the data directory for ownCloud application.

ownCloud - Configure Database
ownCloud – Configure Database

Provide database credentials for connectivity between ownCloud and MySQL server.

Click on ‘Finish Setup’.

ownCloud Login
ownCloud Login

Login as admin user.

ownCloud Dashboard
ownCloud Dashboard

You have reached at the dashboard of ownCloud application.

Read Also: OpenMediaVault: Your All-in-One NAS Solution

Final Thoughts

Installing ownCloud on RHEL 8 can provide a powerful solution for secure file sharing and collaboration. By following this guide, you can successfully set up ownCloud and take advantage of its features. If you need personalized assistance or encounter any issues during the installation process, I offer professional services on Fiverr. Check out my Fiverr gig for expert help with installing ownCloud and other server management tasks.

Leave a Comment