How to install NextCloud server on Rocky Linux 8 – Linux Shout

Step by step tutorial to install NextCloud on Rocky Linux 8 for personal cloud storage to store media files and documents using the internet from anywhere; using smartphone or desktop app.

What is Nextcloud?

Nextcloud is a free open source cloud software for the encrypted storage of data in a cloud or on your servers. It is client-server software and forked of another open-source known as OpenCloud. Also, it is a good alternative to cloud storage like Dropbox, Google Drive, and OneDrive, if someone wants a seld-hosted personal cloud solution.

Cloud storage like Dropbox, Google Drive, and OneDrive are very popular nowadays; one of the reasons is the automatic sync of users files to the cloud across different devices, so data is easily accessible and not lost. Well, that facility is also there on Nextcloud.

Although such public cloud storage services are offered by larger companies generally safe and reliable. However, these offers also have disadvantages. They only offer their customers a limited amount of free storage space. If customers need more space to store their data, they have to pay.

NextCloud also offers two-factor authentication to better protect the cloud accounts against unauthorized access. Whereas this personal cloud server can also encrypt data to securely send data remotely, however, to improve the user experience, especially for newcomers, encryption is not enabled by default. Because encryption increases file size by approximately 35%. Further it also comes with Healthcare and HIPAA; GDPR Compliance Kit; Auditing capabilities and File Access Control.

The steps given here will be applicable for other RedHat-based Linux distros such as CentOS, Almalinux, Oracle Linux

Rocky Linux 8 Apache, PHP 7.3, 7.4, 8.0 MySQL 8.0+ or MariaDB 10.2/10.3/10.4/10.5 Non-root sudo user 512MB of RAM

If you have just installed a fresh Rocky Linux server or havent updated it for a while then first run the system update command:

Also, install:

Once the update is completed, also put SELinux in permissive mode, which means disabling it temporarily until the next reboot. This will make sure there will be no unwanted restriction in installing NextCloud.

To check the status:

As one of the requirements of NextCloud is the web server, so for that install Apache, along with that being a PHP based web application also configure the same.

Start and enable Apache services

To check the status:

According to NextCloud, PHP 8.0 is recommended to use. Hence, we go for that because the version via the default repository of Rocky Linux is 7.2. Therefore, we have to add the Remi repo manually to get the latest version.

Install:

Increase PHP Memory limit:

Find memory_limit and set the value to 512M

Save the file: Ctrl+O, hit the Enter key, and then exit: Ctrl+X.

We also need some medium to store the data generated by NextCloud, here we are using MariaDB. However, you can use MySQL, SQLite, Oracle Database, and PostgreSQL as well if you want.

Start and enable the service:

Secure Database:

Follow the text-based wizard.

Create a New Database for NextCloud:

Login:

Create database User:

Create DB:

Give all rights of created DB to use:

Note: Replace yourdb with the database name you want to give, whereas the youruser with the username and yourpasswordwith the password you want to assign.

Visit the official website of NextCloud and then download it. Right-click on the Download button and copy the link address.

paste the link with wget

Example:

unzip the file:

Move the extracted file to /var/www/html/ directory

Create a data folder to store uploaded data in Nextcloud

Now, the give the Nextcloud permission to Apache user:

Lets create an Apache configuration file for NextCloud, to serve the file in case you are using the domain name or multiple websites are running on the same server.

Paste the following lines:

Note: Dont forget to replace cloud.example.com with the domain name you want to use. If you dont have any then leave it as it is.

Restart the Apache web server and set SELinux policies:

Once all the above steps are completed you are ready to access the web interface for setting up NextCloud further on your Rocky Linux 8 system.

Open your browser that can access the domain or IP address of the server where you have installed NextCloud. After that point to the Ip or domain:

Create Admin user and enter Database Details

The first page will ask you to create an Admin user and after that select MySQL/MariaDB as Database. There enter the details of the Database you have created.

After that click on the Finish button.

In the future if you want to upgrade your NextCloud using the command, easily, then here is the command:

Edit php.ini

Scroll to the end of the file:

Save the file using Ctrl+O, hit the Enter key, and then press Ctrl+X

Once you have added

Those who also want to set SSL certificate needto run the following commands:

Note: Make sure in your Domain DNS A record is pointing to the Ip-address where you have installed NextCloud.

Once the SSL certificate has been issued successfully edit your existing Apache Configuration:

Delete existing configuration and add the following one. And dont forget to replace the cloud.example.com with the domain name you want to use access NextCloud.

Save the file by pressing Ctlr+O, hit the Enter key, and then exit the same using Ctrl+X.

In this way, we can install NextCloud on Rocky Linux or in any Redhat-based system such as CentOS, Oracle Linux Although it is a good way to set up your cloud to access files remotely, a few disadvantages are always there. Such as the user will be responsible for maintenance, security, and settings including hardware.

Other Articles:

Enable Minimize & Maximize buttons on Almalinux or Rocky Linux How to install NextCloud on Debian 11 Bullseye Linux Install Nextcloud Client on Debian 11 Bullseye Linux How to Install Cockpit on Ubuntu 22.04 | 20.04 LTS How to install FileZilla client on Rocky Linux

See more here:
How to install NextCloud server on Rocky Linux 8 - Linux Shout

Related Posts

Comments are closed.