Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install docker container from Linux repository packages.

    Code Block
    languagebash
    sudo apt update
    sudo apt install docker.io

     

  2. Install apache Check the status of Docker

    Code Block
    languagebash
    sudo systemctl status docker


  3. If it's not running, start Docker

    Code Block
    languagebash
    sudo systemctl start docker


  4. Download the CODE Docker image

    Code Block
    languagebash
    sudo docker pull collabora/code


  5. Start the CODE docker container

    Code Block
    languagebash
    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

    Code Block
    languagebash
    sudo netstat -lnpt


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

    Code Block
    languagebash
    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

    Code Block
    languagebash
    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/codeserveryour.yourdomaincollabora-domain.com.conf (use a name derived from your own URL here) with following lines:

    Code Block
    languagenone
      <VirtualHost *:80>
     ServerName codeserveryour.yourdomaincollabora-domain.com
     </VirtualHost>
    


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

    Info
    titleNote

    - 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


    Code Block
    languagenone
      <IfModule mod_ssl.c>
    <VirtualHost *:443>
      ServerName codeserveryour.yourdomaincollabora-domain.com
    
       SSLEngine on
      # Intermediate configuration, tweak to your needs
      SSLProtocol             all -SSLv2 -SSLv3
      SSLCipherSuite          ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
     SSLHonorCipherOrder     on
     SSLCompression          off
    
      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

    Code Block
    languagebash
    sudo a2ensite codeserveryour.yourdomaincollabora-domain.com.conf
    sudo a2ensite codeserveryour.yourdomain.comcollabora-domain-ssl.conf
    For production mode, enable aufs storage driver for docker. First install necessary kernel modules for this
    com


  12. Restart Apache after the changes made

    Code Block
    languagebash
    sudo apt-getservice install linux-image-extra-$(uname -r) linux-image-extra-virtual aufs-tools
    For production mode, enable aufs storage driver for docker. To enable aufs, edit file /etc/default/docker and add the following line and save the file.
    apache2 restart


  13. Check and confirm if your Collabora Hosting Discovery URL is accessible

    Code Block
    languagebash
     DOCKER_OPTS="--storage-driver=aufs"
    Reboot the host running the docker container.

    Download CODE docker container

    Code Block
    languagebash
    sudo docker pull collabora/code

    Start the CODE docker container

    Code Block
    languagebash
    sudo docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=filecloudserver\\.yourdomain\\.com' --restart always --cap-add MKNOD collabora/codesudo curl -k https://your.collabora-domain.com/hosting/discovery