How to install Collabora Online Development Edition (CODE)

application
collabora
v7

(Markus Neuberger) #1

Hi guys,

finally Collabora Online seems to work, fully installed on Nethserver. All you need is a trusted certificate like letsencrypt.
It’s possible to install onlyoffice too. Onlyoffice opens docx and collabora odt.
Please test and share your experiences. Tagging some interrested people: @flatspin @dnutan @iglqut @danb35 @oneitonitram

EDIT 14.9.2018:

Please test the module:

Don’t forget to replace “yourdomain.tld” with your real domain:

# Install nextcloud and yum-utils for repoimport
yum -y install nethserver-nextcloud yum-utils

# get repo and install collabora
wget https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-centos7/repodata/repomd.xml.key && rpm --import repomd.xml.key
yum-config-manager --add-repo https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-centos7
yum -y install loolwsd CODE-brand

# generate self-signed cert
openssl genrsa -out /etc/loolwsd/privatekey.pem 4096
openssl req -batch -new -x509 -sha512 -days 3650 -key /etc/loolwsd/privatekey.pem -out /etc/loolwsd/fullchain.pem
loolconfig set ssl.cert_file_path /etc/loolwsd/fullchain.pem
loolconfig set ssl.key_file_path /etc/loolwsd/privatekey.pem
loolconfig set ssl.ca_file_path ''
loolconfig set storage.wopi.host yourdomain.tld

# Create a httpd conf file for reverse proxy
cat << EOF > /etc/httpd/conf.d/collabora.conf 
<VirtualHost *:443>
  # Encoded slashes need to be allowed
  AllowEncodedSlashes NoDecode

  # Container uses a unique non-signed certificate
  SSLProxyEngine On
  SSLProxyVerify None
  SSLProxyCheckPeerCN Off
  SSLProxyCheckPeerName Off

  # keep the host
  ProxyPreserveHost On

  # static html, js, images, etc. served from loolwsd
  # loleaflet is the client part of LibreOffice Online
  ProxyPass           /loleaflet https://127.0.0.1:9980/loleaflet retry=0
  ProxyPassReverse    /loleaflet https://127.0.0.1:9980/loleaflet

  # WOPI discovery URL
  ProxyPass           /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
  ProxyPassReverse    /hosting/discovery https://127.0.0.1:9980/hosting/discovery

  # Main websocket
  ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1:9980/lool/\$1/ws nocanon

  # Admin Console websocket
  ProxyPass   /lool/adminws wss://127.0.0.1:9980/lool/adminws

  # Download as, Fullscreen presentation and Image upload operations
  ProxyPass           /lool https://127.0.0.1:9980/lool
  ProxyPassReverse    /lool https://127.0.0.1:9980/lool
</VirtualHost>
EOF

# Set admin user and password for the web console
sed -i 's!enabled."/>!enabled.">admin</username>!' /etc/loolwsd/loolwsd.xml
loolconfig set-admin-password

Type your wanted password for the admin web console and then finish installation with restarting services and nextcloud setup. Don’t forget to replace “yourdomain.tld” with your real domain:

# (re)start and enable services
systemctl restart httpd
systemctl enable loolwsd --now

# Install nextcloud collabora richdocuments app
sudo -u apache /opt/rh/rh-php71/root/usr/bin/php /usr/share/nextcloud/occ app:install richdocuments
# Set domain
sudo -u apache /opt/rh/rh-php71/root/usr/bin/php /usr/share/nextcloud/occ config:app:set richdocuments wopi_url --value=https:\/\/yourdomain.tld
# Enable app
sudo -u apache /opt/rh/rh-php71/root/usr/bin/php /usr/share/nextcloud/occ app:enable richdocuments

# Set nextcloud trusted domains and apply
config setprop nextcloud TrustedDomains yourdomain.tld
signal-event nethserver-nextcloud-save

Now you should be able to create and edit libre documents in Nextcloud:
https://yourdomain.tld/nextcloud

Admin interface (username admin):
https://yourdomain.tld/loleaflet/dist/admin/admin.html

Sources:



So, what are you working on? - 2 Jul 2018
We Are NethServer - Community Overview - Sep 18
Education applications wishlist
(Dan) #2

With a quick look, this seems to be working.

Edit: Testing so far involves creating a new .odt document, and opening .doc and .odt files–all are working.

Edit 2: Somewhat to my surprise, it also opens a .xlsx file.


(Marc) #3

Man, you make it look so easy :clap: :clap: :clap: . It’s working so far.
No problems opening/editing .odt, .docx, .xlsx, .pptx
Document scrolling and rendering on big documents seems less fluid than in onlyoffice.
Browser zooming badly affects font rendering (at least on my PC).

To add support for spell-check you can add dictionaries (in this example for english language):

yum install collaboraoffice5.3-dict-en
systemctl restart loolwsd

(It’s OK to leave dictionaries out of the default installation, as they are said to consume some resources and users can choose which ones they want to install.)

With many open documents it warns about…

This is an unsupported version of LibreOffice Online. To avoid the impression that it is suitable for deployment in enterprises, this message appears when more than 10 documents or 20 connections are in use concurrently

Not really needed, but interesting to know tricks:


Nethserver-collabora CODE testing and discussion