See my Reference "Picking OwnCloud Package for your OS" to get the latest repository links should the link in my example expire.

This install package will also install Apache2, SQLite and MySQL

4

Install Libre Office

This is an optional step, However if you wish to use OwnClouds built in ability to view and edit open office documents and Microsoft Word files you will need to complete this step. If you don't wish to use this feature you can skip this step

sudo apt-get install --no-install-recommends libreoffice-writer

5

Change the Database used to MySQL

OwnCloud installs with SQLite enabled as its default database. The install also installs MySQL but doesn't use it be default. You will want to set your OwnCloud instance to use MySQL or you will run into performance issues if you have more than a few users on this system.

The first time you bring up the web-portal for your install you have to make this change. If you miss it at this point You are hooped and I don't know of a way to get back to this setting without uninstalling and reinstalling OwnCloud

Connect to your server at http://server/owncloudThen under the create username and password box click the "Storage and Database" link

Change the Database to MySQL

Edit the information to use MySQL instead of SQLite

I am missing some information on this step unfortunately as I didn't get screen shots or notes of this section on my run through. I will try and update this section at a future date to include this omission

6

Set your Username and Password

Once you have the Database set correctly you can safely set you OwnCloud username and password. This will be your default admin user for the web interface

7

Enable SSL and Disable HTTP port 80 access

Run the following commands to enable SSL support with a self signed certificate

sudo a2ensite default-ssl

sudo a2enmod ssl

sudo service apache2 restart

sudo /etc/init.d/apache2 restart

Now Disable HTTP and port 80 access by editing ports.conf file

sudo nano /etc/apache2/ports.conf

Comment out the following two lines by adding a "#" in front of them:
NameVirtualHost *:80
Listen 80

If everything is working correct the HTTP only connection will fail and the HTTPS connection will work with a warning about an un-trusted certificate. Remember we are using a self signed cert at this point in time

9

Purchase and Install an SSL Cert

You can skip this step if you plan to use the Self Signed Certificate and don't care about the security warnings (For example a test lab). For a production install you will want to purchase and install a paid trusted SSL certificate.

Copy the entire contents you will need them for the SSL cert Request when purchasing the certificate from your SSL provider.
Close the server.csr file

Purchase your certificate, this will take a day or two as you go through the validation process. While waiting you can continue with the rest of the install in this how-to. return to this step to finish the certificate install

Add Trusted Domains

Before you will be able to access your OwnCloud instance with anything other than its internal IP you will have to add your external IP and Domain name to the Trusted Domains list

sudo nano /var/www/owncloud/config/config.php

Look for the item

'trusted_domains' => array ( 0 = > 'internal IP',)

Add 2 more entries

1 => 'external IP', 2 = > 'external DNS name",

Note the last , is required and is not a typo
Save the file

Restart apache

sudo service apache2 restart

11

Enable LDAP Support for Active Directory Login

If you plan to use LDAP lookups to allow Active Directory user logins then run the following 2 commands to install the necessary components

sudo apt-get install php5-ldap
sudo /etc/init.d/apache2 restart

12

Enable Built in Apps

You can now log into your OwnCloud web portal, It should be fully operational at this point. However we are not done yet. There are several configurations that you will want to set before you begin using your OwnCloud instance

In the top left corner off the web page click on the drop down menu and select Apps. There are several Apps I recommend turning on that are off by default.

Make sure the following list of Apps are enabled
Documents
LDAP user and group backend

Do not enable the "Default Encryption Module" Especially if you plan to use LDAP authentication. When your users change their passwords they will lose access to them if you use this feature as the password is also used as the encryption key for users files if this is enabled.

13

LDAP

LDAP must be properly configured for Active Directory users to be able to login to OwnCloud using their AD credentials.

On the server tab you will need to input the following

Domain Controller IP
user account and password of an account that can read AD
OU where your staff are located in the format like the following
ou=staff,dc=domainname,dc=local

Skip the Users Tab
Skip the Login Attributes Tab

On the Groups Tab you can select an Active Directory group to use in order to grant AD users access to OwnCloud (I created an AD Group called OwnCloud) anyone in the selected AD group will automatically be granted access to OwnCloud

Click the Advanced Tab and select "Special Attributes"
for the email field enter the attribute "mail" without brackets.

This will enable owncloud to import users email address (assuming you populate this field in AD) This field is required if you wish to allow users to send email share links

Click the "Test Configuration button to verify your settings work

14

Set Security and Sharing Settings

I recommend enabling a few security and sharing settings on your OwnCloud instance. Click on your username and select the Admin option from the drop down

I recommend enforcing passwords and expire dates for all files shared as a link. This is of course up to your judgment

15

Server Side Encryption

I recommend enabling service side encryption to protect your at rest data

16

Documents

Assuming you installed Libre office above you should be able to enable local documents. This will allow for Google Docs style shared editing of Open Office and Microsoft Word Documents within the OwnCloud system.

Unfortunately support doesn't exist yet for spreadsheets

17

Email

If you plan to use email notifications or link sharing you will have to input your mail server settings

18

All Done!

Congrats! you now have a functional OwnCloud server!

Take it for a test run and share some files!

Conclusion

Being new to Linux and using community open source software such as this can be very intimidating. Especially for someone such as myself coming form a Windows System Admin role. I find in many cases software such as this while very powerful is not well documented and the documents that due exist are way to complicated or incomplete.

I hope this article helped you to get a working OwnCloud install without the days of Google and sorting through bits and pieces from various other documents, blogs and sites. I referenced to all useful sources that I used in my research and initial setup. None of which provided a complete picture but each of which had a small piece. Please use them in addition to my article should you run into any issues

7 Comments

Great writeup, thanks. I'm still running 5.17 on a Windows box, I was being hard-headed and even made it work with IIS. I have found owncloud to be all that and a bag of chips, I literally haven't touched it in over a year with at least two dozen active users. When I spin up my new owncloud on Ubuntu VM on a new Hyper-V host, I will be using this how-to as reference!