25 C
Senior Writer and partner

How to install Owncloud on Debian 10?

In this post, You will learn how to install Owncloud on Debian 10.

Many users and small businesses prefer to invest in infrastructure that allows them to have their private cloud. At the software level, owncloud is emerging as the most important solution in this matter.

OwnCloud is a software that allows us to create a private cloud with which you can synchronize files, calendars, contacts, notes and more using extensions. It’s free, open-source and has an application for Android, iOS and desktop clients for Linux, Windows and Mac OS X.

So, let us install it.

Install Owncloud on Debian 10

1.- Install a LAMP server

- Advertisement -

Owncloud is a web application that is installed on the server. But being a web application, it requires a server that has the tools to deploy this type of applications. Besides, it requires a relational database manager such as MariaDB or PostgreSQL. So you have to install a LAMP server.

To install a LAMP server, we have a post about it.

How to install LAMP on Debian 10?

However, you must also have installed certain PHP modules such as:

libapache2-mod-php7.3 openssl php-imagick php7.3-common php7.3-curl php7.3-gd php7.3-imap php7.3-intl php7.3-json php7. 3-ldap php7.3-mbstring php7.3-mysql php7.3-pgsql php-smbclient php-ssh2 php7.3-sqlite3 php7.3-xml php7.3-zip

Once the installation is complete, you can continue with the tutorial.

2.- Creating a new database for Owncloud

It is recommended not to use the root user for database connections in Owncloud or any other application. So we’ll take the opportunity to create a new MariaDB user.

On the other hand, Owncloud requires a dedicated database for it. So we’ll do these two things:

:~$ sudo mysql -u root -p
> CREATE DATABASE ownclouddb;
> GRANT ALL ON ownclouddb.* to 'ownclouduser'@'localhost' IDENTIFIED BY 'owncloudpss';
> exit;
1.- New user and database for Owncloud
1.- New user and database for Owncloud

Remember that you can change the database name, username and password to whatever you want.

When you leave the MariaDB console you can continue with the tutorial.

3.-Download and install Owncloud on Debian 10

Now it’s time to download and install Owncloud. To do this, I will use the wget command.

:~$ cd /tmp/
:~$ wget -c https://download.owncloud.org/community/owncloud-10.4.0.tar.bz2
--2020-03-17 17:31:42-- https://download.owncloud.org/community/owncloud-10.4.0.tar.bz2
Resolving download.owncloud.org (download.owncloud.org)..., 2a01:4f8:1c0c:8147::
Connecting to download.owncloud.org (download.owncloud.org)||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20426453 (19M) [application/x-bzip2]
Saving to: ‘owncloud-10.4.0.tar.bz2’

At the time of writing this post, the latest stable version of Owncloud is 10.4.0. Remember to check and modify the command.

When the download is finished, unzip the file.

:~$ tar xjfv /tmp/owncloud-10.4.0.tar.bz2

Then, move it to the Apache root folder in Debian. Then change the owner of that folder to www-data and finally assign the correct permissions so that Owncloud can run without problems.

:~$ sudo mv owncloud /var/www/html/
:~$ sudo chown -R www-data:www-data /var/www/html/owncloud
:~$ sudo chmod -R 755 /var/www/html/owncloud
2.- Installing Owncloud on Debian 10
2.- Installing Owncloud on Debian 10

4.- Create a new Virtualhost for Owncloud

Owncloud is already available in our system, but it is necessary to create a new Apache virtualhost to process it perfectly.

So, create a new text file with the following information:

:~$ sudo nano /etc/apache2/sites-available/owncloud.conf
<VirtualHost *:80>
ServerAdmin admin@your_domain.com
DocumentRoot /var/www/html/owncloud
ServerName your-domain.com
<Directory /var/www/html/owncloud>
Options FollowSymlinks
AllowOverride All
Require all granted
ErrorLog ${APACHE_LOG_DIR}/your-domain.com_error.log
CustomLog ${APACHE_LOG_DIR}/your-domain.com_access.log combined
3.- New virtualhost for Owncloud
3.- New virtualhost for Owncloud

Do not forget to replace “your-domain” with yours. Whether it’s on a local server or a test server.

Then, enable the new virtualhost by copying it to the Apache Virtualhosts directory, enabling the Apache rewrite module and finally restarting the Apache service.

:~$ sudo ln -s /etc/apache2/sites-available/owncloud.conf /etc/apache2/sites-enabled/owncloud.conf
:~$ sudo a2enmod rewrite
:~$ sudo systemctl restart apache2

Now complete the installation using the Owncloud web interface.

5.- Install Owncloud on Debian 10 using the web interface

Now go to your favorite web browser http://your-domain and you will see the following:

4.- Owncloud installation
4.- Owncloud installation

This indicates that only the installation of Owncloud remains to be completed. First, you have to create the administrator account along with the password.

Then, on that same screen, configure the database by typing the credentials previously created.

5.- Databases credentials for Owncloud
5.- Databases credentials for Owncloud

Then, complete the installation as normal.

If everything went well, you will see the login screen where you will have to enter your newly created credentials.

6.- Owncloud log in screen
6.- Owncloud log in screen

Once you have logged in, you will see the dashboard with and Owncloud will be ready to use.

7.- Owncloud on Debian 10
7.- Owncloud on Debian 10

Now, you can install the clients for Android and iOS.

So, enjoy it.


Due to many problems with the privacy of data is that many companies are choosing to create their servers with a lot of vital information. This means that the data is never in the hands of third parties and can be managed privately.

To make a project like this, you need an application as high as the Owncloud application that you have learned to install in Debian 10.

Please share this post and join our Telegram channel.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
"The best Linux newsletter on the web"


Please enter your comment!
Please enter your name here

Latest article