Using ownCloud with CenturyLink Relational DB Service

Updated by Gavin Lai on Jan 26, 2016

ownCloud logo


Technology Profile

ownCloud is a personal productivity powerhouse. It gives you universal access to all your files, contacts, calendars and bookmarks across all of your devices. Unlike many of the shared repository services out there, with ownCloud, you have your own, private repo. However, just like the public repo companies, with ownCloud you can share your files with friends and co-workers. If you need it, ownCloud even integrates with other storage providers. Best of all, ownCloud is open source and free!


This CenturyLink Cloud knowledge article provides a walkthrough to install and configure ownCloud on the Linux platform (from scratch and Blueprint), customize ownCloud to utilize CenturyLink Cloud's Relational DB Service, SMTP Relay and Object Storage.

For more information, please visit


CenturyLink Cloud Users


After reading this article, the user can configure a customized ownCloud environment to utilize Relational DB Service, mail relay and Object storage (Enterprise edition) to minimize administration for local resources


  • Access to the CenturyLink Cloud platform as an authorized user
  • Access to Object Storage if required, CenturyLink Cloud Object Storage can be used as primary storage for the Enterprise Edition of ownCloud


If you want to access your application over the internet, please perform the following tasks after the server is deployed successfully:

  1. If you need to connect to your server via the Internet, Add a Public IP to your server through Control Portal

  2. Allow incoming traffic for desired ports by clicking on the Servers Public IP through Control Portal and configuring appropriately.

    • The default ports to access the application are: 80, 443
  3. After adding a public IP for OwnCloud perform the following actions:

    • Edit the web server configuration files in /etc/apache2/sites-enabled as follows:
      DocumentRoot "/var/www/owncloud/"
      # Alias /owncloud/ "/var/www/owncloud/"
      # Alias /owncloud "/var/www/owncloud"
      • Restart Apache using sudo service apache2 restart
      • (The following steps will enable management of ownCloud from the public IP address)
        • Access the server's public IP address using a web browser (with VPN still connected)
        • ownCloud setup will prompt to add the new IP address as a "trusted domain" trusted domain
        • Click on "Add "IP address" as a trusted domain", it will redirect this request to the private IP address to create the necessary entries to the owncloud configuration file add trusted-domain


Deploying ownCloud on a New Servers

(For Steps using Blueprint, please see Getting Started with ownCloud Blueprint) Create a Linux server in CenturyLink Cloud using the following knowledge articles:

Create a CenturyLink Relational DB MySQL Instance

  1. Use Create a MySQL instance on CenturyLink Relational DB MySQL Instance knowledge article to create a database instance
  2. Note down the user name and the connection string from the setup


  3. Download the certificate to configure secure connectivity to CenturyLink's Relational DB Service

Connect to the server via OpenVPN

Steps to deploy ownCloud to an existing server

  1. Download the ownCloud installation from
  2. Look for the package for the installed OS, this example will use Ubuntu 14.x
  3. ownCloud supports CentOS, Debian, RHEL, Ubuntu and more
  4. For Ubuntu 14.x, download the ownCloud package and add the repository key to apt (this key will updates periodically).

     sudo apt-key add - < Release.key  
     sudo sh -c "echo 'deb /' >> /etc/apt/sources.list.d/owncloud.list"
     sudo apt-get update
     sudo apt-get install owncloud

Enable SSL

  • In order to enable SSL, a certificate is required. Either a self-signed certificate or your own certificate can be used.

    • The following gives an example of self signed certificate with an expiration date of 365 days :

      1. Create the certificate (use /opt/bitnami instead of /etc for Blueprint installation, detail steps are here):

             cd /etc/apache2
             mkdir ssl
             sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -out /etc/apache2/ssl/server.crt -keyout /etc/apache2/ssl/server.key
             sudo ln -s /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-enabled/000-default-ssl.conf

        Edit the following two parameters to reflect the location of the certificate:

         SSLCertificateFile    /etc/apache2/ssl/server.crt
         SSLCertificateKeyFile /etc/apache2/ssl/server.key
      2. Enable SSL on the web server:

             sudo a2enmod ssl
             sudo a2ensite default-ssl
             sudo service apache2 reload

