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

Supported Distros

  • These instructions are for older version of CODE (v1.8.x). These are not applicable for 2.0.x

 

  1. Install docker container from Linux repository packages.

    yum  update
    tee /etc/yum.repos.d/docker.repo <<-'EOF'
    [dockerrepo]
    name=Docker Repository
    baseurl=https://yum.dockerproject.org/repo/main/centos/7/
    enabled=1
    gpgcheck=1
    gpgkey=https://yum.dockerproject.org/gpg
    EOF
    yum install docker-engine

     

  2. Install and configure apache 

    yum install httpd
    yum install mod_ssl
  3. Create a file /etc/httpd/conf.d/forward-proxy.conf with following lines:

       # Container uses a unique non-signed certificate
      SSLProxyEngine On
      SSLProxyVerify None
      SSLProxyCheckPeerCN Off
      SSLProxyCheckPeerName Off
     
      # Encoded slashes need to be allowed
      AllowEncodedSlashes On
      # 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
      ProxyPass   /lool/ws      wss://127.0.0.1:9980/lool/ws
      # 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
    
    
  4. Start apache and docker engine.

    service httpd start
    service docker start
  5. Pull Collabora CODE docker image.

    docker pull collabora/code
  6. To run the image in a docker container.

    docker run -t -d -p 127.0.0.1:9980:9980 --restart always --cap-add MKNOD collabora/code #this will work only if the WOPI host and WOPI client on the same network
    docker run -t -d -p 127.0.0.1:9980:9980 -e "domain=fcserv1\.codelathe\.com" --restart always --cap-add MKNOD collabora/code #this will work for cases where WOPI host and WOPI client are on different network. fcserv1.codelathe.com is WOPI host (filecloud server)
  • No labels