How to install Owncloud server on Windows 10 (WSL)

- Advertisment -
- Advertisement -

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 those 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 Owncloud server on Windows 10 nor 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 Linux App

From Windows 10 search box or from program list search for Microsoft store. When the store opened, search for Ubuntu 18 to download and install. After installing click on the Launch button which in return open the Ubuntu bash or command screen from where we can use all Ubuntu commands except 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 basically 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
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 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 via Repository on Command Line

We can download the Owncloud archive directly from its website but here we are using the command line, so it makes sense if we use the same for Owncloud server files downloading.

sudo -i

wget -nv
Release.key -O Release.key

apt-key add - < Release.key

echo 'deb
/production/Ubuntu_18.04/ /' > /etc/apt/sources.list.d/owncloud.list

apt-get update

apt-get install owncloud-files

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:

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

Step 7: Create a symlink for Owncloud

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.

a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime
a2enmod 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 a name owncloud you can use some other name if you want.


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

GRANT ALL ON owncloud.* to 'h2smedia'@'localhost' IDENTIFIED BY 'enter_your_password';

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/ 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 the Apache one.

Create an admin account for Windows 10 install own cloud. 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; 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 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 few seconds to authenticate all provided details and then will offer you a login page.

Login it with the admin account you have created above.

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

The first screen that appears to you dedicated for 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:

Rajkumar Maurya
Rajkumar Maurya is the H2S Media tech expert. He’s always been passionate about technology and has been writing on the subject since 2014. He has extensive knowledge of all kinds of technology, from consumer-tech to enterprise solutions. You can contact the author at--


  1. Hi,

    First of all thanks a lot for your article “How to install Owncloud server on Windows 10 (WSL)”. It is really appreciated.

    However I am having difficulties on installing Apache, MySql/ MariaDB plus PHP. Everytime I run the command line in ubuntu I get the following errors:

    Package php-imagick is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    Package php-smbclient is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    Package php-ssh2 is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    Do you know how I can fix this and find these packaged?

    Thank you.

    Best Regards

    • We have updated the article now you can use the commands mentioned to install LAMP on Windows WSL for OWncloud…

  2. Hey Rajkumar, thanks a LOT for this tutorial. I had to tell you this is one of the VERY few Linux howtos/tutorials that work exactly as described on the first try.

  3. Sorry man this does not work. I have used it step for step on Windows 10 Pro and for some reason I just can’t get it to work, I had tried it the first time, reinstalled windows and tried it again the second time and nothing works unfortunately. even get errors when running apache2

  4. Thank you very much for the instructions. Tell me how to move the storage location to another local drive, for example D.

  5. Thanks in advance for any reply!
    I’m having a problem. I can’t access to the rootfs folder. Can’t grant full access to my WSL user either.
    I think that is keeping from apache to read owncloud’s conf file and running the web gui.
    Thank you

    • If you have sudo access then this should be a problem but as you said it is, so please try to reset the WSL distro you are using. And again install Owncloud.

      • Thank you for the reply!
        Already did that. I did a reset and I unregistered it too. I’m doing it from windows server 2019 standard. I’m not using powershell. Done everything from the WSL shell.


Please enter your comment!
Please enter your name here

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

Latest Posts

How to open Windows PowerShell in a specific location of explorer

We hardly like dealing with the Command-line interface or CLI on Windows, but it becomes inevitable at...

All about the EROFS file system for Linux file system by Huawei

When it comes to storage technologies, the reliability of storing data digitally is improving day by day,...

How to convert Word document to JPEG online on all platforms

After you have finished preparing some documents using Microsoft Word, the program of choice for most users,...

IT Industry experts weigh in on International Data Privacy Day

Data Privacy Day aims to raise awareness and promote privacy and data protection best practices and is observed in...
- Advertisement -

Stellar Announces New Version of Bitraser on Data Privacy Day

BitRaser Data Erasure software helps companies safely reuse old IT assets & mitigate risk of data breach. On the occasion...

Portronics introduces POWER BUN, a Universal USB Charging Hub

As per the recent press release public by the Portronics, the company has launched a new product that is...

- Advertisment -
- Advertisement -

You might also likeRELATED
Recommended to you