Set up Nextcloud – Free & Open Supply Cloud Storage Resolution

It’s stated that the information is the brand new oil of the trendy world. Everyone knows how firms mine records and promote it to different firms. Not solely that however lately using cloud storage has additionally risen up which implies individuals have now began utilizing cloud storage to retailer their essential records.

Google, Microsoft, Apple, Yandex, and virtually all different main firms present cloud storage options. All of those providers present a free plan for private use however for those who’re a enterprise, you then’ll have to pay an enormous sum of money to develop your storage.

Even after you subscribe to their premium providers, your records stays on their servers and so they can management it nevertheless they need which make these firms extra highly effective. Lately, Europian Governments have begun to deploy their very own cloud options moderately than choosing any foreign-based firm.

Deploying your individual cloud answer isn’t solely more cost effective but it surely offers proprietor full management over their records. Probably the greatest methods to setup a self-hosted cloud answer is Nextcloud.

Nextcloud is a free and open-source cloud storage platform one can simply setup. It’s the finest free & open-source various to Google Drive or Dropbox.

Like some other widespread cloud service, you may deploy Nextcloud and have your loved ones or worker apply it to any machine they’ve together with, Android, iOS and many others.

On this article, we’re going to setup Nextcloud on a VPS(Digital personal server).

System Necessities

Nextcloud might be setup on all main Linux distributions.

  • Ubuntu 18.04 LTS (Really helpful)
  • Crimson Hat Enterprise Linux 7 (Really helpful)
  • Debian 8 (Jessie), 9 (Stretch)
  • SUSE Linux Enterprise Server 11 with SP3 & 12
  • openSUSE Leap 42.1+
  • CentOS 7

Database necessities

  • MySQL 5.x or MariaDB 5.5+ (advisable)
  • Oracle Database 11g (solely as a part of an enterprise subscription)
  • PostgreSQL 9/10
  • SQLite (solely advisable for testing and minimal-instances)


  • Apache 2.4 with mod_php or php-fpm (advisable)
  • nginx with php-fpm

PHP model

For organising Nextcloud on localhost

If you wish to setup Nextcloud to your residence or native community, then learn the next articles on putting in Linux distribution & organising LAMP on it.

I desire to make use of Ubuntu newest LTS model for all my tasks.

As soon as now we have put in Ubuntu, we will set up different required packages for Nextcloud.

If you’re organising Nextcloud on localhost, you may comply with these steps with none issues. If you’re a small or massive firm, you must have a server with a static ip tackle.

For the aim of this text, I’m going to setup a Ubuntu 18.04 droplet on Digitalocean. It takes minutes to create a server up and operating on Digitalocean.

Create a Ubuntu Server on Digitalocean

Create Ubuntu server on digitalocean
Create Ubuntu server on Digitalocean
Select server location on Digitalocean
Choose server location on Digitalocean
Finalize & Create server
Finalize & Create server

It takes 2 to three minutes for the server to be prepared to attach. As soon as the server is prepared, it reveals the ip tackle on the dashboard. The setup course of robotically creates a root consumer and sends the password to the consumer’s registered e mail.

Server running on Digitalocean
Server operating on Digitalocean

From the dashboard copy the IP tackle of the server and login utilizing SSH.

ssh [email protected]

You’ll requested to sort your password. Merely copy the password from the e-mail despatched to your registered e mail id and paste it right here.

Login to server using SSH
Login to server utilizing SSH

For safety functions, the default password should be modified if you login on the server for the primary time. So after you’re logged in to your server, you’ll be requested to retype your present password and enter a brand new password.

Set a new root password
Set a brand new root password


Make a robust password. Embody string, numbers, and symbols to make it sturdy.

You may examine your password energy right here. This device reveals the time completely different system takes in cracking your password. It is vitally essential to make use of this device to determine the energy of your passwords.

Create a brand new consumer account on Ubuntu

By default, the server creation course of creates a root consumer. It’s not advisable to make use of root on a regular basis. We are able to create a brand new server consumer and provides it sudo entry to make it carry out administrative duties.

To create a brand new consumer, we use ‘adduser’ command.

adduser username
Create a new server user
Create a brand new server consumer

Add consumer to sudo group

Till this level, you received’t be capable of use sudo with the newly created account. Add the brand new consumer account to sudo group.

usermod -aG sudo sandy

It’s all completed! We now have a server operating with a brand new consumer account that may use sudo. 🙂

