how to install nexcloud in ubuntu 18.042 min read

We need your support!!
Other Amount:
24-Hour Flash Sale. Courses from just ₹ 490.
Prabhin Prabharkaran Administrator
DevOps Engineer

He is a Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!

follow me

how to install nexcloud in ubuntu 18.04

In this document we will show you how to install nexcloud in ubuntu 18.04

Nextcloud is a suite of client-server software for creating and using file hosting services. It is functionally similar to Dropbox, although Nextcloud is free and open-source, allowing anyone to install and operate it on a private server

Install Apache and mariadb
Use the following commands to install apache and marriadb server

sudo apt-get update
sudo apt-get install apache2 mariadb-server mariadb-client

After installing Apache2, the commands below can be used to stop, start and enable Apache2 service to always start up with the server boots.

sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service

sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

Install PHP packages

sudo apt install php7.2-xml php7.2-cgi php-7.2-cli php7.2-mysql php7.2-mbstring php7.2-gd php7.2-curl php7.2-zip

After that, run the commands below to secure MariaDB server by creating a root password and disallowing remote root access.

sudo mysql_secure_installation

When prompted, answer the questions below by following the guide.

Enter current password for root (enter for none): Just press the Enter
Set root password? [Y/n]: Y
New password: Enter password
Re-enter new password: Repeat password
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
Restart MariaDB server

sudo systemctl restart mariadb.service

Create database for nextcloud

login to mariadb

mysql -u root -p

Enter the password

GRANT ALL PRIVILEGES ON cloud.* TO ‘your_username_here’@’localhost’ IDENTIFIED BY ‘your_chosen_password_here’;

Download latest nextcloud

cd Downloads
$ wget

Unzip Nextcloud, and copy/move the resulting file into your web root or whichever directory you configured your web server to serve it out of.

$ unzip
$ sudo cp -r ~/Downloads/nextcloud /var/www/

Change the ownership of the directory to match your web server. The default is www-data.

sudo chown -R www-data:www-data /var/www/nextcloud

Now open the browser and navigate to server ip address


Thus you finished Nextcloud installation

We need your support!!
Other Amount:
Questions Answered
Articles Written
Overall Points

Prabhin Prabharkaran

He is Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!!

You may also like...

2 Responses

  1. i’m facing issue in accessing the nexcloud in the browser it’s says 404 not found.

  2. Prabhin says:

    Kindly move next cloud folder to /var/www/html

Leave a Reply