Configure ownCloud connection to CenturyLink MySQL Relational DB Service

To trigger the initial setup in the ownCloud Blueprint installation, move the config.php file from /opt/bitnami/apps/owncloud/htdocs/config directory to a new location (please backup the data for restoration)
  1. If not already, connect to CenturyLink Cloud VPN
  2. Point the web browser to the private address of the ownCloud server
  3. The ownCloud configuration page will appear


  4. Click on Storage and Database, select MySQL

  5. Using the information from Relational DB Service to complete the information, the format for the host is IP_Address:port (e.g.

    ownCloud database input

  6. Click "Finish Setup", the welcome page will display

    ownCloud Welcome

  7. Download the certificate from Relational DB Service to the ownCloud server to enable secure communication between the database and the ownCloud server. Please refer to this Connecting to MySQL Relational DB Service over SSL-enabled Connection knowledge article.

    • Add the following to section to the config.php file (default location: /var/www/owncloud/config/)

          {   'dbdriveroptions' =>
                array (
                1009 => '/etc/mysql/ssl/ca-cert.pem',

Configure ownCloud to utilize SMTP Relay

  • Configure SMTP Relay SMTP Relay
  • From the owncloud main page, select Admin from the user account

drop down menu

  • Select Mail Server from the left pane

Mail Server

  • Configure the SMTP Relay user based on SMTP Relay information from the portal

mail server config

  • Use the test function to verify the account information

Configure ownCloud to utilize Object Storage

There are two ways to utilize Object Storage in ownCloud, one is adding Object Storage as an external storage and the other is to utilize Object Storage as the primary storage for ownCloud

Steps to add Object Storage as External storage

drop down menu

  • Enable External Storage Support from the Not enabled list

Not Enabled list

  • From the owncloud main page, select Admin from the user account

drop down menu

External Storage Admin

  • Configure External Storage, Add Storage with "Amazon S3 and Compliant" and populate the fields using the credential from Step 1 and set permissions

Object Storage Option

Object Storage Prompt

Object Storage inputs

  • Once completed, the Object Storage will be part of the storage locations under "Files"

External Storage

Steps to add Object Storage as Local storage

  • Access to CenturyLink Cloud storage (S3 compatible) or any other object storage

  • Depending on the version of ownCloud, the options of utilizing Object Storage are different, please see here

  • ownCloud Server supports Local storage, GlusterFS/Red Hat Storage, OpenStack Swift as primary storage; Enterprise Edition supports additional primary storage with S3 compatible storage
  • In order to utilize Object Storage for primary storage, edit config.php (default location: /var/www/owncloud/config/) with the Object Storage credential, like the example below:

     {    'objectstore' => array(
      'class' => 'OCA\ObjectStore\S3',
      'arguments' => array(
      'key' => 'xxxxxxxxxxxxx',
      'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
      'bucket' => 'owncloud',
      'region' => ''

    Now, the ownCloud server is set up to consume Database as a Service, SMTP Relay and Object Storage, this will minimize the administration of the local environment and eliminate resource constraint on the server.


The costs associated with this deployment are for the CenturyLink Cloud infrastructure only. There are no ownCloud license costs or additional fees bundled in.

About ownCloud

ownCloud gives you universal access to your files through a web interface or WebDAV. It also provides a platform to easily view & sync your contacts, calendars and bookmarks across all your devices and enables basic editing right on the web. Installation has minimal server requirements, doesn’t need special permissions and is quick. ownCloud Server is extendable via a simple but powerful API for applications and plugins.

Frequently Asked Questions

Who should I contact for support?

Customer Support

Can’t find what you need?
Give us a call.


M – F, 8am to 6pm