Nextcloud and Collabora online

Nextcloud and Collabora online installation & configuration

Prerequisite

Ubuntu 16.04 server + LAMP + sudo apt install smbclient

Installation of NextCloud

Fetch Nextcloud

su web

mkdir ~/www/cloud.communecter.org

cd ~/www/cloud.communecter.org

wget https://download.nextcloud.com/server/releases/nextcloud-xxx.zip

unzip nextcloud-xxx.zip -d .

mv nextcloud/ public_html

mkdir data

Add the icons of external applications in nextcloud/apps/external/img which are in the zip file

Configure apache

Go to https://cloud.communecter.org to configure it

Edit the file config/config.php :

array (

 0 => 'localhost',

 1 => 'cloud.communecter.org',

 2 => 'cloud.co.tools',

 3 => 'nextcloud.co.tools',

 4 => '83.166.144.90',

 ),

Installation of Collabora

Follow these instructions : https://nextcloud.com/collaboraonline/ Docker alternative : https://hub.docker.com/r/thedarkknight/libreoffice-online-unlimited/

Configure apache in /etc/apache2/site-availables :

 <VirtualHost *:80>

 ServerName collabora.co.tools

 SSLHonorCipherOrder on

 # 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>

Fetch and launch docker (the option --restart always will cause the container to be added to service docker which is automatically launched at the start of the computer)

sudo su

docker pull collabora/code

ufw allow 9980

docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=cloud\\.communecter\\.org\|cloud\\.openappecosystem\\.cc\|nextcloud\\.co\\.tools|cloud\\.co\\.tools|cloud\\.cosystem\\.cc' --restart always --cap-add MKNOD collabora/code

Then, in the web interface of NextCloud, add the application Collabora and configure it by giving the server address : https://collabora.co.tools