Collaboration and file sharing are very important, especially when working as a team on the same project. It helps teams get projects done on time and in a fashionable manner despite the geographical distances

Today, there is a wide range of file sharing and synchronization tools. Some tools do not allow you to control the security of the files you store. These are Google Cloud, Microsoft Cloud, and Dropbox. If you want to have total control of the infrastructure, Nextcloud and ownCloud are the preferred suites.

Owncloud and Nextcloud share a lot of similarities and often confuse people. This is because the two have the same base and were founded by the same person and are both open-source and self-hosted alternatives to other cloud services such as Dropbox.

Owncloud cloud was developed in January 2010 by several open-source developers and a venture capital firm. Due to several differences, the main developers of Owncloud including the main founder Frank Karlitschek left Owncloud in 2016 and created Nextcloud. So they forked the code base and developed Nextcloud from it. The popularity of Nextcloud grew immensely with the large community of developers behind it. A lot of plugins have been added to Nextcloud making it offer more features such as collaborative editing, email client, note-taking, project management, video conferencing e.t.c

With all the similarities, still there are slight differences between Owncloud and Nextcloud. The key differences are:

Nextcloud Owncloud
Nextcloud is completely freeNeed to subscribe to the Enterprise pack, which adds additional features
Increased services including video conferencing and collaborative work e.t.cFocused on sharing and synchronizing data
Has a larger active communityThe active community is gradually decreasing
Offers protection from brute force attacks, flow restriction, password management, and many other security optionsSome security features are only available in the Enterprise version. You can have a 30-day free trial.

In this guide, we will walk through how to install Nextcloud / OwnCloud on Rocky Linux 9|AlmaLinux 9

1. Install LAMP stack

The LAMP stack consists of open-source Linux tools that include Apache, MySQL/MariaDB, and PHP. The LAMP stack can be installed on Rocky Linux 9|AlmaLinux 9 with aid of the guide:

The current Owncloud, release does not support PHP 8.0, so you may need to install PHP 7.4 from the REMI repo:

sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm 

Enable PHP 7.4;

sudo dnf module reset php -y
sudo dnf module enable php:remi-7.4 -y

Now install PHP 7.4 on Rocky Linux 9|AlmaLinux 9;

sudo dnf install httpd php php-{common,gmp,fpm,curl,intl,pdo,mbstring,gd,xml,cli,zip,mysqli} -y

Enable httpd and fpm services

sudo systemctl enable --now httpd php-fpm

Verify the version:

$ php --version
PHP 7.4.32 (cli) (built: Sep 28 2022 09:09:55) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.32, Copyright (c), by Zend Technologies

Also, ensure that MariaDB is installed and service is started.

sudo dnf -y install mariadb-server mariadb
sudo systemctl enable --now mariadb

2. Create a Database for Nextcloud / OwnCloud

Once we have a database server installed and running, we will create a database for Nextcloud / OwnCloud.

Now login to the shell using the created root password:

sudo mysql -u root -p

Create the database for Nextcloud / OwnCloud as shown:

CREATE DATABASE cloud_db;
GRANT ALL PRIVILEGES ON cloud_db.* TO 'cloud_user'@'%'  IDENTIFIED BY 'StrOngDBPassw0rd';
FLUSH PRIVILEGES;
EXIT;

You can replace the database name, user, and password with your preferred credentials.

3. Download Nextcloud / OwnCloud Source Code

To download the latest source code for Nextcloud. visit the official release site. Alternatively, you can pull the source code via wget:

sudo dnf -y install vim wget unzip
wget https://download.nextcloud.com/server/releases/latest.zip

For Owncloud, obtain the latest archive from OwnCloud’s download page. You can also pull the file via wget:

wget https://download.owncloud.com/server/stable/owncloud-complete-latest.zip

Once downloaded, extract the zipped files to /var/www/html/ as shown;

##For Nextcloud
sudo unzip latest.zip -d /var/www/html/

##For OwnCloud
sudo unzip owncloud-complete-latest.zip -d /var/www/html/

For Nextcloud, create a directory to store data;

sudo mkdir -p /var/www/html/nextcloud/data

Now set the ownership of the files to Apache:

##For Nextcloud
sudo chown -R apache:apache /var/www/html/nextcloud/

##For OwnCloud
sudo chown  -R apache:apache /var/www/html/owncloud/

4. Configure Apache, SELinux, and Firewall Rules

For the Paths to be accessible, you need to configure SELinux as shown:

##For Nextcloud
sudo dnf -y install policycoreutils-python-utils
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/nextcloud(/.*)?"
sudo restorecon -Rvv /var/www/html/nextcloud

##For OwnCloud
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/owncloud(/.*)?"
sudo restorecon -Rvv /var/www/html/owncloud

Next, create a virtual host file for Nextcloud /OwnCloud

