Page tree
Skip to end of metadata
Go to start of metadata

Supported Distros

  • This instruction is only for Ubuntu 16.04. Docker container running on a Ubuntu 14.04 host is not supported.

 

  1. Install docker container from Linux repository packages.

    sudo apt update
    sudo apt install docker.io

     

  2. Check the status of Docker

    sudo systemctl status docker
  3. If it's not running, start Docker

    sudo systemctl start docker
  4. Download the CODE Docker image

    sudo docker pull collabora/code
  5. Start the CODE docker container

    sudo docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=your\\.filecloud-domain\\.com' --restart always --cap-add MKNOD collabora/code
  6. Check the connections are accepted on port 9980

    sudo netstat -lnpt


  7. Check and confirm hosting discovery is accessible on localhost and port 9980

    sudo curl -k https://127.0.0.1:9980/hosting/discovery

     

    Setup Apache Reverse Proxy for your Collabora URL

  8. Install Apache and necessary modules

    sudo apt install apache2
     
    sudo a2enmod proxy
    
    sudo a2enmod proxy_wstunnel
    
    sudo a2enmod proxy_http
    
    sudo a2enmod ssl
  9.  Create a file /etc/apache2/sites-available/your.collabora-domain.com.conf (use a name derived from your own URL here) with following lines:

     <VirtualHost *:80>
     ServerName your.collabora-domain.com
     </VirtualHost>
    


  10. Create a file /etc/apache2/sites-available/your.collabora-domain.com-ssl.conf with following lines:

    Note

    - You will need SSL certificate for the domain you will running CODE server on and the associated private key for this step.
    -  Place the certificate in the path /etc/apache2/ssl/server.crt
    -  Place the key in the path /etc/apache2/ssl/server.key

    <IfModule mod_ssl.c>
    <VirtualHost *:443>
      ServerName your.collabora-domain.com
    
      SSLCertificateFile /etc/apache2/ssl/server.crt
      SSLCertificateKeyFile /etc/apache2/ssl/server.key
    
      # 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>
    </IfModule>
    
  11. Enables sites configured from above steps

    sudo a2ensite your.collabora-domain.com
    sudo a2ensite your.collabora-domain-ssl.com
  12. Restart Apache after the changes made

    sudo service apache2 restart
  13. Check and confirm if your Collabora Hosting Discovery URL is accessible

    sudo curl -k https://your.collabora-domain.com/hosting/discovery
  • No labels