CODE

Collabora Online Development Edition 2.1

Last update CODE 2.1.4: October 9, 2017

Get your own online Office Suite up and running at home with CODE!

The development edition is aimed at home users and contains the latest and greatest developments. We want as many people as possible to try it out and get back control of their own online documents. We’d also love to get people involved in our efforts to make LibreOffice Online even better. Download the Docker Image, enjoy using it at home and why not participate in the project too!

Getting set up

Or grab it like this:

$ docker pull collabora/code
$ docker run -t -d -p 127.0.0.1:9980:9980 -e "domain=<your-dot-escaped-domain>" \
        -e "username=admin" -e "password=S3cRet" --restart always --cap-add MKNOD collabora/code

<your-dot-escaped-domain> is the WOPI host, i.e. your preferred File Sync and Share solution that implements WOPI protocol, for example share\\.example\\.com. You need double backslash in command line, because shell escapes the first, and the domain parameter takes a regular expression. Note: you can enable multiple domains by separating the domain names with | character.
The optional username and password parameters enable the admin console feature of CODE. You can access the admin console at https://<CODE-domain>/loleaflet/dist/admin/admin.html.

Other optional environment variables that you can pass to collabora/code

DONT_GEN_SSL_CERT When this environment variable is set (is not “”), then startup script will not generate a new SSL certificate signed by a dummy CA. It is useful, if you want to use your own SSL certificate for some reason.
cert_domain When this environment variable is set (is not “”), then startup script will generate a new SSL certificate signed by a dummy CA for this domain, not for localhost
server_name When this environment variable is set (is not “”), then its value will be used as server name in /etc/loolwsd/loolwsd.xml. Without this, CODE is not delivering a correct host for the websocket connection in case of a proxy in front of it.

If you need to tweak other parameters of CODE, you can edit the configuration file /etc/loolwsd/loolwsd.xml in the Docker image, it is self documented.

Packages for Linux x86_64 platform

As an alternative to Docker image, Collabora provide native Linux packages for selected Linux distributions.

Debian 8

Please type the following commands into the shell as root:

# import the signing key
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D
# add the repository URL to /etc/apt/sources.list
echo 'deb https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-debian8 ./' >> /etc/apt/sources.list
# perform the installation
apt-get update && apt-get install loolwsd code-brand

Debian 9

Please type the following commands into the shell as root:

# import the signing key
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D
# add the repository URL to /etc/apt/sources.list
echo 'deb https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-debian9 ./' >> /etc/apt/sources.list
# perform the installation
apt-get update && apt-get install loolwsd code-brand

Ubuntu 16.04

Please type the following commands into the shell as root:

# import the signing key
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D
# add the repository URL to /etc/apt/sources.list
echo 'deb https://www.collaboraoffice.com/repos/CollaboraOnline/CODE ./' >> /etc/apt/sources.list
# perform the installation
apt-get update && apt-get install loolwsd code-brand

CentOS 7 (at least 7.2)

Please type the following commands into the shell as root:

# import the signing key
wget https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-centos7/repodata/repomd.xml.key && rpm --import repomd.xml.key
# add the repository URL to yum
yum-config-manager --add-repo https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-centos7
# perform the installation
yum install loolwsd CODE-brand

openSUSE 42.2

Please type the following commands into the shell as root:

# import the signing key
wget https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-opensuse/repodata/repomd.xml.key && rpm --import repomd.xml.key
# add the repository URL to zypper
zypper ar -t yum 'https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-opensuse' 'CODE'
# add also C++ repository for the POCO libraries
zypper ar 'http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_Leap_42.2/devel:libraries:c_c++.repo' 
# perform the installation
zypper ref && zypper in loolwsd CODE-brand

Setting up Apache 2 reverse proxy

CODE is listening on port 9980 of localhost. You can use for example Apache 2 reverse proxy to make it accessible from the outside world. Make sure that you enable the following Apache 2 modules: proxy, proxy_wstunnel, proxy_http, and ssl. Create a virtual host for CODE, for example collabora.example.com, and use the following sample configuration:

<VirtualHost *:443>
  ServerName collabora.example.com:443

  # SSL configuration, you may want to take the easy route instead and use Lets Encrypt!
  SSLEngine on
  SSLCertificateFile /path/to/signed_certificate
  SSLCertificateChainFile /path/to/intermediate_certificate
  SSLCertificateKeyFile /path/to/private/key
  SSLProtocol             all -SSLv2 -SSLv3
  SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
  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>

