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

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.

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 http://127.0.0.1/ 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.

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 https://download.owncloud.org/download/repositories/production/Ubuntu_18.04/ Release.key -O Release.key apt-key add - < Release.key echo 'deb http://download.owncloud.org/download/repositories /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 </IfModule> SetEnv HOME /var/www/owncloud SetEnv HTTP_HOME /var/www/owncloud </Directory>
After adding the above lines press Crtl +O to write the files and then CTRL+X to save and exit.

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.
CREATE DATABASE owncloud;
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:
FLUSH PRIVILEGES;
Exit the MySQL using the command:
exit

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 http://127.0.0.1/ 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.

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.


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:
- How to Install Ansible on Windows 10
- Use Virtualbox drag and drop from Windows 10 to Ubuntu 18 VM
- Install OBS Studio 23.0.1 on Ubuntu 18.04
- How to bridge WiFi to Ethernet adapter to share internet
- How to install Owncloud 10 on Ubuntu 16.0.4 Server
Hi
I sent you email as this does not work
Thanks
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…
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.
Cheers!
Thanks! We glad it helped you somehow…
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
Thank you very much for the instructions. Tell me how to move the storage location to another local drive, for example D.
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.
Hi,
Would you concider making a part two of this tutorial on enabling self signed SSL and how to harden apache, basically make the rig more secure with port forwarding on the router for access from outside.