SlapOS Home SlapOS

    Procedure to install Collabora Office for Nextcloud

    Procedure to reproduce installation of Collabora Office for NextCloud
    • Last Update:2019-09-02
    • Version:001
    • Language:en

    This document explain how to install collabora office for nextcloud or other software.

    How to deploy Collabora office

    Let’s start with the preparation of the docker environment:

    apt remove docker docker-engine docker.io
    apt install apt-transport-https ca-certificates curl software-properties-common -y

    On Ubuntu:

    sed -i '$adeb https://download.docker.com/linux/ubuntu bionic stable' /etc/apt/sources.list
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

    On Debian:

    sed -i '$adeb [arch=amd64] https://download.docker.com/linux/debian stretch stable' /etc/apt/sources.list
    curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

     

    Then we can now install docker-ce, and check that it's running properly.

    apt update && apt install docker-ce -y

     

    Now docker is installed, we can continue by installing collabora.

    Download collabora docker image.

    docker pull collabora/code

    Run collabora with the docker command bellow:

    docker run --sysctl net.ipv6.conf.all.disable_ipv6=1 --sysctl net.ipv6.conf.default.disable_ipv6=1 \
                    -t -d -p 9980:9980 -e 'domain=nextcloud\\.nexedi\\.net|nextcloud\\.app\\.nexedi\\.net' \
                    -e "extra_params=--o:net.post_allow.host=::ffff:172\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}" \
                    --name="collabora" -e "username=admin" -e "password=Ahooj4ei" --restart always --cap-add MKNOD collabora/code

     

    You can now connect to collabora using https://SERVER_IP:9980

    To access to collabora admin panel, open URL: https://SERVER_IP:9980/loleaflet/dist/admin/admin.html

     

    To stop collabora service:

    docker stop collabora

    To upgrade collabora (in case there is a new version of docker image):

    # stop collabora
    docker stop collabora
    # remove docker image
    docker rm collabora
    # Pull collabora/code
    docker pull collabora/code


    Now run again collabora command above to start the service:

    docker run --sysctl net.ipv6.conf.all.disable_ipv6=1 --sysctl net.ipv6.conf.default.disable_ipv6=1 \
                    -t -d -p 9980:9980 -e 'domain=nextcloud\\.nexedi\\.net|nextcloud\\.app\\.nexedi\\.net' \
                    -e "extra_params=--o:net.post_allow.host=::ffff:172\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}" \
                    --name="collabora" -e "username=admin" -e "password=Ahooj4ei" --restart always --cap-add MKNOD collabora/code

     

    Now request a slave frontend to access the service. If you want to learn how to instantiate a slave frontend, please read this documentation: slapos-HowTo.Instantiate.Frontend.Slave.

    When requesting the slave, update parameters bellow :

    • "type:websocket Websocket Application Path List" to /lool
    • "type:websocket Transparent proxy" to true
    • "Backend Type" to websocket
    • "Backend URL" to https/[YOUR_SERVER_IPv6]:9980/

     

    Configure Nextcloud with collabora

    If you install nextcloud with SlapOS Software Release, you need to set collabora parameter before the instance is deployed. To do so, set the parameter instance.collabora-url to your collabora url. Please check here to see all nextcloud configuration here.

    If your nextcloud is installed, go to https/YOUR_NEXTCLOUD_DOMAIN/settings/admin/richdocuments and set collabora URL.