How to Install Owncloud on Windows Server 2012 with SSL
In this guide, we will provide a complete walkthrough on how to install ownCloud on your Windows Server 2012 Cloud VPS. This guide will assume you have configured IIS, MySQL, PHP along with PHP Manager in IIS, that there are no pending reboots and you are ready to install ownCloud.
First, we will download ownCloud from their site. You can visit the download page here:
For your convenience, the latest version direct download is here:
Once your download completes, extract the entire contents of the zip file to the “c:\inetpub\wwwroot” folder. The result being, there is now a folder here, “c:\inetpub\wwwroot\ownCloud” that contains all of the ownCloud files.
In the new ownCloud directory just created, you will need to move the “data” folder to another location as your data folder cannot live under the wwwroot folder. I chose to move mine to, “c:\ownCloud\data”.
Next, we will need to grant the IIS IUSR account Write rights to the following folder, and subfolders, “c:\inetpub\wwwroot\ownCloud”.
Next, we will create a local user who we will use for the MySQL database. Launch Server Manager > Tools > Computer Management > Local Users and Groups > right-click Users > New user… I chose to name my user “ownclouduser”. Make sure to take note of this password, we will be using it for MySQL in the next step.
Now launch MySQL Command Line Client, by clicking Start > MySQL Command Line Client. Then enter in the following information:
mysql> create database owncloud;
mysql> CREATE USER ‘ownclouduser’@’localhost’ IDENTIFIED BY ‘password’;
mysql> GRANT ALL ON owncloud.* TO ‘ownclouduser’@’localhost’;
mysql> flush privileges;
Next, we need to make sure we have enabled the proper PHP extensions. There are two ways to do this:
1)Launch IIS Manager, navigate to your site in the left pane, and then select PHP Manager. Enable or Disable an Extension
2)Edit your php.ini file direct “c:\php\php.ini” and uncomment the proper extensions
Make sure that you have the following enabled:
Next, we want to make some changes so that we can upload files larger than 20MB the default IIS upload limit. Again, there are two ways to update this for PHP
1)Launch PHP Manager in IIS, update the “post_max_size” and “upload_max_filesize” objects there.
2)Edit you php.ini file direct “c:\php\php.ini” and set the proper size you want. If you want 2GB to be the max, set 2G.
We also have to edit the default IIS size as well, this is done by launching “Request Filtering” and then clicking “Edit Feature Settings…” in the right pane. This value is set in bytes. The example below shows 2GB.
At this point, issue an IIS Reset and then launch the site:
You should see the screen here:
Create an admin user, it cannot match the mysql user’s password. Then enter in the MySQL information that we created earlier for owncloud.
Congrats, you’ve setup ownCloud on a Windows Server 2012 running IIS8, PHP, and MySQL! Now we need to setup SSL, so we can access and authenticate via HTTPS.
At this point, you’ve got a few options to generate a certificate to assign to your site:
1)Use IIS’s self-signed certificate
2)Use IIS6 Resource Kit Tools certificate generator or use openssl to configure a certificate for your server
3)Submit a CSR to a Certificate Authority, either public or within your organization
In this guide, I am assuming you are using a standalone server and aren’t planning to leverage a CA. Your best choice would be #2, to download the IIS6 Resource Kit Tools, only install sslself utility, and generate a proper self-signed cert. The self-signed certificate in IIS Manager is quite limited.
You can find the IIS6 Resource Kit Tools download here:
During the installation, choose Custom, and un-select everything except for Self-SSL 1.0:
To launch the utility, click Start > SelfSSL (it should show up on the tiled interface). Run a command similar to the below example and screenshot:
selfssl.exe /T /N:CN=myserver.mydomain.com /K:4096 /V:3650
Next, go back into IIS Manager, select the Default Site, right-click and select “Edit Bindings”. Click Add. Then choose https, 443, and then select the certificate you just created, it will be the full result of the CN= option.
Next, I recommend restarting MySQL and then issue an IIS reset, just to ensure we have all the proper extensions running and everything is fresh after the configuration changes. Then access your site here and login:
This concludes our ownCloud installation guide for Windows Server 2012. You can find ownCloud’s official Windows documentation here: