How to install Owncloud server on Windows 10 (WSL)

The OwnCloud server is an open-source cloud storage solution with multimedia playing and file-sharing capabilities.  It can be installed on Linux platforms without any problem and it has to be for proper performance and stability. However, the users who are much familiar with Windows operating system install the Owncloud server using Windows’s IIS web server or third-party software like XAMMP or WAMP servers. But in this tutorial, we are not going to use any of them to install the Owncloud server on Windows 10 or any kind of virtual machine software like Virtualbox/Vmware. Instead of the traditional method, we use the Windows subsystem for Linux (WSL) for better stability and performance. The Linux environment app which we will use for it is Ubuntu.  Let’s see how to do this. The latest version of the OwnCloud while this tutorial was Owncloud 10.1.0.

Install Owncloud Server on Windows 10 via Ubuntu

Step 1: Enable the Windows subsystem for Linux (WSL)

To enable the Windows subsystem for Linux feature on Windows 10, go to Search box type “Turn Windows feature on or off” click on that as it appears and enables the WSL (Windows Subsystem for Linux) feature: For more info on this see: Enable the Windows subsystem for Linux feature

Enable the Windows subsystem for Linux (WSL)

Step 2: Install Ubuntu 18.04/20.04 Linux App

From Windows 10 search box or the program list search for the Microsoft store. When the store opened, search for Ubuntu 18 to download and install. After installing click on the Launch button which in return opens the Ubuntu bash or command screen from where we can use all Ubuntu commands except a few directly on Windows 10.

Microsoft store Ubuntu 18.04 app

Step 3: Install Apache, MySql/ MariaDB plus PHP on Windows 10

Before installing the Owncloud 10.1.0. we need to set up a web server environment a LAMP setup. Here is the command which we need to execute for installing Apache+PHP+MariaDB. Copy and paste the below one using the right mouse click and then hit the enter button.

sudo apt-get install apache2  
sudo apt-get install mysql-server mysql-client
sudo apt-get install php libapache2-mod-php php-mysql php-gd php-json php-curl php-xml php-zip php.mb
sudo apt-get -y install libmcrypt-dev

Owncloud also needs one more PHP extension i.e intl extension, so install that too.

sudo apt-get install php-intl

Step 4: Check your Windows 10 Apache installation

To check whether our Apache server is working, go to your  Windows 10 browser and type http://localhost/ or or the IP address of your Windows 10 local machine.  You can find out the IP address by typing ifconfig. As you enter the IP address, the Apache testing page will open which means everything is fine and time to move to the next step.

Apache server for owncloud on Windows 10

Step 5: Download Owncloud server  

Here is the command to get the files required for setting up OwnCloud:

sudo apt install wget unzip
sudo mv owncloud/ /var/www/
sudo chown -R www-data:www-data /var/www/owncloud/

The above commands will automatically download and extract the Owncloud files under the Apache directory.

Step 6: Create an Owncloud configuration file for Apache

Now create an Owncloud configuration file using the below command:

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

And then add the following lines in it to points the Apache root directory towards the Owncloud.

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

<Directory /var/www/owncloud/>
Options +FollowSymlinks
AllowOverride All

<IfModule mod_dav.c>
Dav off

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


After adding the above lines press Crtl +O to write the files and then CTRL+X to save and exit.

Create an Owncloud configuration file for Apache

To tell the Apache about the Owncloud configuration we will create a reference or symlink using the below command:

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

Step 8: Additional modules installation

Add these additional modules for proper Owncloud working.

sudo a2enmod headers env dir mime unique_id

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

sudo service apache2 restart

Step 9: Create a MySQL or MariaDB database for Owncloud

First of all stop and restart the MySQL/MariaDB:

sudo /etc/init.d/mysql stop

sudo /etc/init.d/mysql start

Now let’s create a MySQL user and database for OwnCloud:

sudo mysql

We are creating a database with the name owncloud you can use some other name if you want.


Now create a user with a password and at the same time assign all rights of the above-created database to that. Here we are creating a user with the name h2smedia along with a password for the same. You can use your username and password:

CREATE USER 'h2smedia'@'localhost' IDENTIFIED WITH mysql_native_password BY 'my-strong-password-here';

Flush privileges operations:


Exit the MySQL using the command:

Create a MySQL or MariaDB database for Owncloud

Step 4 –Install, Setup, and Configuring ownCloud server on Windows 10

After performing all the above steps again go to the browser and type  http://localhost/owncloud/ or  or the IP address of your Windows 10 local machine. Just like we did while checking the Apache is working or not above in this article.

However, this time you will see the Owncloud server setup and configuration screen rather than the Apache one.

Create an admin account for Windows 10 installed Owncloud. Just enter whatever user name along with a password for the same you want to assign Admin account.

Just after the admin account, you will see a storage and database option click on that and then MySQL/MariaDB tab. After that add the MySQL database details we have created above; which means database username its password and the database name which is owncloud in our case.

Finally, once you provided all the information to Owncloud, scroll down and click on the Finish Setup button.

setup owncloud server on Windows 10

Step 5: Login Owncloud server

The moment you click on the Finish setup button, the Owncloud will take a few seconds to authenticate all provided details and then will offer you a login page.

Login with the admin account you have created above.

As we know Owncloud also offers a client application that one can use on different operating systems to sync the files between PC/smartphone and Owncloud server.

The first screen that appears to you is dedicated to the same. Click on the one OS platform for you want to download the Owncloud client.

Get the apps to syn files on Owncloud to Windwos 10
Install Owncloud Server on Windows 10 via Ubuntu WSL

In this way, we can easily install the Owncloud server on Windows 10 for high performance and stability without using any XAMMP or WAMP-like software.

If you have found any difficulty while installing Windows 10 OwnCloud server, let us know, we will try to solve the same as soon as we could.

Other useful resources:


Comments (22)

  1. Michael May 17, 2019
  2. Joao June 8, 2019
    • H2S Media Team June 12, 2019
  3. Enrique June 14, 2019
    • H2S Media Team June 16, 2019
  4. JD July 2, 2019
  5. skala July 29, 2019
  6. Alex Silva August 9, 2019
    • H2S Media Team August 11, 2019
      • Alex Silva August 11, 2019
  7. Szymon April 24, 2020
  8. Koos April 21, 2021
    • H2S Media Team April 23, 2021
  9. imane July 14, 2021
  10. imane July 14, 2021
  11. Steen Palm August 10, 2021
  12. Steen Palm August 10, 2021
  13. jjijimkn jinin mnk September 7, 2021
  14. Hen January 24, 2022
    • H2S Media Team January 26, 2022
  15. Ern March 23, 2022
    • H2S Media Team March 24, 2022

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.