ownCloud is a free, open-source self-hosted file synchronization and sharing application that allows users to securely access and share their data from anywhere. In this article, we will explain how to install and configure ownCloud on a system running the Debian 10 operating system.
Before we begin, there are a few prerequisites that need to be met. First, you must have a system running Debian 10, and it should be connected to the internet. You will also need to have administrative privileges on the system, as the installation process requires access to the root user account or a user account with sudo privileges.
To start, let’s update the package manager index and upgrade any existing packages to their latest versions. This is important because it ensures that we have the latest security patches and bug fixes, as well as the latest versions of the packages we will be installing. Run the following command to update the package manager index:
sudo apt update
Next, run the following command to upgrade any existing packages to their latest versions:
sudo apt upgrade
Once the package manager index has been updated and any existing packages have been upgraded, we can proceed with the installation of ownCloud. To do this, we will use the apt package manager.
First, run the following command to install the Apache web server, which ownCloud will be running on:
sudo apt install apache2
Next, we will need to install the PHP programming language and the required PHP modules for ownCloud. Run the following command to do this:
sudo apt install php7.3 libapache2-mod-php7.3 php7.3-common php7.3-curl php7.3-gd php7.3-json php7.3-mbstring php7.3-mysql php7.3-zip
Now that the Apache web server and PHP are installed, we can download and install the ownCloud package. To do this, run the following commands:
wget <https://download.owncloud.org/community/owncloud-10.0.9.tar.bz2>
tar xjf owncloud-10.0.9.tar.bz2
sudo mv owncloud /var/www/html/owncloud
This will open the file in the nano text editor. From here, you can paste the following configuration settings into the file, which will configure the Apache web server to serve ownCloud:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/owncloud
ServerName example.com
ServerAlias www.example.com
<Directory /var/www/html/owncloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/html/owncloud
SetEnv HTTP_HOME /var/www/html/owncloud
</Directory>
</VirtualHost>
Be sure to replace “example.com
” with your own domain name, and “admin@example.com” with your own email address.
Once you have finished editing the ownCloud Apache configuration file, save your changes and exit the text editor. Then, run the following commands to enable the ownCloud Apache configuration and disable the default Apache configuration:
sudo a2ensite owncloud
sudo a2dissite 000-default
Next, we need to enable the Apache modules required by ownCloud. Run the following commands to do this:
sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod env
sudo a2enmod dir
sudo a2enmod mime
Finally, restart the Apache web server to apply the changes:
sudo systemctl restart apache2
Now that the Apache web server is configured to serve ownCloud, you can access the ownCloud installation wizard by visiting your domain name in a web browser. For example, if your domain name is “example.com
“, you would visit “http://example.com” in your web browser.
The ownCloud installation wizard will guide you through the process of setting up your ownCloud instance. This includes creating a new administrator account, setting the database connection details, and configuring any additional options.
Once the ownCloud installation is complete, you can log in to your ownCloud instance using the administrator account you created. From here, you can start using ownCloud to store and share your files securely.
That’s it! You have successfully installed and configured ownCloud on your system running Debian 10. You can now use ownCloud to securely access and share your files from anywhere.