Setting up Nginx reverse proxy

server {
    listen       443 ssl;
    server_name  collabora.example.com;

    ssl_certificate /path/to/ssl_certificate;
    ssl_certificate_key /path/to/ssl_certificate_key;

    # static files
    location ^~ /loleaflet {
        proxy_pass https://localhost:9980;
        proxy_set_header Host $http_host;
    }

    # WOPI discovery URL
    location ^~ /hosting/discovery {
        proxy_pass https://localhost:9980;
        proxy_set_header Host $http_host;
    }

    # main websocket
    location ~ ^/lool/(.*)/ws$ {
        proxy_pass https://localhost:9980;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $http_host;
        proxy_read_timeout 36000s;
    }

    # download, presentation and image upload
    location ~ ^/lool {
        proxy_pass https://localhost:9980;
        proxy_set_header Host $http_host;
    }

    # Admin Console websocket
    location ^~ /lool/adminws {
        proxy_pass https://localhost:9980;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $http_host;
        proxy_read_timeout 36000s;
    }
}

Now you can give https://collabora.example.com as the WOPI URL in your preferred File Sync and Share solution. See below for specific examples.

Known problems:


For more detailed and pretty instructions on integrating with various partner solutions please see (in alphabetical order):

What next ?

That’s it – once you’ve integrated your docker image with your preferred File Sync and Share (FSS), or started up your VM you should be setup to share and collaborate on your own documents, with friends, from the comfort of your own home.

So now you’re all happy and secure, why not participate in the project?

Participate in the project

Checking out the code to build it yourself is easy; http://cgit.freedesktop.org/libreoffice/online has the latest commits, and build instructions. After compiling ‘online’ just do a $make run and follow the link to tweak things live. The API is visible here: https://www.collaboraoffice.com/collabora-online-editor-api-reference/.To send patches, and collaborate with other developers working on the code please do join in at #libreoffice-dev on irc.freenode.org, or join the Mailing List. If you want to help update the documentation please do help out in the Wiki, to file bugs please head to Bugzilla and as you file a bug – please do take the time to confirm at least one other un-confirmed bug if there are any. Help fixing bugs, and patches that arrive via gerrit are most easy for us to merge.

What is CODE? vs. LibreOffice Online and Collabora Online?

LibreOffice Online is great for home use as well as enjoying the latest translations and developments. CODE is a somewhat more conservative version – but still a development edition – of LibreOffice Online, and is built around the Collabora Office core. CODE is perfect for home users that want to start to run their own online Office Suite.The LibreOffice Online Docker Image docker image is a very regularly updated snapshot of the latest master build of both online and LibreOffice that has passed both the LibreOffice and online automated testing. CODE builds on the other hand, are released on average once a month and announced on this website.If you are looking for a scalable, commercially supported version with Long Term Support, signed security updates and a SLA, your best bet is to check out our Collabora Online page.

For more details on enterprise support from various partner solutions please see:: Nextcloud, ownCloud, Pydio, Kolab, VNC Lagoon, Seafile, Arawa, FileCloud, AG-I Solutions, SecuredStore, Alinto, Studio Storti, Rono IT, equipe, New Access, United Hoster, Urberri, Webo.hosting, Artistanbul, PC HELP, Retention Range, Workman.net.au, DAASI International GmbH

Check out the page Understanding the differences between LibreOffice Online, CODE and Collabora Online for more details about the differences or download the white paper “8 Million Reasons to Choose Collabora Online”

Download the White Paper

8-million-reasons-white-paper-logo

“8 Million Reasons to Choose Collabora Online”




Partners and clients get access to the partner portal. How does it look like and what do you get?

1) Main menu
With links to tickets, preferences,…
2) Latest news and upcoming events
See what Collabora is doing and at what upcoming events we’ll be present.
3) Customers block
Add and manage your customers. You can add customer companies, and users for those customer companies. You can also report issues on
behalf of your customers, if you sell L3 support packages to them.
4.1) Collabora Online block
Visible to Collabora Online partners and customers. All relevant documents that you need to set up Collabora Online. Partner can find extra documents here, to help them market and sell Collabora Online.
4.2) Collabora Office and GovOffice block
Visible to Collabora Office resellers and customers. All relevant Collabora Office documents and the complete list of downloads.

Become a partner and add Collabora Online to your product portfolio

