Nextcloud is an open-source, self-hosted file sharing and collaboration platform that can be used to share and sync files, manage calendars, and store data. In this tutorial, we will show you how to install Nextcloud on Kali Linux latest version.
First, we need to install some required PHP modules that Nextcloud depends on. Use the following command to install them:
sudo apt install php-xml php7.3 php7.3-gd php7.3-json php7.3-mbstring php7.3-curl php7.3-mysql php7.3-sqlite3 php7.3-ldap php7.3-zip
Download the latest Nextcloud release from the official website. You can use wget
or download it from your web browser.
wget https://download.nextcloud.com/server/releases/nextcloud-22.1.1.zip
Extract the downloaded zip file to the web root directory.
sudo unzip nextcloud-22.1.1.zip -d /var/www/
Change the ownership of the Nextcloud directory to the web server user and group.
sudo chown -R www-data:www-data /var/www/nextcloud/
Set the correct file permissions for the Nextcloud directory.
sudo chmod -R 755 /var/www/nextcloud/
Log in to your MariaDB or MySQL server as root.
Create a new database.
CREATE DATABASE nextcloud;
Create a new user and grant privileges.
CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost';
FLUSH PRIVILEGES;
Open the Apache default configuration file.
sudo nano /etc/apache2/sites-available/000-default.conf
Add the following lines at the end of the <VirtualHost>
section.
Alias /nextcloud "/var/www/nextcloud/"
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
</Directory>
Enable the required Apache modules.
sudo a2enmod rewrite headers env dir mime
sudo systemctl restart apache2
Open a web browser and navigate to http://localhost/nextcloud
.
Follow the instructions on the screen to finish the installation.
In the Database
section, enter the database details that you created in Step 3.
Set localhost
as the MySQL host.
Enter the username and password that you created for the database user.
Click on the Finish setup
button to complete the installation.
Congratulations! You have successfully installed Nextcloud on Kali Linux. You can now use it to share and sync files, manage calendars, and store data.
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!