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/20.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 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 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:
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.
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:
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:
Exit the MySQL using the command:
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