How to Install NextCloud on Rocky Linux 10

NextCloud is an open-source self-hosted cloud storage and collaboration platform that gives users full control over their data. You can sync files across devices, share content, and use various productivity apps securely from your server.

Prerequisites

  • A system running Rocky Linux 10
  • A working LAMP Stack with PHP 8.2
    Click here

⚠️ Note: As of this guide, NextCloud 24.0.3 is not compatible with PHP 8.3 or newer (e.g., PHP 8.4), so PHP 8.2 is recommended.

Install Required PHP Modules

Run the following command to install the PHP 8.1 modules required by NextCloud:

sudo dnf module enable php:remi-8.1 -y
sudo dnf install -y php-zip
sudo systemctl restart httpd
sudo dnf install -y php php-cli php-fpm php-mysqlnd php-gd php-mbstring php-xml php-opcache php-pdo php-curl

Confirm PHP Version:

php -v

Create a Database for NextCloud

Login to MariaDB:

mysql -u root -p

Inside the MariaDB shell:

CREATE DATABASE nextcloud_db;
GRANT ALL ON nextcloud_db.* TO 'nextcloud-user'@'localhost' IDENTIFIED BY 'Enter-A-Password-Here';
FLUSH PRIVILEGES;
EXIT;

🔐 Replace Enter-A-Password-Here with a strong password of your choice.

Install NextCloud

Download the NextCloud 24.0.3 release:

dnf install -y wget

wget https://download.nextcloud.com/server/releases/nextcloud-24.0.3.zip

Extract the archive to the Apache web directory:

dnf install -y unzip
unzip nextcloud-24.0.3.zip -d /var/www/html/

Create the data directory:

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

Set ownership and permissions:

chown -R apache:apache /var/www/html/nextcloud/
chcon -t httpd_sys_rw_content_t /var/www/html/nextcloud/ -R

Open Firewall Port

Enable HTTP port:

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

Final Setup via Web Installer

Visit:

http://your-server-ip/nextcloud

In the browser:

  1. Enter admin username and password
  2. Under "Storage & Database", choose MySQL/MariaDB
  3. Provide the database name, user, and password
  4. Click Finish Setup

Screenshots

✅ That’s it! You’ve successfully installed NextCloud on Rocky Linux 10 with PHP 8.2.

Need help? Reach out via a Support Ticket.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS