Uncategorized Install NextCloud on AlmaLinux 8 – Open Source personal cloud – Linux Shout
Step by step tutorial to install NextCloud on AlmaLinux 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 free and open-source server-client architecture software that source code is available on GitHub. It is a fork of another popular personal cloud solution “OwnCloud”. Any user or enterprise can use it to build their cloud similar to Google Drive, iCloud, Dropbox, and Onedrive. Where to sync and access data (upload and download) automatically with a local directory user can use Next Cloud client application for smartphones and Desktops. This means that a consistent database can be accessed from several computers, but also via a web interface. Although Nextcloud is based on PHP, only Linux is supported as a server environment. It is also not possible to use Apache or NGINX with PHP on Windows.
The steps given here will be applicable for other RedHat-based Linux distros such as CentOS, Rocky Linux, Oracle Linux…
• AlmaLinux 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 AlmaLinux server or haven’t updated it for a while then first run the system update command:
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 AlmaLinux is 7.2. Therefore, we have to add the Remi repo manually to get the latest version.
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:
Follow the text-based wizard.
Create a New Database for NextCloud:
Create database User:
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 yourpassword with 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
unzip the file:
Move the extracted file to
Create a data folder to store uploaded data in Nextcloud
Now, the give the Nextcloud permission to Apache user:
Let’s 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: Don’t forget to replace cloud.example.com with the domain name you want to use. If you don’t 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 AlmaLinux 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:
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 need to 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 don’t 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 AlmaLinux 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.
Installing and setting up your own Nextcloud on a Linux VPS takes about an hour – and is also doable for Linux newbies. And what if you hear about any security breaches and scandals from the usual cloud providers in the future? Then you can build your own cloud using Nextcloud; it can improve OwnCloud’s offering in several ways. It’s important to weigh the pros and cons of the open-source and commercial options when choosing a storage solution. Nextcloud ‘s open-source file-sharing tool is a viable, free, and attractive option for many individuals and businesses.
• Enable Minimize & Maximize buttons on Almalinux or Rocky Linux
• How to Install WordPress on AlmaLinux 8 | Rocky Linux 8
• 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
AlmaLinux, Rocky Linux
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Linux Shout crafted as a part of our main portal H2S Media to publish Linux related tutorials and open source Software.