27 C
Texas

Installing Owncloud Server on Windows 10 step by step.

Hi. How are you? There are currently a lot of services on the market that offer cloud storage. Some of them are very popular, like Drive, OneDrive and others. However, something that has always been criticized for these applications, is the possible violation of personal data. Moreover, there are also programs for synchronizing files between our computer and a server. Some of them are Nextcloud and Owncloud, and just about this last one we are going to talk about in this tutorial. Let’s explain how to install this server in Windows 10 step by step.

The first thing we need to know is that the owncloud server is only available for Linux operating systems. For that reason, there are no installers for our favorite operating system. However, this does not mean that we cannot install it via Xammp or Wampp. Or using a virtual machine with Hyper V. But this time we are going to install and configure it through the Windows subsystem for Linux (WSL) for better stability and performance. Specifically, the working environment to use will be Ubuntu 18.04 LTS, which we can download from the Windows store. So let’s go for it.

Prerequisites.

For stability effects, it is highly recommended to set the IP address as static. In the same way, we have to enable Windows Subsystem for Linux. If you do not know how to do that, please visit our article about it.

Enabling Windows Subsystem for Linux
Enabling Windows Subsystem for Linux

Once this is done, the system will ask to restart. Next, we go to the windows store and download Ubuntu 18.04 LTS

Downloading Ubuntu 18.04 LTS
Downloading Ubuntu 18.04 LTS
- Advertisement -

Once it has downloaded, we launch it and wait for the installation process to begin. We must assign a username and password. Now, let’s get to work!

Configuring Ubuntu
Configuring Ubuntu

Step 1. Install Apache.

From this moment on, the whole installation will be done by means of commands. Don’t worry if you don’t feel comfortable, you just have to copy textually the commands that we will indicate. In order to install Apache you just type in Ubuntu:

 sudo apt-get install apache2  

Enter your password and then yes, enter your password and then yes to start and confirm the installation. To ensure the effective functioning of Owncloud, we need to enable the following Apache modules.

sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod env
sudo a2enmod dir
sudo a2enmod mime 
Adding additional modules for Apache
Adding additional modules for Apache

After adding the modules restart the Apache server using the command:

 sudo service apache2 restart 
Restarting Apache server
Restarting Apache server

Once the service is restarted, a window with the firewall warning will appear. We need to allow access.

Allow access to Apache
Allow access to Apache

Now let’s test the functioning of apache. In addition, go to the address bar of the browser and type http://localhost/ or our IP address, in my case http://192.168.1.58/

Apache Default Page
Apache Default Page

Step 2. Install MySql.

Next, we will install the necessary software to create our database. To do this, type the following command

sudo apt-get install mysql-server mysql-client 

Step 3. Create a MySql database for Owncloud.

First, let’s stop and restart MySql.

sudo /etc/init.d/mysql stop 
sudo /etc/init.d/mysql start 

In like manner, we will create a MySql database and give it a name.

 sudo mysql 

We will create a database and give it the name we want, in my case I will use googez.

 CREATE DATABASE googez; 

At this point, we will create a username and password for our database. In this case, I will use rogerjpm as a user, and yo160882 as a password. Remember that you can use the values you want.

 GRANT ALL ON googez.* to 'rogerjpm'@'localhost' IDENTIFIED BY 'yo160882'; 

Immediately, assign flush privileges operations by typing the next command:

 FLUSH PRIVILEGES; 

Finally, exit the MySql by using the command:

exit

Step 4. Install PHP

Please note that Owncloud is compatible with PHP 7.1. Consequently, we are going to install this version, for that purpose, we will write the following commands:

sudo apt-get install software-properties-common 
sudo add-apt-repository ppa:ondrej/php 
sudo apt update 
sudo apt install php7.1 

Step 5. Download and install Owncloud on Windows 10

At this point, we must download and unzip the version of Owncloud that we are going to use. In this case 10.0.03. With this in mind, just run the commands below to download using the command line terminal. and extract Owncloud files into its root directory. Please note, if the unzip command is not installed, the system will ask you to install it.

cd /tmp && wget https://download.owncloud.org/community/owncloud-10.0.3.zip 
unzip owncloud-10.0.3.zip 
sudo mv owncloud /var/www/html/owncloud/ 

Once this is done, we have to assign the correct permissions for owncloud to work properly.

sudo chown -R www-data:www-data /var/www/html/owncloud/ 
sudo chmod -R 755 /var/www/html/owncloud/ 

Step 6. Configuring Apache by creating a file for Owncloud on Windows 10

Now let’s create a file in Apache that will control the operation of Owncloud. Now let’s create a file in Apache that will control the operation of Owncloud. For practical purposes, we will name it owncloud.conf

 sudo nano /etc/apache2/sites-available/owncloud.conf 

Add the following lines to the newly created file, place it in the root directory, press Crtl +O to write the files and then CTRL+X to save and exit

Alias /owncloud "/var/www/owncloud/"

<Directory /var/www/owncloud/>
Options +FollowSymlinks AllowOverride All
<IfModule mod_dav.c> Dav off </IfModule> 

SetEnv HOME /var/www/owncloud 
SetEnv HTTP_HOME /var/www/owncloud 

</Directory>

 

Now, once we have all the services installed, we have to create a symbolic link between Apache and owncloud. To do this, we write:

ln -s /etc/apache2/sites-available/owncloud.conf /etc/apache2/sites-enabled/owncloud.conf 

Step 7. Running Owncloud on Windows 10

To start the owncloud server, we write in the browser http://localhost/owncloud. It will open the first configuration, and we must enter our username and password for the site. Also, we must enter the username and password for the database.

Owncloud first run
Owncloud first run
Setting server parameters
Setting server parameters

Once we have completed the work, we will see a board with the files, and various configurations. And now we’re ready to share files safely.

Owncloud dashboard
Owncloud dashboard

So, now you know how to install Owncloud on Windows 10. Hope you like it.

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

2 COMMENTS

  1. Thanks for providing to how-to . I’m stuck at installing MySql. Hoping you can help? When I tried to stop the MySql, its showing “command not found”. Let me know what I did wrong. Thanks!

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article