Connect to an Internal Office Server
Steps
Configuring the server internally means that XWiki will manage and start the LibreOffice or OpenOffice server automatically. 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.autoStart=true and uncomment the line by deleting the # at the beginning of the line.
- Specify the path of the office suite and uncomment the line. The path is similar format to this one for the homePath variable: openoffice.homePath=C:\Program Files (x86)
LibreOffice 5. Some default install paths on different operating systems:- Microsoft Windows XP/Vista/7:
Example for OpenOffice 3 (32-bit):
openoffice.profilePath=C:/Users/{user}/AppData/Roaming/openOffice.org/3 openoffice.homePath=C:/Program Files/OpenOffice.org 3Example for LibreOffice 3.4 (32-bit):
openoffice.profilePath=C:/Users/{user}/AppData/Roaming/LibreOffice/3 openoffice.homePath=C:/Program Files/LibreOffice 3.4Example for OpenOffice 3 (64-bit):
openoffice.profilePath=C:/Users/{user}/AppData/Roaming/openOffice.org/3 openoffice.homePath=C:/Program Files (x86)/OpenOffice.org 3Example for LibreOffice 3.4 (64-bit):
openoffice.profilePath=C:/Users/{user}/AppData/Roaming/LibreOffice/3 openoffice.homePath=C:/Program Files (x86)/LibreOffice 3.4- Linux
- Ubuntu Linux (10.04):
openoffice.homePath=/usr/lib/openoffice/ - Ubuntu Linux (11.10):
openoffice.homePath=/usr/lib/libreoffice/
- Ubuntu Linux (10.04):
- Fedora:
See the Guide for Fedora.
- Mac OSX:
Example for LibreOffice:
openoffice.homePath=/Applications/LibreOffice.app/Contents
- Save the changes.
- Restart the server of XWiki.
- 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.
Why is it recommended to manually set the homePath and profilePath configuration options?
By default, the values of homePath and profilePath are automatically calculated based on the operating environment. However, this automatic calculation may not be accurate on all systems. To avoid potential issues, it is recommended to explicitly configure these values by editing the xwiki.properties file.
What’s the difference between configuring the server internally vs externally?
Internally means XWiki takes care of starting the LibreOffice/OpenOffice server automatically. Externally means you install and manually start the LibreOffice/OpenOffice server, and XWiki connects to it when needed.
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.