Theming ownCloud

Themes can be used to customize the look and feel of ownCloud. Themes can relate to the following topics of owncloud:

  • Theming the web-frontend
  • Theming the owncloud Desktop client

This documentation contains only the Web-frontend adaptations so far.

Getting started

A good idea getting starting with a dynamically created website is to inspect it with web developer tools, that are found in almost any browser. They show the generated HTML and the CSS Code, that the client/browser is receiving: With this facts you can easily determine, where the following object-related attributes for the phenomenons are settled:

  • place
  • colour
  • links
  • graphics

In owncloud standard theme everything is held very simple. This allows you quick adapting. In an unchanged ownCloud version CSS files and the standard pictures reside in /owncloud/themes/default folder. The next thing you should do, before starting any changes is: Make a backup of your current theme(s) e.g.:

  • Goto …/owncloud/themes
  • cp -r default default.old


In this example the theme name default is used because this is automatically loaded. This should be changed in the config file to avoid having this overwritten by the ownCloud package (see Notes for Updates).

Creating and activating a new theme

There are two basic ways of creating new themings:

  • Doing all new from scratch
  • Starting from an existing theme and doing everything step by step and more experimentally

Depending on how you created your new theme it will be necessary to

  • put a new theme into the /themes -folder. The theme can be activated by putting “theme” => ‘themename’, into the config.php file.
  • make all changes in the /themes/default -file


The folder structure of a theme is exactly the same as the main ownCloud structure. You can override js files, images, translations and templates with own versions. CSS files are loaded additionally to the default files so you can override CSS properties.

How to change translations

You can override the translation of single strings within your theme. Simply create the same folder structure within your theme folder for the language file you want to override. Only the changed strings need to be added to that file for all other terms the shipped translation will be used.

If you want to override the translation of the term “Download” within the files app for the language de you need to create the file themes/THEME_NAME/apps/files/l10n/de.js and put the following code in:

    "Download" : "Herunterladen"
  "nplurals=2; plural=(n != 1);"

Additionally you need to create another file themes/THEME_NAME/apps/files/l10n/de.json with the same translations that look like this:

  "translations": {
    "Download" : "Herunterladen"
  "pluralForm" :"nplurals=2; plural=(n != 1);"

Both files (.js and .json) are needed with the same translations, because the first is needed to enable translations in the JavaScript code and the second one is read by the PHP code and provides the data for translated terms in there.

How to change names, slogans and URLs

The ownCloud theming allows a lot of the names that are shown on the web interface to be changed. It’s also possible to change the URLs to the documentation or the Android/iOS apps.

This can be done with a file named defaults.php within the root of the theme. In there you need to specify a class named OC_Theme and need to implement the methods you want to overwrite:

class OC_Theme {
  public function getAndroidClientUrl() {
    return '';

  public function getName() {
    return 'ownCloud';

Each method should return a string. Following methods are available:

  • getAndroidClientUrl
  • getBaseUrl
  • getDocBaseUrl
  • getEntity
  • getName
  • getHTMLName
  • getiOSClientUrl
  • getiTunesAppId
  • getLogoClaim
  • getLongFooter
  • getMailHeaderColor
  • getSyncClientUrl
  • getTitle
  • getShortFooter
  • getSlogan


Only these methods are available in the templates, because we internally wrap around hardcoded method names.

One exception is the method buildDocLinkToKey which gets passed in a key as first parameter. For core we do something like this to build the documentation link:

public function buildDocLinkToKey($key) {
  return $this->getDocBaseUrl() . '/server/8.2/go.php?to=' . $key;

Testing the new theme out

There are different options for doing so:

  • If you’re using a tool like the Inspector tools inside Mozilla, you can test out the CSS-Styles immediately inside the css-attributes, while looking at them.
  • If you have a developing/testing server as described in 1. you can test out the effects in a real environment permanently.

Notes for Updates

In case of theming it is recommended to the user, not to perform these adaptations inside the folder /themes/default.

Please perform the following steps, to avoid conflicts with other upcoming updates:

  • create a new folder inside /themes: for example: /themes/MyTheme
  • Copy the folders /themes/default/core and /themes/default/settings to /themes/MyTheme
  • edit the file /config/config.php
  • Insert: ‘theme’ => ‘MyTheme’, into this file

Within the folder /themes/MyTheme all files, which are needed for theming are save from coming updates. All company theming must be done exclusively here from now on.

In case, that one of the following files is affected due to an upgrade,

  • /themes/default/settings/templates/apps.php
  • /themes/default/defaults.php

the files listed below, have to be replaced by those listed above:

  • /themes/MyTheme/settings/templates/apps.php
  • /themes/MyTheme/defaults.php

But this is unlikely at least in the upcoming updates (5.0.x). ownCloud aims to give further information in this case.

All documentation licensed under the Creative Commons Attribution 3.0 Unported license.