NextCloud is a free and open-source software to enable collaboration and sharing. It allows one access and save files across multiple devices such as PCs and phones. NextCloud works similarly to DropBox because it allows seamless collaboration of various projects, manage your calendar, send and receive emails and also make video calls. In this article we will be walking you through the steps to install and Configure Nextcloud 21 on Rocky Linux 8.

NextCloud 21 has the following features:

  • Ability to push notifications to clients
  • Performance increase back-end.
  • New Whiteboard app to increase collaboration
  • It has miscellaneous additions including user colors in text messages, drag and drop support and status indicators

Since we will be accessing NextCloud using a web interface, there are a few dependencies we need to install and configure.

Step 1: Install LAMP Stack on Rocky Linux 8

You need to have LAMP stack installed on Rocky Linux 8. LAMP stands for Linux, Apache,MySQL/MariaDB and PHP. Follow the article in the link below:

Install LAMP Stack on Rocky Linux 8

Step 2: Create a Nextcloud Database

With LAMP stack installed successfully, we will create a Nextcloud’s data by logging in to the MariaDB database as below.

mysql -u root -p

Log in with MariaDB credentials created above in LAMP stack. Then create a database as below

CREATE DATABASE nextcloud_db;
CREATE USER 'nextcloud'@'%' IDENTIFIED BY '[email protected]';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'%';

Step 3: Install NextCloud 21 on Rocky Linux 8

We are required to download NextCloud file from the official release site. In this article, we will download NextCloud 21 probably not the latest version available. By visiting the official page, you will choose the latest version. First install wget using sudo yum install wget

sudo wget

Extract the file in the directory /var/www/html/ with the command

sudo yum install unzip
sudo unzip -d /var/www/html/

Create a directory to store the nextcloud user data

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

To the created directory, assign permissions to apache web server

sudo chown -R apache:apache /var/www/html/nextcloud/

Step 4: Configure Apache, SELinux and Firewall Rules

Allow SELinux to handle Nextcloud as below

sudo chcon -t httpd_sys_rw_content_t /var/www/html/nextcloud/ -R

Open port 80 on the web server

sudo firewall-cmd --add-port=80/tcp --zone=public --permanent
sudo firewall-cmd --reload

Edit the Apache httpd configuration file:

sudo vim /etc/httpd/conf.d/

Edit the file to look like below snippet:

<VirtualHost *:80>
    DocumentRoot /var/www/html/nextcloud
    ErrorLog /var/www/html/nextcloud/error.log
    CustomLog /var/www/html/nextcloud/requests.log combined

Give permissions of the file /var/www/ to apache and restart the service

sudo chown -R apache:apache /var/www/html/nextcloud/
sudo chmod -R 755 /var/www
sudo systemctl restart httpd

Step 5: Finish Nextcloud 21 Installation on Web

Finalize NextCloud 21 installation over the web by opening the following address on the browser http://server-IP. You will see this landing page.

Input the credentials created in MariaDB and login and select your database as MariaDB under storage and database above

While here, scroll till the end going through the tips.

On the below page, you can customize your background and what you want to appear on the start up page

Now while here, you can now make settings and configurations to nextcloud. To back up, sync and share files on Nextcloud 21 navigate to the Files tab as below:

To share files, click on the + and you will see a whiteboard entry as below:

Set Email notification on Nextcloud

If NextCloud is to be used by more than one peron, it is important to set transactional mails. Go to settings> basic settings

As shown above, we have two modes: sendmail and SMTP. Add the required information either using send mail mode or SMTP

You wil be required to allow this on SELinux as below

setsebool -P httpd_can_sendmail on

User creation in Nextcloud 21

Adding users is quite easy. It is achieved by navigating to settings >>users. While on this page you will see the available users and their permissions. To add a user click on the +New user

Apps management in Nextcloud 21

With NextCloud, you can enhance, customize and restrict features. After installing Nextcloud, you might want to enable and disable a few features and apps depending on your needs. To see default apps, naavigate to the Apps page.

This brings us to the conclusion of this guide. There are a variety of activities you can perform on NextCloud 21. Thanks for viewing this article. I hope this article was useful.

See related articles on our website.


Please enter your comment!
Please enter your name here