We're here to assist with any of your needs, don't hestitate to reach out.
Nextcloud is a free and open-source cloud storage and collaboration platform that allows you to store your files, documents, and data on your own server or in the cloud. It provides features like file sharing, synchronization, versioning, and collaboration, making it a great alternative to commercial cloud storage services.
Before installing any software, it's always a good idea to update the system packages to their latest versions:
$ sudo dnf update
Nextcloud requires a few additional packages to be installed on your system. Use the following command to install them:
$ sudo dnf install @php @php-cli php-curl php-gd php-intl php-json php-mbstring php-mysqlnd php-opcache php-pdo php-pecl-apcu php-pecl-imagick php-pecl-zip php-xml php-zip
Nextcloud requires a web server to run. In this guide, we'll use Apache. Install Apache using the command below:
$ sudo dnf install httpd
Nextcloud also requires a database server. We'll use MariaDB in this tutorial. Install MariaDB using the following command:
$ sudo dnf install mariadb-server
Secure your MariaDB installation by running the provided security script:
$ sudo mysql_secure_installation
Create a new database and a dedicated user for Nextcloud:
$ sudo mysql -u root -p
mysql> CREATE DATABASE nextcloud;
mysql> CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> EXIT;
Download the latest stable release of Nextcloud from their website or use the following command:
$ cd /tmp
$ wget https://download.nextcloud.com/server/releases/latest.tar.bz2
$ tar xvf latest.tar.bz2
Move the extracted Nextcloud files to the Apache web document root directory:
$ sudo mv /tmp/nextcloud /var/www/html/
Set the correct permissions for Nextcloud to function properly:
$ sudo chown -R apache:apache /var/www/html/nextcloud/
$ sudo chmod -R 755 /var/www/html/nextcloud/
Create a new Apache virtual host configuration file for Nextcloud:
$ sudo nano /etc/httpd/conf.d/nextcloud.conf
Add the following content to the file:
ServerName your_domain_or_IP
DocumentRoot /var/www/html/nextcloud/
Options +FollowSymlinks
AllowOverride All
Require all granted
Dav off
SetEnv HOME /var/www/html/nextcloud
SetEnv HTTP_HOME /var/www/html/nextcloud
Save and close the file.
Enable the required Apache modules:
$ sudo systemctl enable --now httpd
$ sudo systemctl restart httpd
Open your web browser and visit http://your_domain_or_IP/nextcloud/ to start the installation process. Follow the on-screen instructions to complete the installation.
That's it! You have successfully installed Nextcloud on CentOS 8. You can now begin using Nextcloud to store and manage your files and data.
What our customers say about us
Create your free account today.