Nextcloud is a cloud-based platform that provides file hosting, sharing, and syncing capabilities. It is an open-source and free software that allows users to store their files securely and collaborate with others. Here is how to install Nextcloud on MXLinux.
Step 1: Update the APT Repository
To install Nextcloud on MXLinux, you need to update the APT repository by running the following command in the terminal:
sudo apt update
Step 2: Install the Required Packages
After updating the APT repository, you need to install some packages that are required for Nextcloud to work. Run the following command in the terminal:
sudo apt install apache2 mariadb-server libapache2-mod-php7.4 \
php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc \
php7.4-curl php7.4-gd php7.4-cli php7.4-zip \
php7.4-mbstring php7.4-intl php7.4-bcmath \
php7.4-gmp -y
During the installation, you will be asked to Enter a New Password for the MariaDB root user. Please set a secure password and remember it.
Step 3: Create a Database for Nextcloud
After installing the required packages, you need to create a database for Nextcloud. Run the following commands in the terminal:
sudo mysql -u root -p
Enter the password you set for the MariaDB root user earlier. Next, run the following commands:
CREATE DATABASE dbname;
CREATE USER 'ncuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dbname.* TO 'ncuser'@'localhost';
FLUSH PRIVILEGES;
Replace dbname with the name you want to give to the database, and password with a strong password.
Step 4: Download Nextcloud
Nextcloud is not available in the official MXLinux repository, so you need to manually download it from the Nextcloud website. Open the browser and navigate to https://nextcloud.com/install/#instructions-server. Scroll down to the Web Installer section and click on the Download button.
Once the download is complete, extract the archive and place it in the /var/www/html/nextcloud directory.
Step 5: Configure Apache for Nextcloud
To make Nextcloud accessible through the web browser, you need to configure Apache. Run the following command in the terminal:
sudo nano /etc/apache2/sites-available/nextcloud.conf
Add the following configuration to the nextcloud.conf file:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/nextcloud/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/nextcloud/>
Options +FollowSymlinks
AllowOverride All
Require all granted
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/html/nextcloud
SetEnv HTTP_HOME /var/www/html/nextcloud
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log access.log
</VirtualHost>
Replace ServerName and ServerAlias with your domain name or server IP address.
Save and close the file by pressing CTRL+X, followed by Y, and press Enter.
Step 6: Enable Required Apache Modules
Next, enable the required Apache modules by running the following commands:
sudo a2ensite nextcloud.conf
sudo a2enmod rewrite headers env dir mime
Step 7: Restart Apache
After configuring Apache, you need to restart the Apache service by running the following command:
sudo systemctl restart apache2
Step 8: Access Nextcloud
Once you have installed and configured Nextcloud, you can access it by opening your web browser and navigating to http://your-domain.com/nextcloud or http://your-server-IP/nextcloud. Nextcloud's setup wizard will open, and you need to create an admin account and provide the database, username and password you created in Step 3.
Conclusion
In this tutorial, you learned how to install Nextcloud on MXLinux. Nextcloud is a powerful platform that can be used for file sharing, hosting, and syncing. With Nextcloud, you can store and collaborate on files easily, ensuring that your data is safe and secure.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!