##For Nextcloud
sudo vim /etc/httpd/conf.d/nextcloud.conf

##For OwnCloud
sudo vim /etc/httpd/conf.d/owncloud.conf

In the file, add the below lines replacing them appropriately;

  • Nextcloud
<VirtualHost *:80>
    ServerName nextcloud.computingforgeeks.com
    ServerAlias www.nextcloud.computingforgeeks.com
    DocumentRoot /var/www/html/nextcloud
    ErrorLog  /var/log/httpd/nextcloud_error.log
    CustomLog /var/log/httpd/nextcloud.log combined
</VirtualHost>
  • Owncloud
<VirtualHost *:80>
    ServerName nextcloud.computingforgeeks.com
    ServerAlias www.nextcloud.computingforgeeks.com
    DocumentRoot /var/www/html/owncloud
    ErrorLog /var/log/httpd/owncloud_error.log
    CustomLog  /var/log/httpd/owncloud.log combined
</VirtualHost>

Save the file and restart Apache:

sudo systemctl restart httpd

Allow the HTTP service through the firewall:

sudo firewall-cmd --add-service={http,https} --zone=public --permanent
sudo firewall-cmd --reload

5. Access Nextcloud /OwnCloud Web UI

At this point, you can access your Nextcloud /OwnCloud installation from the browser using the URL http://domain_name

##For Nextcloud
Using domain name: http://your_nextcloud_domain
Using IP address: http://serverIP/nextcloud

##For owncloud
Using domain name: http://your_owncloud_domain
Using IP address: http://serverIP/owncloud

You need to create an admin account, so fill in the username and password.

NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9

Click on Storage & database and provide the created database credentials.

NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 1

Click Finish setup and you will be redirected to the login page where you are required to provide your created Admin credentials.

NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 2

Once authenticated, you will see the below dashboard.

  • Nextcloud
NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 3
  • Owncloud
NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 4

Now you are set to upload and share your files with Nextcloud /OwnCloud. To add plugins, navigate to the Apps page under the user profile.

NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 5

6. Install and Configure Nextcloud / OwnCloud Client

You can install client applications for Nextcloud /OwnCloud and use them to connect to your server. This can be done with the below commands:

  • Nextcloud Client
##On Debian/Ubuntu
sudo add-apt-repository ppa:nextcloud-devs/client
sudo apt update
sudo apt install nextcloud-client

##On CentOS/Alma Linux/Rocky Linux
sudo yum -y install epel-release
sudo yum -y install nextcloud-client
  • Owncloud Client
##On Ubuntu
wget -nv https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/Ubuntu_22.04/Release.key -O - | sudo apt-key add -
echo 'deb https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/Ubuntu_22.04/ /' | sudo tee -a /etc/apt/sources.list.d/owncloud.list
sudo apt update
sudo apt install owncloud-client

##On Debian
wget -nv https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/Debian_11/Release.key -O - | sudo apt-key add -
echo 'deb https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/Debian_11/ /' | sudo tee -a /etc/apt/sources.list.d/owncloud.list
sudo apt update
sudo apt install owncloud-client

##On CentOS/Alma Linux/Rocky Linux
sudo rpm --import https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/CentOS_7/repodata/repomd.xml.key
sudo wget https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/CentOS_7/owncloud.repo -O /etc/yum.repos.d/owncloud.repo
sudo yum clean all
sudo yum install owncloud-client
sudo yum upgrade owncloud-client

You can launch the Owncloud client from the terminal;

owncloud

If installed from APT/YUM repositories, launch Nextcloud /OwnCloud from the App Menu

NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 6

Connect to your Nextcloud /OwnCloud server by providing your URL as shown.

NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 7

For Nextcloud, you will be redirected to a web browser. But for both, you need to provide the admin credentials.

NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 9

Next, configure synchronization. Select the folder you want to use for Nextcloud /OwnCloud synchronization.

NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 10

Once connected, synchronization will happen as shown.

  • Owncloud
NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 11
  • Nextcloud
NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 13

Now you can add and remove files locally from the synchronized folder set.

  • Owncloud
NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 15
  • Nextcloud
NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 14

To demonstrate if synchronization is working, create a sample file/folder.

NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 16

Verify if the folder/file appears on the web UI.

NextcloudOwnCloud on Rocky Linux 9AlmaLinux 9 17

Voila!
That marks the end of this guide on how to install Nextcloud / OwnCloud on Rocky Linux 9|AlmaLinux 9. We have all seen how the two tools have many similarities. Now enjoy the amazing features associated with the preferred tool.

See more:

NextCloud vs ownCloud vs Seafile vs Syncthing

How to integrate ONLYOFFICE Docs and Nextcloud on Ubuntu

Install and Use Syncthing on Ubuntu

LEAVE A REPLY

Please enter your comment!
Please enter your name here