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 has to be for proper performance and stability. However, users familiar with the 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 will not use any of them to install the Owncloud server on Windows 10 or any 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 the Search box, type “Turn Windows feature on or off,” click on that as it appears, and enable the WSL (Windows Subsystem for Linux) feature: For more info on this, see: Enable the Windows Subsystem for Linux feature
Step 2: Install Ubuntu 20.04/22.04 Linux App
From Windows 10 search box or the program, list search for the Microsoft store. When the store opens, search for Ubuntu to download and install. After installing, click on the Launch button, which extends the Ubuntu bash or command screen from where we can use all Ubuntu commands except a 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 and 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., the 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 http://127.0.0.1/ or the IP address of your Windows 10 local machine. You can find out the IP address by typing Ip a. 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 the 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 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 to point the Apache root directory toward 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 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.
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:
We are building a database with the name owncloud you can use another name if you want.
CREATE DATABASE owncloud;
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 and 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';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON owncloud.* TO 'h2smedia'@'localhost';
Flush privileges operations:
Exit 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/owncloud/ or http://127.0.0.1/owncloud/ or the IP address of your Windows 10 local machine. Just like we did while checking whether the Apache works 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 to the Admin account.
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 the database username, password, and database name, which is owncloud in our case.
Finally, once you have provided all the information to Owncloud, scroll down and click on the Finish Setup button.
Step 5: Login Owncloud server
When you click the Finish setup button, the Owncloud will take a few seconds to authenticate all provided details and then 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 a PC/smartphone and the Owncloud server.
The first screen that appears to you is dedicated to the same. Click on the one OS platform you want to download the Owncloud client.
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 difficulty installing Windows 10 OwnCloud server, let us know, and we will try to solve the same as soon as possible.
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