167 lines
6 KiB
Markdown
167 lines
6 KiB
Markdown
---
|
|
title: How to Collabora Code
|
|
---
|
|
|
|
Collabora Online Development Edition (CODE) est une suite bureautique utilisable dans son navigateur. Le logiciel est basé sur Libre Office Online (lool)
|
|
|
|
## Installation
|
|
|
|
Collabora propose des paquets via leur dépôt pour installer le logiciel :
|
|
|
|
~~~
|
|
# echo 'deb https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-debian10 ./' >> /etc/apt/sources.list.d/collabora-code.list
|
|
# apt-key adv --keyserver http://keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D
|
|
# apt update
|
|
|
|
# apt install loolwsd code-brand collaboraofficebasis6.4-fr collaboraoffice6.4-dict-fr
|
|
|
|
|
|
# systemctl status loolwsd.service
|
|
● loolwsd.service - LibreOffice Online WebSocket Daemon
|
|
Loaded: loaded (/lib/systemd/system/loolwsd.service; enabled; vendor preset: enabled)
|
|
Active: active (running) since Tue 2019-11-26 12:55:32 CET; 1 day 21h ago
|
|
Main PID: 8894 (loolwsd)
|
|
Tasks: 10 (limit: 4701)
|
|
Memory: 108.3M
|
|
CGroup: /system.slice/loolwsd.service
|
|
├─8894 /usr/bin/loolwsd --version --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/collaboraoffice6.0 --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd
|
|
├─8896 /usr/bin/loolforkit --losubpath=lo --systemplate=/opt/lool/systemplate --lotemplate=/opt/collaboraoffice6.0 --childroot=/opt/lool/child-roots/ --clientport=9980 --masterport=9981 --rlimits=limit_virt_mem_mb:0;limit_stack_mem_kb:8000;limit_file_size_mb:0;limit_num_open_files:0 --version
|
|
└─9000 /usr/bin/loolforkit --losubpath=lo --systemplate=/opt/lool/systemplate --lotemplate=/opt/collaboraoffice6.0 --childroot=/opt/lool/child-roots/ --clientport=9980 --masterport=9981 --rlimits=limit_virt_mem_mb:0;limit_stack_mem_kb:8000;limit_file_size_mb:0;limit_num_open_files:0 --version
|
|
|
|
|
|
~~~
|
|
|
|
Pour les versions de Debian antérieures à Debian 10, tout est expliqué sur [leur site](https://www.collaboraoffice.com/code/linux-packages/)
|
|
|
|
|
|
## Configuration
|
|
|
|
Fichiers de configuration :
|
|
|
|
~~~
|
|
/etc/loolwsd/
|
|
├── loolkitconfig.xcu
|
|
└── loolwsd.xml
|
|
~~~
|
|
|
|
Le fichier de configuration principal se trouve être `/etc/loolwsd/loolwsd.xml`. Juste après installation, le service loolwsd.service ne fonctionnera pas, car la configuration du service écoute en HTTPS par défaut, mais aucun certificat n'est présent.
|
|
|
|
Il est plus simple d'utiliser un serveur web comme [Nginx](HowtoNginx) en reverse proxy en amont pour faire la terminaison SSL avant de transférer le trafic à collabora-code localement, sans HTTPS.
|
|
|
|
Pour cela, il faut passer changer les paramètres suivants de la section `<ssl>` :
|
|
|
|
* `<enable>` : de *true* à **false**
|
|
* `<termination>` de *false* à **true**
|
|
|
|
|
|
~~~.xml
|
|
|
|
(...)
|
|
<ssl desc="SSL settings">
|
|
<enable type="bool" desc="Controls whether SSL encryption is enable (do not disable for production deployment). If default is false, must first be compiled with SSL support to enable." default="true">false</enable>
|
|
<termination desc="Connection via proxy where loolwsd acts as working via https, but actually uses http." type="bool" default="true">true</termination>
|
|
|
|
(...)
|
|
~~~
|
|
|
|
|
|
|
|
Côté Nginx, on utilisera le vhost proposé par les [développeurs de collabora code](https://www.collaboraoffice.com/code/nginx-reverse-proxy/) :
|
|
|
|
~~~
|
|
server {
|
|
listen 443 ssl;
|
|
server_name collabora.example.org;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/collabora00.evolix.org/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/collabora00.evolix.org/privkey.pem;
|
|
|
|
root /var/www/collabora00.evolix.org;
|
|
|
|
access_log /var/log/nginx/access.collabora00.evolix.org.log;
|
|
error_log /var/log/nginx/error.collabora00.evolix.org.log;
|
|
|
|
|
|
# static files
|
|
location ^~ /loleaflet {
|
|
proxy_pass http://localhost:9980;
|
|
proxy_set_header Host $http_host;
|
|
}
|
|
|
|
# WOPI discovery URL
|
|
location ^~ /hosting/discovery {
|
|
proxy_pass http://localhost:9980;
|
|
proxy_set_header Host $http_host;
|
|
}
|
|
|
|
# Capabilities
|
|
location ^~ /hosting/capabilities {
|
|
proxy_pass http://localhost:9980;
|
|
proxy_set_header Host $http_host;
|
|
}
|
|
|
|
# main websocket
|
|
location ~ ^/lool/(.*)/ws$ {
|
|
proxy_pass http://localhost:9980;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_set_header Host $http_host;
|
|
proxy_read_timeout 36000s;
|
|
}
|
|
|
|
# download, presentation and image upload
|
|
location ~ ^/lool {
|
|
proxy_pass http://localhost:9980;
|
|
proxy_set_header Host $http_host;
|
|
}
|
|
|
|
# Admin Console websocket
|
|
location ^~ /lool/adminws {
|
|
proxy_pass http://localhost:9980;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_set_header Host $http_host;
|
|
proxy_read_timeout 36000s;
|
|
}
|
|
}
|
|
~~~
|
|
|
|
|
|
## Utilisation
|
|
|
|
#### Avec Nextcloud et le connecteur Collabora
|
|
|
|
Dans Nextcloud, il y a une application nommée ["Collabora Online"](https://apps.nextcloud.com/apps/richdocuments) permet de faire connecteur entre l'installation Nextcloud et le service Collabora Code fraîchement installé. Cela permettra de consulter et modifier des fichiers directement depuis l'interface de Nextcloud.
|
|
|
|
##### Configuration dans Nextcloud
|
|
|
|
##### Configuration dans Collabora Code
|
|
|
|
Dans le fichier de configuration `/etc/loolwsd/loolwsd.xml`, il faut autoriser l'adresse de l'instance Nextcloud à travailler avec Collabora.
|
|
|
|
Dans la sous-section `<wopi>` de la section `<storage>`, il faut rajouter un élément `<host></host>` qui contient une regex d'hôtes à autoriser
|
|
|
|
~~~.xml
|
|
|
|
(...)
|
|
|
|
<storage desc="Backend storage">
|
|
<wopi desc="Allow/deny wopi storage. Mutually exclusive with webdav." allow="true">
|
|
<host desc="Regex pattern of hostname to allow or deny." allow="true">nextcloud.example.net</host>
|
|
<host desc="Regex pattern of hostname to allow or deny." allow="true">sharedcloud[0-9]{4}.example.org</host>
|
|
|
|
(...)
|
|
~~~
|
|
|
|
## Monitoring
|
|
|
|
### Nagios
|
|
|
|
### Munin
|
|
|
|
## Plomberie
|
|
|
|
## FAQ
|
|
|
|
|