One of the most popular solutions to create a private cloud is found in Nextcloud, but recently saw the light version 16. This version comes loaded with important news, so in this post, we will show you how to install Nextcloud 16 in Debian 9.
Many companies are concerned about the security of their data, this is vital to maintain and safeguard the health of the company. Fortunately, solutions are available for it, as Nextcloud. With Nextcloud you can build your own professional and extensible cloud thanks to numerous plugins. It is one of the best-known applications within Linux for its extension, practicality, and ease of use.
On the other hand, Debian 9 is at its best and is a highly recommended option to install a Nextcloud server.
So, let us start.
1. Install Apache web server + PHP
To install correctly, a web server is required. In this case we will choose Apache because it is the most common and simple to use.
So, open a terminal or connect to your VPS using SSH and type:
:~$ su :~# apt install apache2
By default, Debian starts and enables the service so it should already be running. On the other hand, it is also necessary to install PHP and some of its modules. Debian has older versions of PHP in its repositories so let’s upgrade to PHP 7.3. So, add the repository.
:~# wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add - :~# echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/ondrej.list :~# apt install apt-transport-https :~# apt update
Then, install PHP 7.3.
:~# apt install libapache2-mod-php php7.3 php7.3-xml php7.3-curl php7.3-gd php7.3 php7.3-cgi php7.3-cli php7.3-zip php7.3-mysql php7.3-mbstring
Next, it is necessary to modify some of the PHP options. To do this edit the configuration file.
:~# nano /etc/php/7.3/apache2/php.ini
And make the following changes:
memory_limit = 512M upload_max_filesize = 200M max_execution_time = 360 post_max_size = 200M
Do not forget, also edit your timezome. You can use CTRL + W to find the options quickly.
Finally, restart Apache to enable the PHP support.
:~# systemctl restart apache2
NOTE: If you are using a firewall, remember to enable ports 80 and 443 for Apache to work properly.
2. Install and configure MariaDB
The next step to install Nextcloud 16 on Debian 9 is to install and configure MariaDB.
Nextclooud 16 needs a powerful database manager to store the generated data. It is compatible with several, but MariaDB is in the Debian repositories and is MySQL compatible. So we will install this one.
:~# apt install mariadb-server
Next, you need to set the root password and other things. So, run the following:
As you can see in the image, after defining the root password, you will be asked other questions about the configuration of MariaDB. For this post the answers are irrelevant, but we will answer like this: Y, N, Y, Y.
Then, create a new user and database for Nextcloud 16.
:~# mysql -u root -p CREATE DATABASE nextcloud; GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextuser'@'localhost' IDENTIFIED BY 'nextpss'; FLUSH PRIVILEGES; exit;
Now,we can install Nextcloud 16 on Debian 9.
3. Install Nextcloud 16 on Debian 9
Now, we can download it using wget and unzip to decompress it. Install these packages first.
:~# apt install unzip
Next, download it.
:~# cd /opt/ :~# wget https://download.nextcloud.com/server/releases/nextcloud-16.0.0.zip
After that, decompress it.
:~# unzip nextcloud-16.0.0.zip
Then, move it to the
/var/www/html/ directory and changes the permissions.
:~# mv nextcloud/ /var/www/html/ :~# chown -R www-data:www-data /var/www/html/nextcloud/ :~# chmod -R 755 /var/www/html/nextcloud/
Now, you can open your web browser and complete the installation using the Nextcloud 16 web interface. Go to
http://SERVER_IP/nextcloud and set the required information. For example, the MariaDB credentials or creating the admin account.
Next, you will see the dashboard.
And that is it. Now, you can enjoy Nextcloud 16 on Debian 9.
Install Nextcloud 16. Conclusion
Nextcloud 16 is a good alternative to set up your own private cloud at home or for your business. It is reliable, fast, secure and free, which makes it ideal for small businesses.
Please share this post with your friends.