Nextcloud Ubuntu server 16.05-4

3rd party companies manage today your personal information, whether they are truly personal doubtful.

However, there are people in the 3rd party companies that act as administrator and thus have access to this data.

will be this way all your data itself ran, What is important to know that the data is stored in your home, with this you must provide enough storage capacity. You are responsible for your own data including security.

Keep the data within your own network, this is not a problem, once a forwarding to the outside so you can then download your files up -and it is necessary to point your security.

What's next cloud


Next Cloud files are stored in conventional directory structure and can be accessed through WebDAV if necessary.

WebDAV is a protocol on the internet that is an extension of the HTTP protocol. The abbreviation stands for Web-based Distributed Authoring and Versioning, which loosely translated representing web-based and distributed authorship with version.

User files are encrypted in transit and can be encrypted at rest (encoding is to be switched on). Next Cloud can synchronize with local clients in Windows (Windows XP, View, 7 in 8), OS X (10.6 of later) or various Linux distributions.

Next Cloud users can calendars (CalDAV), contacts (CardDAV), scheduled tasks and streaming media (Ampache) from managing the platform.

From the perspective of state administration Next Cloud users- and manage group (via OpenID of LDAP). Content can be shared by detailed reading- and write permissions between users and / or define groups. Alternatively Next Cloud users create public URLs to share files. The log file related actions and not allowing access based on rules for file access is also available.

Moreover, users can communicate from Next Cloud with the browser-based text editor, bookmark service, URL verkortingspakket, gallery, RSS feed reader and document viewer tool. Next Cloud can be extended for additional expandability with “one-click” -applications and connect to Dropbox, Google Drive an Amazon S3.

Next Cloud introduces new features such as monitoring capabilities, full-text search and Kerberos authentication, and audio / video-conferencing, wide federation and minor UI improvements.


1. Installing Apache


To use next cloud, we must first install an apache server and configure, Apache HTTP Server is an open source web server for Windows, macOS, Linux and other Unix-like operating systems.

Furthermore, we need for our maria DB MySQL.

MySQL is a proprietary open source relational database management system (RDBMS). SQL is the language used to build a database system, questioning and maintain. MySQL was first used mainly for Internet applications such as forums and guest books, usually in combination with PHP. MySQL is the basis of many internet applications and standalone software.

PHP (PHP: Hypertext Preprocessor) is a scripting language, which is designed to create dynamic web pages on web servers.

Each new version of PHP offers several features and improvements over its predecessor. Sometimes the difference between versions minimal (such as between PHP 5.5 a PHP 5.6) and sometimes so much has changed that it has much impact on the way your site / shop (PHP 7 differs enormous compared to PHP 5.x versions).

Newer PHP versions are also supported by PHP longer than old versions. For old versions are no more security updates released over time. Therefore, always move as quickly as possible in the most recent possible version of PHP.

pay attention! PHP 5.5 received since 10 July 2016 no more security updates. It is still available but not recommended best PHP 5.6 of PHP 7.

We just go this up without going into too much detail, more here wants to know there are plenty of tutorials online.

1.1 Installing apache / MariaDB and PHP and its associated packages


To start you open a terminal in Ubuntu and we will refresh the repositories, Freely translated the data repositories.

#sudo apt-get update

#sudo apt-get upgrade

1.1.0 First install apche2, mariaDB en PHP:

In terminal:

# sudo apt-get install apache2 mariadb-server

Start apache server:

#systemctl start apache2
# systemctl enable apache2
# systemctl start mysql
# systemctl enable mysql

install PHP:

# sudo apt-get install php7.0-xml php7.0 php7.0-cgi php7.0-cli php7.0-gd php7.0-curl php7.0-zip php7.0-mysql php7.0-mbstring wget unzip

After installation, you can just type the following command: #php sudo -v

1.1.1Configuring mariaDB


By default, the installation of our mysql server is not safe with the following commands we will safely steal.

In terminal:

# sudo mysql_secure_installation

The following questions must be answered:


Enter current password for root (enter for none): just click enter

Set root password? [Y / N] : click n

Change the root password? [Y / N] n

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

Once mariaDB safe we ​​log into the console with the following command:

# sudo mysql -u root -p

Enter your password and we can continue to create the database.

MariaDB [(none)]>CREATE DATABASE nextclouddb;

Then a user and password:

MariaDB [(none)]>CREATE USER ‘nextcloud’@’localhost’ IDENTIFIED BY ‘password’;

next cloud is user and password is the password.

The following rights:

MariaDB [(none)]>GRANT ALL PRIVILEGES ON nextclouddb.* TO ‘nextcloud’@’localhost’;


MariaDB [(none)]>\q

Our database is properly designed and can continue to install next Cloud.


1. Installation next cloud


The installation of next cloud is quite simple, First we go to the html directory of our server, this can be done by entering the next command in the terminal: # cd / var / www / html

Now we can continue with the following command to install the latest version from next Cloud on our server.

Copy and paste the following command in terminal:

# sudo wget

# sudo unzip

If you just installed check under the current directory /var / www / html with the command ls-l or the next cloud folder exists, then enter this command from right to convert our rights.

In terminal:

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

Your terminal should look as follows:

1.1 Creating virtual host


If you have Apache installed on your server this standard one directory where all website files, namely /var / www. This is not a desirable situation if you want to run more than one website on your server. In this way, run multiple Web sites on the Web, This involves using so-called Virtual Hosts.

In terminal:

# sudo nano /etc/apache2/sites-available/nextcloud.conf

Copy the ihier and change the server name to the IP address of your server.

<VirtualHost *:80>


DocumentRoot “/var/www/html/nextcloud”


<Directory />

Options FollowSymLinks

AllowOverride All

<Directory “/var/www/html/nextcloud/”>

Options MultiViews FollowSymlinks
AllowOverride All

Order allow,deny

Allow from all


TransferLog /var/log/apache2/nextcloud_access.log

ErrorLog /var/log/apache2/nextcloud_error.log




Save the configuration file: Click ctrl enter the and click ctrl X

Then we have to turn it just created virtual host configuration file and turn on the standard file:

In terminal:

# sudo a2dissite 000-default

# sudo a2ensite nextcloud

Finally we restart the Apache web server # sudo systemctl restart apache2

if you go to the IP address into a browser, the server enters the login screen next cloud, in my case this is

You create an account here: admin with a password of your choice

Furthermore, enter the data from the server ( created during mysql ) Finish setup.












One comment

Leave a Reply

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