Install Nextcloud on Debian 10

0
137

Today, many companies do not rely on the most popular cloud hosting services. This is due to the sensitivity of the stored data as well as the security scandals of the data. For this reason, it is more and more common to find large or medium-sized companies that prefer to use software that allows the removal of a private cloud. Whether for an intranet or more common for Internet service. That is to say, the administration depends exclusively on the company. Of these programs, Nextcloud stands out. With this in mind, this post will help you install Nextcloud on Debian 10. This way you will be able to use a private cloud yourself.

Nextcloud on Debian 10: a great solution for privates clouds

There are many data storage services in clouds. Technological giants like Apple, Google and Microsoft have them. However, there are people or companies that want to have absolute control of their own data. Nextcloud is there for that.

Nextcloud is an open-source web application that allows us to create our own private cloud. It was created with the primary objective that it is the user who has absolute control of the files.

Many companies install Nextcloud on their servers to create their private clouds. This way they can rely on their own data management. It is even of great help in educational or personal projects.

Today, you will learn how to install it on Debian 10.

Install Nextcloud on Debian 10

1) Install LAMP on Debian 10

Nextcloud is a web application created in PHP. In addition to this, it uses a database manager to round off its operation. That is, the first requirement is to install a LAMP server on Debian 10.

For it, you will not have problems because we have created two tutorials for you.

Read How to install Debian 10 Buster?

And,

How to install LAMP on Debian 10 Buster?

Now, in the PHP section, you have to install the following modules.

php7.3 libapache2-mod-php7.3 php7.3-mysql php7.3-intl php7.3-curl php7.3-json php7.3-gd php7.3-xml php7.3-mb php7.3-zip

2) Working with MariaDB

MariaDB is a relational database manager that uses the SQL language. It is one of the most popular that there is and Nextcloud uses it to store data needed for the application.

As a good practice, it is recommended to create a new user dedicated to Nextcloud. Also, create the database you will use. To do this, go to the MariaDB console and type the following commands:

:~$ sudo mysql -u root -p
> CREATE DATABASE nextcloud;
> GRANT ALL PRIVELEGES ON nextcloud.* TO 'nextclouduser'@'localhost' IDENTIFIED BY 'nextcloudpss';
> FLUSH PRIVILEGES;
> exit;
1.- Creating the new user and database for Nextcloud
1.- Creating the new user and database for Nextcloud

3) Download and install Nextcloud on Debian 10

After meeting the prerequisites, we can start the download of Nextcloud and its subsequent installation. However, first, make sure you have installed wget and unzip.

:~$ sudo apt install wget unzip

Then, download Nextcloud:

:~$ cd /tmp/
:~$ wget -c https://download.nextcloud.com/server/releases/nextcloud-16.0.3.zip
2.- Download and install Nextcloud on Debian 10
2.- Download and install Nextcloud on Debian 10

Now, you can extract the file. Next, move it to /var/www/html and set the right permission to the folder.

:~$ unzip nextcloud-16.0.3.zip
:~$ sudo mv nextcloud /var/www/html/
:~$ sudo chown 755 -R www-data:www-data /var/www/html/
:~$ sudo chmod 755 -R /var/www/html/

The next step is to create a new virtual host for Nextcloud. This will allow the use of some PHP modules as well as being able to invoke it from a DNS name.

:~$ sudo nano /etc/apache2/sites-available/nextcloud.conf

And add the following:

 <VirtualHost *:80>
     ServerAdmin admin@your_domain.com
      DocumentRoot /var/www/html/nextcloud
     ServerName your-domain.com

     <Directory /var/www/html/nextcloud>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/your-domain.com_error.log
     CustomLog ${APACHE_LOG_DIR}/your-domain.com_access.log combined

</VirtualHost>
3.- Creating a new virtualhost for Nextcloud
3.- Creating a new virtual host for Nextcloud

Replace “your-domain” by yours. Save the changes and close the file.

To enable this new virtual host, run the following commands:

:~$ sudo ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf
:~$ sudo a2enmod rewrite
:~$ sudo systemctl restart apache2
4.- Enabling the new virtualhost
4.- Enabling the new virtual host

Now, complete the installation.

4) Install Nextcloud on Debian 10 (II)

So, open your web browser and go to your server. You will see this

5.- Nextcloud on Debian 10
5.- Nextcloud on Debian 10

On that screen, you can create the administrator account. If you scroll down, you can write the parameters of the database.

6.- Installing Nextcloud using the web interface
6.- Installing Nextcloud using the web interface

Then, the installer will start the installation. After that, you will see the folllowing screens.

7.- Nextcloud welcome screen
7.- Nextcloud welcome screen
8.- Nextcloud working
8.- Nextcloud working

So, Nextcloud is running properly. Enjoy it.

Conclusion

Nextcloud is a very useful tool for small and medium businesses that want to create a private cloud quickly and securely. A secure operating system such as Debian 10 Buster is also required.

Please share this psot and join our Telegram channel.

LEAVE A REPLY

Please enter your comment!
Please enter your name here