<%@ Control Language="C#" Inherits="BaseContentUserControls"%> <%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>

Connecting Document Server to Community Server

If you want to connect Document Server to the Community Server portal installed on your local or remote server, you might need to alter configuration files both on the computer with Community Server and Document Server installed. So please first make sure you have administrator access to both machines.

Document Server and Community Server must be installed on two different machines.

Connecting Document Server to Community Server 8.1 and higher

Normally to connect Document Server to Community Server version 8.1 and later you only need to set up connection parameters in portal settings. To do that please go to Settings and select Integration - Document Service. Then simply fill in all the fields with the appropriate Document Server service addresses.

Editing configuration files for Community Server

In case this does not work or you are using Community Server earlier than version 8.1 and you are sure that the Community Server version is compatible with the Document Server version you are trying to connect (please consult the table above to see if that is so), you will need to perform the actions below, editing the configuration files.

First of all you need to alter the web.appsettings.config file which can be found in the /var/www/onlyoffice/WebStudio/ folder of the Community Server computer. Open it with a text editor (e.g. nano):

sudo nano /var/www/onlyoffice/WebStudio/

And add the following lines (or change these lines accordingly, in case they are already present):

<add key="files.docservice.viewed-docs" value=".pptx|.ppsx|.pptt|.ppt|.pps|.odp|.gslides|.xlsx|.xlst|.xls|.ods|.gsheet|.csv|.docx|.doct|.doc|.odt|.gdoc|.txt|.rtf|.mht|.html|.htm|.fb2|.epub|.pdf|.djvu|.xps" />
<add key="files.docservice.edited-docs" value=".pptx|.ppsx|.pptt|.ppt|.pps|.odp|.xlsx|.xlst|.xls|.ods|.csv|.docx|.doct|.doc|.odt|.txt|.rtf|.mht|.html|.htm|.fb2|.epub" />
<add key="files.docservice.convert-docs" value=".ppt|.pps|.odp|.xls|.ods|.doc|.odt|.rtf|.mht|.html|.htm" />
<add key="files.docservice.coauthor-docs" value=".pptx|.pptt|.xlsx|.xlst|.docx|.doct" />
<add key="files.docservice.url.converter" value="http://documentserver/ConvertService.ashx" />
<add key="files.docservice.url.api" value="http://documentserver/web-apps/apps/api/documents/api.js" />
<add key="files.docservice.url.apinew" value="http://documentserver/web-apps/apps/api/documents/api.js" />
<add key="files.docservice.url.preloader" value="http://documentserver/web-apps/apps/api/documents/cache-scripts.html" />
<add key="files.docservice.url.storage" value="http://documentserver/FileUploader.ashx" />
<add key="files.docservice.url.portal" value="http://communityserver/" />
<add key="files.docservice.url.command" value="http://documentserver/coauthoring/CommandService.ashx" />

Where documentserver and communityserver are the addresses of the computers with Document Server and Community Server installed.

Please note, that if you are connecting Document Server prior to version 4.0 the lines 6—8 will look like:
<add key="files.docservice.url.api" value="http://documentserver/OfficeWeb/apps/api/documents/api.js" />
<add key="files.docservice.url.apinew" value="http://documentserver/OfficeWeb/apps/api/documents/api.js" />
<add key="files.docservice.url.preloader" value="http://documentserver/OfficeWeb/apps/api/documents/cache-scripts.html" />

These lines must be inserted between the <add key="files.uploader.chunk-size" value="5242880" /> and <add key="resources.from-db" value="true" /> lines.

After that restart the monoserve service:

sudo service monoserve restart

You will also need to run the SQL script for proper work:

sudo mysql -u root -p

Enter the password, after that you should see the SQL welcome promtp:

mysql>

Which means that you successfully entered SQL database. Enter the command (not omitting the semicolon):

use onlyoffice;

Now you can run the command:

DELETE FROM `webstudio_settings` WHERE `ID`='a3acbfc4-155b-4ea8-8367-bbc586319553';
In case there are problems with documents, you can try to change the <add key="web.client.cache.resetkey" value="3" /> line of the web.appsettings.config file entering any other numerical value instead of 3.