To integrate Microsoft SharePoint server 2016, Microsoft SharePoint server 2019 or Microsoft SharePoint Subscription Edition with Collabora Online, use the following configuration settings. Older versions of SharePoint might work too.
Running Collabora Online
Collabora Online runs on Linux servers. In a Microsoft environment it can be difficult. If you can’t install a Linux server (even virtualised) you can use Docker for Windows. It is recommended that this be a different server than SharePoint in any case.
You can run Collabora Online on Azure with a Linux server.
SharePoint doesn’t seem to work with self-signed certificates, and we don’t recommend using it HTTP only. Using Collabora Online with a Let’s Encrypt provided certificate worked.
Configure Collabora Online
Step 1
SharePoint uses WOPI security and requires using a proof key to authenticate WOPI applications. The proof key is automatically generated at the package installation of Collabora Online, so normally no user interaction is needed to set this up.
In the unexpected case, when this automatic setup does not work, use this command to generate an RSA key:
coolconfig generate-proof-key
In case your config dir is not /etc, you need to check coolwsd.log, which would contain a warning about missing proof-key in discovery. The warning would contain the command line to use for manual generation of the key, like this:
ssh-keygen -t rsa -N "" -m PEM -f "/path/to/coolwsd/config/proof-key"
Step 2
Authorize the SharePoint server in Collabora Online. Open coolwsd.xml, and add a host element under WOPI storage element for the SharePoint WOPI host (replace sharepoint-host-name.example.com with the actual host name):
<host allow="true">sharepoint-host-name.example.com</host>
If you do not authorize WOPI host, this will result in failure opening documents. The server’s name which was not matched would then be listed in coolwsd.log.
Step 3
Start Collabora Online.
Configure SharePoint
You need to configure WOPI bindings in SharePoint in order to associate actions to a WOPI application. The most common case it to associate all the document types to a single package, and in our case to Collabora Online.
Most of this will be done in the SharePoint Management Shell using PowerShell cmdlet. See https://learn.microsoft.com/en-us/powershell/module/sharepointserver for an exhaustive documentation of the cmdlet. Carefully read the documentation as a lot of commands can change very important configuration. The following instructions are just a guidance and might have side effects on a setup that is more tailored to your need.
Simple configuration: always use Collabora Online
Step 1
Clear the existing bindings. This is can be necessary as you can not have duplicated bindings.
First, check the existing bindings with:
Get-SPWOPIBinding
If you have existing bindings, like if you already were using an existing installation of Office Online Server, and wanted to replace it completely you can remove all the binding:
Remove-SPWOPIBinding -All
See the documentation of Remove-SPWOPIBinding for more details about that command and how just to remove them selectively.
Step 2
Bind Collabora Online globally by just creating the binding:
New-SPWOPIBinding -ServerName cool-server-name.example.com:port
The default port for Collabora Online is 9980. Check your installation to determine if it is the same.
Note: Bindings can not be duplicated, so it might be necessary to clear the previous ones. See above.
Note: If you use Collabora Online in a testing environment without SSL, then you need to add -AllowHTTP to the command.
Step 3
WOPI Zone
It is necessary to set the WOPI Zone for Collabora Online. When running over https, Collabora Online uses external-https WOPI zone. So you need to set it:
Set-SPWOPIZone -Zone "external-http"
Note: If you use Collabora Online in a testing environment without SSL, then the zone is external-http. However this is really not recommended.
Advanced: Binding Collabora Online to a specific extension
If you want to use Collabora Online only selectively it is possible to have binding based on extensions.
For example, to use Collabora Online to open ODT files, run the command:
New-SPWOPIBinding -ServerName cool-server-name.example.com:port -Extension ODT
Execute this command for all the file extensions that you want to be handled by Collabora Online. The default port for Collabora Online is 9980. Check your installation to determine if it is the same.
Running this command requires that no binding exists for this extension in the external zone that Collabora Online uses.
Default Actions
Now SharePoint should use Collabora Online to open files with the configured extensions by default. Changing the default action for any of the configured file types can be done by using SharePoint’s Get-SPWOPIBinding and Set-SPWOPIBinding commands:
Get-SPWOPIBinding -Server cool-server-name.example.com:port -Extension ODT | Set-SPWOPIBinding -DefaultAction:$true
Testing
To test, just try to open the document in SharePoint. It will say Open With Word Online (or the equivalent for other types of documents) even if you have configured with Collabora Online.
