Is this Nethserver module helpful to you?
Please consider donating to the author

Thank you kindly!

2019/03/04 06:06 · HF

Onlyoffice

Onlyoffice document server is an open document editing server. It's used in Nextcloud via an app to edit office documents. You need to install Nextcloud from Software Center to make this module work. Nethserver-nginx is installed as requirement. Self-signed certs are possible now (thanks to kizotux and flatspin).

Onlyoffice documentserver needs port 8082 to be reachable.

yum -y install https://mrmarkuz.goip.de/mirror/mrmarkuz/7/noarch/nethserver-mrmarkuz-0.0.1-3.ns7.noarch.rpm
yum -y install nethserver-nextcloud
curl -sL https://rpm.nodesource.com/setup_8.x | sudo bash -
yum -y install https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm
yum -y install https://github.com/ONLYOFFICE/DocumentServer/releases/download/ONLYOFFICE-DocumentServer-5.4.0-2/onlyoffice-documentserver.x86_64.rpm
yum -y install nethserver-onlyoffice

mrmarkuz repo

mrmarkuz repo is required for installation/updates.

Install Nextcloud

You have to install Nextcloud from Software Center or via command line to use onlyoffice:

yum -y install nethserver-nextcloud

Install nodejs repo

Be careful as this step adds a repository that provides newer versions of nodejs that replaces the nodejs provided by centos which may lead to problems. I am working on nvm integration to not touch system packages.

curl -sL https://rpm.nodesource.com/setup_8.x | sudo bash -

Install Fonts (optional)

yum -y install https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm

Install OnlyOffice DocumentServer

Actual version is 5.4.0.

yum -y install https://github.com/ONLYOFFICE/DocumentServer/releases/download/ONLYOFFICE-DocumentServer-5.4.0-2/onlyoffice-documentserver.x86_64.rpm

DocumentServer 5.0.7

For DocumentServer 5.0.7 you need to install librabbitmq(-tools) because it's not available in epel anymore, thanks to Flatspin for solving this issue.

yum -y install http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/librabbitmq-0.5.2-1.sdl7.x86_64.rpm
yum -y install http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/librabbitmq-tools-0.5.2-1.sdl7.x86_64.rpm
yum -y install https://github.com/ONLYOFFICE/DocumentServer/releases/download/ONLYOFFICE-DocumentServer-5.0.7/onlyoffice-documentserver.x86_64.rpm

Downgrade to 5.0.7

To downgrade just use

yum downgrade https://github.com/ONLYOFFICE/DocumentServer/releases/download/ONLYOFFICE-DocumentServer-5.0.7/onlyoffice-documentserver.x86_64.rpm

https://community.nethserver.org/t/howto-install-onlyoffice-document-server-as-nextcloud-app/8662/113

Upgrade

To upgrade an existing installation of documentserver issue:

yum upgrade https://github.com/ONLYOFFICE/DocumentServer/releases/download/ONLYOFFICE-DocumentServer-5.4.x/onlyoffice-documentserver.x86_64.rpm

Where '5.4.x' would be the actual version you want to install. For an overview of available versions, please see: https://github.com/ONLYOFFICE/DocumentServer/releases/

Install NethServer-onlyoffice

Install nethserver-onlyoffice:

yum -y install nethserver-onlyoffice

Nextcloud Addon configuration

Nextcloud addon is autoconfigured. If you installed Nextcloud after nethserver-onlyoffice just run

signal-event nethserver-onlyoffice-update

to setup the onlyoffice nextcloud app.

The host is set to HOST.DOMAIN.TLD by default. In Nextcloud 13 the FQDN only works with valid, not self-signed certificates. A token is used for securing the documentserver.

Self-signed certificate

If you want to use a self signed certificate you have to change the configuration:

config setprop fw_onlyoffice RejectUnauthorized false

For internal use only (without opening port 8082 to the public) you have to set the local IP:

config setprop fw_onlyoffice host 1.2.3.4

Apply the changes:

signal-event nethserver-onlyoffice-update

Set host/domain

By default systemname.domainname is used. To change it do the following

config setprop fw_onlyoffice host DOMAIN.TLD

or use IP for self-signed certs

config setprop fw_onlyoffice host 1.2.3.4
  

and apply the config

signal-event nethserver-onlyoffice-update
Allow site in browser if self-signed cert is used

Browse to https://NETHSERVER:8082 and allow the site in your browser otherwise the documentserver may not work.

Something's not working

nodejs 6 from epel installed so nodejs 8 is not installing from repo

You have to remove the epel nodejs which removes onlyoffice-documentserver too.

yum remove nodejs

Now you have to reinstall onlyoffice-documentserver.

Save button

If something is not working it may help to click the “Save” button in the ONLYOFFICE app settings in the Nextcloud admin settings. At least you should get an error message.

Reinstall

If you downgraded/upgraded it may help to reinstall, just replace {VERSION} with 5.4.0-2 for example:

yum -y reinstall https://github.com/ONLYOFFICE/DocumentServer/releases/download/ONLYOFFICE-DocumentServer-{VERSION}/onlyoffice-documentserver.x86_64.rpm

Remove database

After upgrades or downgrades it may make sense to drop the database to force recreation:

su - postgres -c "psql -c 'drop database onlyoffice;'"
signal-event nethserver-onlyoffice-update

Please raise Issues on NethServer Community