ownCloud + MS Office Online server doesn't work

Steps to reproduce

  1. Install the latest ownCloud server in 30-day trial mode from docker-hub.
  2. Set wopi.token and wopi.office-online.server parameters.
  3. Try to open document.

Expected behaviour

Document should be opened in MS Office Online editor.

Actual behaviour

ownCloud suggests ot download document.

Server configuration

Operating system:
CentOS Linux release 7.6.1810 (Core)
Web server:
Apache
Database:
mysql Ver 15.1 Distrib 10.3.15-MariaDB, for Linux (x86_64) using readline 5.1
Redis server v=5.0.5 sha=47edd290:0 malloc=libc bits=64 build=aca41ac95830049d
PHP version:

ownCloud version: (see ownCloud admin page)
10.2.1.4
Updated from an older ownCloud or fresh install:
Fresh
Where did you install ownCloud from:
docker-hub
Signing status (ownCloud 9.0 and above):
No errors have been found.

The content of config/config.php:

<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/owncloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/owncloud/custom',
      'url' => '/custom',
      'writable' => true,
    ),
  ),
  'trusted_domains' =>
  array (
    0 => '',
  ),
  'datadirectory' => '/mnt/data/files',
  'dbtype' => 'mysql',
  'dbhost' => 'db:3306',
  'dbname' => 'owncloud',
  'dbuser' => 'owncloud',
  'dbpassword' => '',
  'dbtableprefix' => 'oc_',
  'log_type' => 'owncloud',
  'supportedDatabases' =>
  array (
    0 => 'sqlite',
    1 => 'mysql',
    2 => 'pgsql',
  ),
  'upgrade.disable-web' => true,
  'default_language' => 'en',
  'overwrite.cli.url' => 'http://localhost/',
  'htaccess.RewriteBase' => '/',
  'logfile' => '/mnt/data/files/owncloud.log',
  'loglevel' => 0,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mysql.utf8mb4' => true,
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'redis',
    'port' => '6379',
  ),
  'passwordsalt' => '',
  'secret' => '',
  'version' => '10.2.1.4',
  'logtimezone' => 'UTC',
  'installed' => true,
  'instanceid' => 'ocxqhan4qzz2',
  'proxy' => '',
  'wopi.token.key' => '',
  'wopi.office-online.server' => '',
  'wopi_group' => 'admin',
);

List of activated apps:

www-data@872de2751427: /var/www/owncloud # php ./occ app:list
Enabled:
  - admin_audit: 1.0.3
  - comments: 0.3.0
  - configreport: 0.2.0
  - dav: 0.4.0
  - diagnostics: 0.1.4
  - enterprise_key: 0.2.0
  - external: 1.4.0
  - federatedfilesharing: 0.4.0
  - federation: 0.1.0
  - files: 1.5.2
  - files_external: 0.7.1
  - files_mediaviewer: 1.0.0
  - files_sharing: 0.11.0
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.10.1
  - firewall: 2.8.0
  - firstrunwizard: 1.2.0
  - market: 0.5.0
  - notifications: 0.5.0
  - objectstore: 0.5.1
  - onlyoffice: 2.3.1
  - provisioning_api: 0.5.0
  - sharepoint: 0.3.0
  - systemtags: 0.3.0
  - systemtags_management: 0.3.1
  - theme-enterprise: 2.1.2
  - updatenotification: 0.2.1
  - windows_network_drive: 0.7.4
Disabled:
  - encryption
  - files_ldap_home
  - richdocuments
  - user_external
  - user_ldap

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: No

Client configuration

Browser:
Chrome 76.0.3809.100
Operating system:
Windows 10

have you tried to open it with the options menu?

1 Like

There is no “Edit in Office Online” or “View in Office Online” items in option menu. I tried to click on the document.

How did you setup your office online server?

There is a how to from Microsoft. I followed that guide and managed to set it up.

From the ownCloud side it’s only 2 lines in the config.php. The important part are the host names and the option to edit the documents.

1 Like

This MS Office Online installation is working fine with SharePoint.
My owncloud server url: http://vm-owncloud01.domain.com:8080
wopi.token: “random-string-kkkkk-ssjdskdkd-eidjdjdkfk”
wopi.office-online.server: http://webapps01.domain.com

can you change the office server url to the hosting/discovery ?

Which PHP version are you using? You need at least Version 7.1

You can check on CentOS with the following command:

yum list installed | grep php

To check which version your CLI is using just run:

php --version

And to see what your web server is using you can either run a config report:
https://doc.owncloud.com/server/admin_manual/troubleshooting/providing_logs_and_config_files.html#generate-a-config-report
This will run a phpinfo() and show the output in JSON format, alternatively you can manually install a info.php file like so:

echo "<?PHP phpinfo; ?>" > /path/to/owncloud/info.php

And then go to your owncloud URL like so:

http[s]?://yourowncloud.tld/info.php

/var/www/owncloud # php --version
PHP 7.2.19-0ubuntu0.18.04.1 (cli) (built: Jun 4 2019 14:48:12) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright © 1998-2018 Zend Technologies
with Zend OPcache v7.2.19-0ubuntu0.18.04.1, Copyright © 1999-2018, by Zend Technologies

How can I check that MS Office Online Server integration is supported by my ownCloud installation?

On the ownCloud server, can you curl http://webapps01.domain.com/hosting/discovery

Thank you, @eneubauer.
“curl” returns XML file with wopi discovery information.

It seems that my installation doesn’t have necessary files or apps for interaction with MS Office Online Server.
Should ouwCloud “/app” folder contain a “wopi” folder?

Thank you @dmitry. I tried. It didn’t help.

What error are you getting if any?

There is no any error.

I’m pretty sure wopi is an enterprise feature, so I would recommend to get in touch with sales@owncloud.com for a PoC