ownCloud 9.0

Installation

You can add the repository key to apt. Keep in mind that the owner of the key may distribute updates, packages and repositories that your system will trust (more information). Run the following shell commands as root to trust the repository:

wget -nv https://download.owncloud.org/download/repositories/stable/Debian_8.0/Release.key -O Release.key
apt-key add - < Release.key

Run the following shell commands as root to add the repository and install from there:

sh -c "echo 'deb http://download.owncloud.org/download/repositories/stable/Debian_8.0/ /' >> /etc/apt/sources.list.d/owncloud.list"
apt-get update
apt-get install owncloud

See Install package owncloud

Make the following modifications to config.php, which allows access to ownCloud from WAN, LAN, and the server. “netbios name” is the local machine name within the LAN:

'trusted_domains' =>
array (
  0 => 'localhost',1 => 'wwww.domain.com',2 => 'netbios name'
),

Cron job:

  • Dont forget to configure the cron service on the server by executing:
    sudo crontab -u www-data -e
  • where www-data is your web server user, and add:
    15 *  *  * php -f /var/www/owncloud/cron.php

Database

After installation, convert database to MySQL or MariaDB:

  1. Login to MySQL and create a new user “oc_user”. Grant him all privileges for database “owncloud”. This username must be the same as the admin user in config.php.
  2. Make sure there is no existing db “owncloud”, if there is, drop it.
  3. Run the following command as user “www-data” (Debian) in folder /var/www/owncloud on the command line:
    php occ db:convert-type --all-apps mysql oc_user localhost owncloud
  4. You will see the creation of the db tables displayed. Afterwards, check whether the tables have been created in MySQL, and try to login to owncloud.
  5. Add the directive “binlog_format = MIXED” to /etc/mysql/my.cnf under header [mysqld]

See Converting Database Type and Database Configuration

Security

  1. Make sure HTTP Strict Transport Security is enabled for your VirtualHost like so:
    <VirtualHost *:443>
    ServerName cloud.owncloud.com
      <IfModule mod_headers.c>
        Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
      </IfModule>
    </VirtualHost>
  2. Place your data directory outside of the web root (see next paragraph)
  3. Generate a random password in mysql for the owncloud user, then add it to config.php

See Hardening and Security Guidance

Setings

  1. Place your data directory outside of the web root, e.g. /data. Copy all files including hidden files from the default location, and delete owncloud.db (which is the sqlite3 db not used anymore). Entry in config.php:
    'datadirectory' => '/data',
  2. Check additional config parameters such as your theme at Config.php Parameters (see next paragraph)
  3. Activate the cache. On Debian 8, php 5.6 and APCu are already installed, so you only need to place the respective line into your config.php:
    'memcache.local' => '\OC\Memcache\APCu',
  4. Timezone settings for logs:
     'logtimezone' => 'Asia/Seoul',
  5. Enable experimental apps:
     'appstore.experimental.enabled' => true,

Branding

Modify the copyright text and display in the footer by creating “default.php” in /themes/your-theme-name/. Copy “default.php” from /lib/private/, rename the class to “OC_Theme”, and modify as needed. Functions which do not change the output do not need to be repeated in the theme default.php file.

Activate the theme in /config/config.php by adding:

'theme' => 'mytheme',

Other settings

  1. If you need to generate files on your server which then get synced to your devices, do the following:
    • Remember to check all folder path in your crontab or batch files
    • Add the following option to config.php:
      'filesystem_check_changes' => 1,

Desktop client

  1. After installation, delete the preset Sync Connection, then setup your own Sync Connections

Clients