Contact sales if you want to use Collabora Online in your business or organization

Timeline

Q&A

Why a Docker image?

Several reasons.

  1. With the Docker Image of Collabora Online Development Edition (CODE) home users can easily get their own online Office Suite up and running at home
  2. We want people to hack this code and play with it. Doing that live on a server used by tens of thousands of other people seems unlikely to be a good idea – right?
  3. We would prefer not to be hosting many tens of thousands of concurrent users – we have no desire to compete with our partners whose core competence is doing exactly that.
  4. Isolating everything into a Docker Image makes it easy for us to package and update everything in a consistent lump, and it makes it rather easier and safer for you to consume. You can upgrade your FSS solution, fiddle with your database, and so on all without any risk to the rest of your data.

Where can I find out more about the technical architecture?

Clearly the code provides the canonical version of everything. However – here is some basic overview. The code splits into four pieces:

LibreOfficeKit

This is the API that allows the re-use of the bulk of the existing LibreOffice code. It exposes a simple abstract API to allow loading, saving, and rendering documents to image tiles, and also exposes an event based editing core. This piece lives in the main core.git module of LibreOffice.

Web Services daemon

This manages incoming session traffic, services cached document tiles, and spawns LibreOfficeKit client instances, setting up heavily locked down chroot jails for them. The code for this piece lives in loolwsd/ inside online.git.

JavaScript / NodeJS

This code is built on leaflet and provides the front-end, toolbars, and rendering the document contents as it runs in the web client, it lives in the loleaflet directory in online.git.

FSS integration

Clearly on its own CODE is not terribly useful – so make sure you integrate it with your preferred FSS cf. above. The FSS implements a protocol such as WOPI to serve your document data, and integrate with its existing authentication mechanism.

So is this a new Office Suite written in Javascript?

In a word – no. This is LibreOffice brought to your browser in a new and interesting way. There are many good reasons not to duplicate, re-write and re-debug eight million lines of C++ into many millions of lines of JavaScript. Indeed – we have the opposite direction, of trying to minimise the amount of custom Javascript, and to share as much code as humanly possible with the PC and Mobile versions. There are also serious questions about how quickly it would be possible to JIT and execute such a large volume of Javascript – even if it were created, the problems of maintaining two diverging code-bases and synchronizing them is a well known nightmare, and finally – ongoing development is already hard in type-safe C++ with many extra compiler, safety checks; moving to type unsafe Javascript would make things unmaintainable. Instead by re-using the existing LibreOffice code we get huge benefits in terms of rendering and layout fidelity with existing ODF and proprietary file formats. So what you see on your Tablet, Browser and PC (Linux, Windows, Mac) should be identical – absent unusual and non-embedded fonts.

Known issues

There are a number of known issues that are hard for us to fix in CODE. These include copy & paste – while we can provide rich eg. RTF content for selections from the server to the browser, existing browser APIS are extraordinarily unpleasant (to the point of un-usability) for copy/pasting rich content – as such, we do plain text copy/paste.

Why didn’t you fix my bug yet for free?

Please feel free to join our efforts in making this the best Online Office Suite. We’re working hard to make the CODE better, but more help is always welcome. Learn more in “Participate in the project”.

Is this all Free Software / Open Source?

Yes, of course. That was easy wasn’t it: Open First.

Where is the roadmap?

The development edition, aimed at home users, contains the latest and greatest developments and things are moving fast, but there is no published roadmap. If you want features delivered to your schedule then you’re looking for the commercial edition of Collabora Online. Having said that – clearly we are currently doing only basic editing (with shared editing), the next focus will be Collaborative editing, and then richer editing – however, that depends on who gets involved.

Can I re-use your screenshots & content for my blog / article?

Yes naturally, please use this page’s content under some CC0 license / Public Domain as long as you respect our trademark, we love to get the message out.

Who did the work?

CODE is built on top of a huge volume of work from both LibreOffice (credits) and is built on top of Rich Documents plugin (credits), however the Online functionality was created primarily by Collabora (as announced in 2015) – read more about the story of that here. And thanks to Lukas Reschke for help with the docker image.

Also, check out the huge amount of work done for last year’s release of CODE 2.0.

What are the latest updates?

The Docker Image for home users is regularly updated. Keep an eye out on our blog or twitter feed for news of changes.

Latest updates

Changes and improvements

If you have any suggestions for changes or have ideas for improvements, please contact us at libreoffice@collabora.com.