Page cover

☁️Nextcloud - Self Hosted file sync & sharing solution

2023-10-21

Nextcloud is an open-source cloud platform that allows you to store, sync, and share files, calendars, contacts, and more. It provides secure and self-hosted cloud storage solutions, allowing you to have control over your data and privacy.

For this installation, I will be using Ubuntu as my distribution of choice. The below commands will work on any Debian-based distribution.

Step 1

Update repositories

sudo apt update -y
sudo apt upgrade -y

Step 2

Install Apache web server

sudo apt install apache2

Start and enable Apache

sudo systemctl start apache2
sudo systemctl enable apache2

Step 3

Install MariaDB database server

sudo apt install mariadb-server

Secure the database (Follow the instructions after running the command)

sudo mysql_secure_installation

Copy the following code into a file

Create the file

Paste the below code in the file and save the file by pressing Ctrl + x, Y & Enter

Run the script and set your database credentials

Step 4

Install PHP

Install PHP Modules

Step 5

Download Nextcloud

Extract the downloaded file and copy the file contents to the html directory

Set the correct permissions

Open a web browser and navigate to your server's IP address Follow the on-screen instructions to complete the Nextcloud installation. Create an admin account and specify the MySQL database details you set in step 3.

Last updated