How to Install Nextcloud 20 on Ubuntu 16.04/18.04/20.04 LTS



NextCloud is a free open-source self-facilitated distributed storage arrangement. It’s practically like Dropbox. Restrictive distributed storage arrangements (Dropbox, Google Drive, and so forth) are helpful, however at a value: they can be utilized to gather individual information on the grounds that your documents are put away on their PCs. On the off chance that you stressed over protection, you can change to NextCloud, which you can introduce on your private home worker or on a virtual private worker (VPS). You can transfer your documents to your worker through NextCloud and afterward sync those records to your personal computer, PC or advanced cell. This way you have full control of your information.


In this post, We will install and configure NextCloud on ubuntu 16.04 /18.04 LTS 


Step 1: Installing Apache 

You need to update the repository and  need to install apache2 on ubuntu to setup LAMP server, Use the following command for the same.

sudo apt-get update
sudo apt-get install apache2 -y

After this you need to test apache web server by using the given command 
 

curl -I localhost

Sample Output.




Step 2: Installing PHP

NextCloud based on PHP so that’s we are going to install PHP by using the following command.

sudo apt-get install php php-zip php-xml php-json php-gd libapache2-mod-php php-mysql php-curl php-mbstring -y


After this we need to verify php version, Execute the given command.

php -v


Sample Output like this.
 

Step 3: Installing MariaDB

Now we need to install MariaDB database server for NextCloud, Use the given command for the same with root privileges.
 

sudo -i
apt-get install mariadb-server mariadb-client -y


 

Once the installation successful so then you need to secure the MariaDB server by using the given command.

mysql_secure_installation


On this step, You need press enter button to reset or update the MariaDB database server.
 

 Press Y button to continue and save new password to login MariaDB access.

Remove the antonymous users from the MariaDB server Press Y for that.

Disable remotely login in MariaDB server Press Y to enable it.

Now you will be asked for the remove the test database from MariaDB server Press Y button for the same.

In the final step, You need to update the tables privileges by pressing the Y button.


Now, We are about to create database and user with permission for Nextcloud, Use the given command for the same.

Login in MariaDB shell

sudo mysql -u root -p

Create a database for nextcloud, You can change the details for security perpose.

Execute the given command one by one.

CREATE DATABASE nextcloud;
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'MYPASSWORD';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';
FLUSH PRIVILEGES;
EXIT

Sample output like this.



Step 4:Download NextCloud

You need to download the NextCloud’s zip file from the official website and use the given to setup NextCloud with Apache web server.

cd /tmp
wget https://download.nextcloud.com/server/releases/nextcloud-20.0.5.zip
apt-get install unzip -y
unzip nextcloud-*.zip
rsync -azvh nextcloud/* /var/www/html/
mkdir /var/www/html/data
chown -R www-data:www-data /var/www/html/*
chmod -R ugo+rw /var/www/html/*
systemctl restart apache2

 
if you have enabled UFW firewall So then you need to open it by using the given command.

ufw status
ufw allow 80


Step 4: Setup NextCloud

You need to open your browser with given URL to create admin account and configure the MariaDB database server.

http://localhost or http://IP_Address

You shoud get the webpage like this.


This is your first webpage of nextcloud here you need setup your admin username and password as showing in the screenshot.

On the next step you need to click on Storage & database button to enter the database credentials.


As you can see the i have entered my MariaDB database credentials and uncheck the Install recommended apps and click on Finish setup button.

 
 

On the next step you will required update and configuration like this and it will few second to finish.
 

 

Use your admin credentials to login and you will get introduction of the NextCloud Open source platfrom click next icon to get next page.
 
 

Here you will get the information about NextCloud service and information just click on next icon to get next page.


Here we are getting formal information of NextCloud just click on next icon.


Also NextCloud provide App for Desktop, IOS and Android as well.

Here you can find more information about NextCloud and click on Start using nextcloud button.

Click on file button as showing in the screenshot and here you can view and upload your staff.



Getting admin account details and here you can create new user in nextcloud as well click user profile and setting.

Creating new user for NextCloud, You need to click on New User button to add.


Conclusion

We have successfully installed NextCloud in our Ubuntu 18.04 server.

How to Install Nextcloud 20 on Ubuntu 16.04/18.04/20.04 LTS

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top