Connect to an External Office Server
Steps
Configuring the server externally allows administrators to manage the OpenOffice server process manually, giving more control over the server’s startup parameters. To configure your wiki to work with an office server (LibreOffice or OpenOffice):
- Install LibreOffice or OpenOffice.
- Navigate to the xwiki/WEB-INF/ and open the file xwiki.properties with a text editor.
- Search for the "Settings for the OpenOffice server instance consumed by the OfficeImporter component". The content looks like this:
#-# [Since 1.9M2] #-# Type of the openoffice server instance used by officeimporter component. #-# 0 - Internally managed server instance. (Default) #-# 1 - Externally managed (local) server instance. # openoffice.serverType = 0 #-# [Since 12.1RC1] #-# Port numbers used for connecting to the openoffice server instance. #-# For an internally managed server instance, it will create the process for all ports. #-# For an externally managed server instance, only the first server port is taken into account. # openoffice.serverPorts = 8100,8101 #-# [Since 1.9M2] #-# If the openoffice server should be started / connected upon XE start. #-# Default value is false # openoffice.autoStart = false #-# [Since 1.8RC3] #-# Path to openoffice installation (serverType:0 only). #-# If no path is provided, a default value will be calculated based on the operating environment. # openoffice.homePath = /opt/openoffice.org3/ #-# [Since 1.8RC3] #-# Path to openoffice execution profile (serverType:0 only). #-# If no path is provided, a default value will be calculated based on the operating environment. # openoffice.profilePath = /home/user/.openoffice.org/3 #-# [Since 1.8RC3] #-# Maximum number of simultaneous conversion tasks to be handled by a single openoffice process (serverType:0 only). #-# Default value is 50 # openoffice.maxTasksPerProcess = 50 #-# [Since 1.8RC3] #-# Timeout for conversion tasks (in milliseconds) (serverType:0 only). #-# Default value is 60 seconds # openoffice.taskExecutionTimeout = 60000 #-# [Since 16.8.0] #-# [Since 16.4.4] #-# [Since 15.10.13] #-# The output image format to use when importing an office presentation in XWiki. # officeimporter.presentation.imageFormat = jpg #-# [Since 16.8.0] #-# [Since 16.4.4] #-# [Since 15.10.13] #-# Quality of the output image when importing an office presentation: the quality value is between 0 and 100. #-# Be aware that this option overrides any filter configuration provided in custom-document-formats.json for html #-# presentations. Also this configuration is ignored if the image format is png. # officeimporter.presentation.quality = 95 #-# [Since 16.8.0] #-# [Since 16.4.4] #-# [Since 15.10.13] #-# Width of the output image when importing an office presentation: the value is given in pixel. # officeimporter.presentation.slideWidth = 1920 - Set openoffice.serverType=1 and openoffice.autoStart=false and uncomment these lines by deleting the # at the beginning of the lines.
- Save the changes.
- Create /OpenOffice Profile Directory in case your server environment doesn’t allow launching OpenOffice. You need an OpenOffice profile created on your system. You can create the profile (profilePath) on a local computer and upload it to the server running XWiki.
Example for Windows:
openoffice.profilePath=C:/Users/{user}/AppData/Roaming/OpenOffice.org/3
Example for Linux:openoffice.profilePath=/home/{user}/.openoffice.org/3 - Manually start OpenOffice server.
"soffice" -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard, where <soffice> is the path to your OpenOffice executable.
Windows Example:"C:/Program Files (x86)/OpenOffice 3/program/soffice.exe" -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
This command starts the OpenOffice server in headless mode, accepting connections on port 8100. - Verify the server is running by going to Administer the Wiki and then selecting "Content", "Office Server" from the dropdown.

- Once the OpenOffice server is running and connected, you can use the Office Importer to Import Office Documents into Wiki Pages, convert office documents (e.g., .docx, .xlsx) to XWiki format, and to export Pages in ODT or RTF formats.
FAQ
Do I need to manually install the Office Importer application in XWiki?
No, the Office Importer application comes pre-bundled, so no manual installation is required.
How does the Office Importer work in XWiki?
The Office Importer uses a running Libre Office server to convert Office documents into HTML, and then transforms them into XWiki 2.0 syntax. This process ensures that Office files (e.g., DOCX, XLSX) can be easily imported and displayed in XWiki.
When is it useful to configure the Office Server externally?
This method is useful if you need to customize the server's behavior or if you prefer to manage the OpenOffice process separately from XWiki.
What’s the difference between configuring the server externally vs internally?
Externally means you install and manually start the LibreOffice/OpenOffice server, and XWiki connects to it when needed. Internally means XWiki takes care of starting the LibreOffice/OpenOffice server automatically.
How should I adapt the example paths to my LibreOffice/OpenOffice version?
You should update the version number in the path to match the LibreOffice/OpenOffice version you are using (for example, replace 3.4 with 3.3 if you are using LibreOffice 3.3.x).
Why does XWiki add /program to my openoffice.homePath on Windows?
On Windows, XWiki automatically appends /program to the value of openoffice.homePath. Therefore, you should set the path to the LibreOffice installation directory (for example, C:/Program Files/LibreOffice 3.4) rather than directly pointing to the program subdirectory.