You may login to the brand new consumer account from the present session utilizing the next command or log off of the basis consumer and create a brand new session.

To login from the present session –

su - sandy
Exchange sandy along with your username.
Login to new user account
Login to new consumer account

Login to new server consumer

ssh [email protected]

Replace your Server

The very very first thing to do after logging in to the server is to replace it. We use apt bundle supervisor to replace Ubuntu Linux.

sudo apt replace && sudo apt improve -y

The replace course of could take a very long time relying in your web velocity. In case you’re utilizing VPS like in my case, it received’t take greater than 3 minutes.

As soon as the server finishes putting in updates, reboot the server utilizing the next command –

sudo reboot

Reboot often takes 30s-1m. So strive logging in to the server after 1 minute.

ssh [email protected]

Now our server is prepared and we will begin to put together Nextcloud set up.

Set up Nextcloud Necessities

Copy and paste the next instructions to put in PHP7.2 + extensions and apache internet server.

sudo apt set up php7.2 php7.2-zip php7.2-zip php7.2-xml php7.2-gd php7.2-curl php7.2-mbstring php7.2-mysql mysql-server
sudo apt set up apache2

After the set up completes, go to your server ip tackle in internet browser. If you’re organising Nextcloud in your native server, go to localhost or

It’s best to see the next web page –

Apache server running on Ubuntu server
Apache server operating on Ubuntu server

If you don’t see the above web page, examine that apache server operating standing.

sudo service apache2 standing

It’s best to have the next output in terminal –

Apache running status
Apache operating standing

As you may see above, the apache is energetic. In case you see it inactive, it means the apache service isn’t operating. Begin apache utilizing the next command –

sudo service apache2 begin

In case you nonetheless don’t see the Ubuntu apache web page, just be sure you’ve adopted all of the above steps accurately.

Setup apache configuration file for Nextcloud.

sudo nano /and many others/apache2/apache2.conf

Change the next traces –

        Choices Indexes FollowSymLinks
        AllowOverride None
        Require all granted


        Choices Indexes FollowSymLinks
        AllowOverride All
        Require all granted

Create Mysql consumer and database for Nextcloud

Login to mysql cli –

sudo mysql

It would log you into your mysql root account. The following we have to create a brand new consumer account & database and grant consumer all privileges over the database.

CREATE USER 'sohail'@'localhost' IDENTIFIED BY 'some_pass';

CREATE database nextcloud;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'sohail'@'localhost';

Set up Nextcloud

There are a number of methods we will set up & setup Nextcloud on our server however the best is utilizing the online installer. Nextcloud group has constructed a straightforward to make use of internet installer to put in and setup the service simply.

All we have to do is obtain the online installer and run the setup from internet browser.

Obtain internet installer utilizing wget and transfer it in /var/www/html listing.

wget && sudo mv setup-nextcloud.php /var/www/html

Make the apache server personal the server listing to keep away from any permission associated points.

sudo chown -R www-data /var/www/html
Download Nextcloud web installer
Obtain Nextcloud internet installer

To begin the setup, open the online setup in internet browser.


My server ip is -

If you're organising in your native server, go to localhost/setup-nextcloud.php or

The setup web page will open. Now you can simply comply with the on-screen directions to setup Nextcloud. However don’t fear, I may also information you thru the whole setup.

Click on subsequent to examine all of the dependencies.

Nextcloud web installer
Nextcloud internet installer
Nextcloud install directory
Nextcloud set up listing

If you wish to set up Nextcloud in a sub-directory, then you may enter the listing title right here in any other case enter ‘.’ (with out quotes) to put in it within the root listing.

Nextcloud installation completed
Nextcloud set up accomplished
Create Nextcloud admin account & setup Database & storage
Create Nextcloud admin account & setup Database & storage

As you may see I’ve used mysql database credentials I created above. Lastly click on ‘Finish setup’ button. And that’s all.

If the whole lot setup accurately, you may be redirected to Nextcloud primary web page.

Nextcloud storage
Nextcloud storage

As you may see the interface is similar to Dropbox and Google drive. The one distinction is that the information you retailer right here isn’t going for use by anybody else. It’s your records and you’ll management it.

As your cloud storage has an increasing number of customers, you may develop your server dimension simply on Digitalocean.


So this was the essential setup of Nextcloud, a free and open supply cloud platform. I will probably be protecting extra articles on making Nextcloud extra helpful.

When you have any query concerning any step described above, don’t hesitate asking it within the remark part under.

Leave a Reply

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