ownCloud / Clients / ownCloud Web / Setup with ownCloud 10 Edit this page

Setup with ownCloud 10

Prerequisites

Decide on which host and port Web will be served, for example https://web-host:9100/web-path/. In this document, we will refer to the following:

  • <web-url> as the full URL, for example https://web-host:9100/web-path/
  • <web-domain> as the protocol, domain and port, for example: https://web-host:9100

Setting up the ownCloud Server

Make sure you have an ownCloud Server already installed.

Adjusting config.php

Add the following entries to config/config.php:

  • tell ownCloud where Web is located:
'web.baseUrl' => '<web-url>',
  • add a CORS domain entry for Web in config.php:
'cors.allowed-domains' => ['<web-domain>'],

Setting up OAuth2

To connect to the ownCloud server, it is necessary to set it up with OAuth2.

Install and enable the oauth2 app:

% occ market:install oauth2
% occ app:enable oauth2

Login as administrator in the ownCloud Server web interface and go to the “User Authentication” section in the admin settings and add an entry for Web as follows:

  • pick an arbitrary name for the client
  • set the redirection URI to <web-url>/oidc-callback.html
  • make sure to take note of the client identifier value as it will be needed in the Web configuration later on

Setting up Web

In the local Web checkout, copy the config/config.json.sample-oc10 file to config/config.json and adjust it accordingly:

  • Set the “server” key to the URL of the ownCloud server including path. If the URL contains a path, please also add a trailing slash there.
  • Set the “clientId” key to the client identifier as copied from the “User Authentication” section before.
  • Adjust “url” and “authUrl” using the ownCloud server URL as prefix for both
  • Optionally adjust “apps” for the list of apps to be loaded. These match the app names inside the “apps” folder.

Running Web

  • if running from source, make sure to build Web first
  • run by launching a rollup dev server yarn serve
  • when working on the Web code, rollup will recompile the code automatically

Running acceptance tests

For testing, please refer to the ownCloud 10 testing section