Collabora Online - Community Page
  • Home
  • Docs
  • Ideas Page
  • Downloads
Build Collabora Online

Are you interested in contributing but don’t know where to start? Head over documentation or start by following these step-by-step instructions and build CODE from scratch.

Build CODE

Build Collabora Online Development Edition. Choose your operating system or opt for using Gitpod (hack, build, debug and run entirely using a web-browser) from the list below for straightforward instructions to get you going quickly. If you are a seasoned developer with commit access, or just feeling extraordinarily brave, feel free to follow the general instructions.

GNU/Linux openSUSE GNU/Linux Debian (Ubuntu etc.) GNU/Linux Fedora GNU/Linux Arch (Manjaro etc.) GNU/Linux General Instructions Gitpod (Windows, Mac, Linux, etc)

Gitpod

On top of our daily LibreOffice core archives, we have also added integration support for Gitpod, a cloud based development environment. Now you can start hacking Collabora Online (COOL) in under ~5 minutes!

Steps to quick start:

  • Sign-up on Gitpod.io with your GitHub account
  • Install the proper extension for your browser
  • Go to COOL repo
  • Click on the green Gitpod button near the top of the GitHub repo page

GitPod green button on GitHub

  • Wait for a few minutes, and you will have a full development environment with COOL already cloned & built, ready-to-start/develop
Gitpod, your development environment for Collabora Online on the cloud
  • Don’t forget to fork the main repo |226x56
  • And set the remote address in .git/config to point to your fork’s address with this command:
git remote set-url origin https://github.com/PUT-YOUR-GITHUB-USERNAME-HERE/online.git

Happy hacking! : )

First published on Collabora Online Community Roundup #2

Running & Hacking

Now do:

make run

Among other, the output will contain the links that you can directly follow to see Writer, Calc, and Impress test documents in your browser.

Hacking it

When you change a JavaScript file (they are located under the browser/ subdirectory), you need to stop the existing CODE instance and issue make run again, because the files are cached. Alternatively you can export a variable like:

export COOL_SERVE_FROM_FS=1

to avoid the caching, so that you can just Shift+Reload the pages to see the new content.


openSUSE

The instructions below have been prepared for and tested on openSUSE Leap 15.3. You might need to do small adjustments for other releases.

Dependencies

We need LibreOffice core, POCO library and several other libraries and tools to build CODE. Open a terminal and follow the steps below.

# For Leap 15.3
zypper ar http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_Leap_15.3/devel:libraries:c_c++.repo

# For Leap 15.4
zypper ar http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_Leap_15.4/devel:libraries:c_c++.repo

If this is fresh instalation it might be worth install devel-basis pattern: Minimal set of tools for compiling and linking applications. It will bring in things like git, gcc, etc.

sudo zypper install -t pattern devel_basis

Now go ahead and install the following packages

zypper in poco-devel libcap-progs python3-polib libcap-devel npm libtool cppunit-devel pam-devel python3-lxml chromium

# If you are using Leap 15.4 please install this aditional compatability library
zypper in libpng-16-compat-devel

LibreOffice

CODE needs LibreOffice to be built to run. However, it takes a considerable amount of time and brings in extra complexity. So, we will instead download a daily built archive which contains only the pieces that are absolutely necessary. If you are working only on the online side, without doing any code-level changes on the LibreOffice core, or you just want to quickly get going to do some small fixes, then this will be enough for you. Otherwise, refer to the general instructions.

Now download a daily-built archive of LibreOffice core:

wget https://github.com/CollaboraOnline/online/releases/download/for-code-assets/core-co-22.05-assets.tar.gz

Extract the contents of the archive:

tar xvf core-co-22.05-assets.tar.gz

Export the location of the extracted contents as a variable before changing directory:

export LOCOREPATH=$(pwd)

# Or make it persistent as part of your .bashrc with
echo "export LOCOREPATH=$(pwd)" >> ~/.bashrc && source ~/.bashrc

Building CODE

You need to clone it, run autoconf/automake, configure and build using the GNU make. Before moving on, fork the repo if you haven’t done that yet.

Now clone the forked repo:

git clone https://github.com/YOURUSERNAME/online.git collabora-online

Switch to the local clone’s directory:

cd collabora-online

Run autogen to generate the configure file:

./autogen.sh

Run the generated configure script with proper parameters:

./configure --enable-silent-rules --with-lokit-path=${LOCOREPATH}/include \
            --with-lo-path=${LOCOREPATH}/instdir \
            --enable-debug --enable-cypress

Note: you can also add --disable-ssl instead of changing coolwsd.xml every time you want to disable ssl.

Start the actual build, which might take from a few minutes to half an hour (or more) depending on how powerful your machine is:

make -j $(nproc)

Running & Hacking

Now do:

make run

Among other, the output will contain the links that you can directly follow to see Writer, Calc, and Impress test documents in your browser.

Hacking it

When you change a JavaScript file (they are located under the browser/ subdirectory), you need to stop the existing CODE instance and issue make run again, because the files are cached. Alternatively you can export a variable like:

export COOL_SERVE_FROM_FS=1

to avoid the caching, so that you can just Shift+Reload the pages to see the new content.


Fedora

The instructions below have been prepared for and tested on Fedora 35. You might need to do small adjustments for Fedora-based distributions.

Dependencies

We need LibreOffice core, POCO library and several other libraries and tools to build CODE.

Open a terminal and follow the steps below:

sudo dnf install poco-devel gcc gcc-c++ python3-polib \
                 libtool libstdc++-devel libpng libpng-devel \
                 cppunit-devel nodejs-devel chromium

LibreOffice

CODE needs LibreOffice to be built to run. However, it takes a considerable amount of time and brings in extra complexity. So, we will instead download a daily built archive which contains only the pieces that are absolutely necessary. If you are working only on the online side, without doing any code-level changes on the LibreOffice core, or you just want to quickly get going to do some small fixes, then this will be enough for you. Otherwise, refer to the general instructions.

Now download a daily-built archive of LibreOffice core:

wget https://github.com/CollaboraOnline/online/releases/download/for-code-assets/core-co-22.05-assets.tar.gz

Extract the contents of the archive:

tar xvf core-co-22.05-assets.tar.gz

Export the location of the extracted contents as a variable before changing directory:

export LOCOREPATH=$(pwd)

# Or make it persistent as part of your .bashrc with
echo "export LOCOREPATH=$(pwd)" >> ~/.bashrc && source ~/.bashrc

Building CODE

You need to clone it, run autoconf/automake, configure and build using the GNU make. Before moving on, fork the repo if you haven’t done that yet.

Now clone the forked repo:

git clone https://github.com/YOURUSERNAME/online.git collabora-online

Switch to the local clone’s directory:

cd collabora-online

Run autogen to generate the configure file:

./autogen.sh

Run the generated configure script with proper parameters:

./configure --enable-silent-rules --with-lokit-path=${LOCOREPATH}/include \
            --with-lo-path=${LOCOREPATH}/instdir \
            --enable-debug --enable-cypress

Note: you can also add --disable-ssl instead of changing coolwsd.xml every time you want to disable ssl.

Start the actual build, which might take from a few minutes to half an hour (or more) depending on how powerful your machine is:

make -j $(nproc)

Running & Hacking

Now do:

make run

Among other, the output will contain the links that you can directly follow to see Writer, Calc, and Impress test documents in your browser.

Hacking it

When you change a JavaScript file (they are located under the browser/ subdirectory), you need to stop the existing CODE instance and issue make run again, because the files are cached. Alternatively you can export a variable like:

export COOL_SERVE_FROM_FS=1

to avoid the caching, so that you can just Shift+Reload the pages to see the new content.


Arch

The instructions below have been prepared for and tested on Manjaro 21.2.3. You might need to do small adjustments for Arch and/or other Arch-based distributions.

Dependencies

We need LibreOffice core, POCO library and several other libraries and tools to build CODE.

Open a terminal and follow the steps below:

sudo pacman -Syu libcap libcap-ng lib32-libcap libpng poco cppunit nodejs npm chromium python-lxml

Additionally you will need to install python-polib. You can do this using pip (as below) or using the python-polib AUR package

sudo pacman -Syu python-pip
sudo pip install polib

LibreOffice

CODE needs LibreOffice to be built to run. However, it takes a considerable amount of time and brings in extra complexity. So, we will instead download a daily built archive which contains only the pieces that are absolutely necessary. If you are working only on the online side, without doing any code-level changes on the LibreOffice core, or you just want to quickly get going to do some small fixes, then this will be enough for you. Otherwise, refer to the general instructions.

Now download a daily-built archive of LibreOffice core:

wget https://github.com/CollaboraOnline/online/releases/download/for-code-assets/core-co-22.05-assets.tar.gz

Extract the contents of the archive:

tar xvf core-co-22.05-assets.tar.gz

Export the location of the extracted contents as a variable before changing directory:

export LOCOREPATH=$(pwd)

# Or make it persistent as part of your .bashrc with
echo "export LOCOREPATH=$(pwd)" >> ~/.bashrc && source ~/.bashrc

Building CODE

You need to clone it, run autoconf/automake, configure and build using the GNU make. Before moving on, fork the repo if you haven’t done that yet.

Now clone the forked repo:

git clone https://github.com/YOURUSERNAME/online.git collabora-online

Switch to the local clone’s directory:

cd collabora-online

Run autogen to generate the configure file:

./autogen.sh

Run the generated configure script with proper parameters:

./configure --enable-silent-rules --with-lokit-path=${LOCOREPATH}/include \
            --with-lo-path=${LOCOREPATH}/instdir \
            --enable-debug --enable-cypress

Note: you can also add --disable-ssl instead of changing coolwsd.xml every time you want to disable ssl.

Start the actual build, which might take from a few minutes to half an hour (or more) depending on how powerful your machine is:

make -j $(nproc)

Running & Hacking

Now do:

make run

Among other, the output will contain the links that you can directly follow to see Writer, Calc, and Impress test documents in your browser.

Hacking it

When you change a JavaScript file (they are located under the browser/ subdirectory), you need to stop the existing CODE instance and issue make run again, because the files are cached. Alternatively you can export a variable like:

export COOL_SERVE_FROM_FS=1

to avoid the caching, so that you can just Shift+Reload the pages to see the new content.


Debian/Ubuntu

The instructions below have been prepared for and tested on Ubuntu 20.04 LTS, and tested on Debian GNU/Linux 11 (bullseye). You might need to do small adjustments for other releases.

Note: Sometimes Debian comes without sudo preinstalled. If you do not have sudo, you will need to run apt install -y sudo as root. It is not good enough to only run the commands which require sudo below as root, as sudo is also run during make

Dependencies

We need LibreOffice core, POCO library and several other libraries and tools to build CODE. Open a terminal and follow the steps below.

Lets start by installing the dialog package, which will be needed while installing some of the other packages:

sudo apt install -y dialog

Now install the rest of the required packages:

sudo apt install -y libpoco-dev python3-polib libcap-dev npm \
                    libpam-dev wget git build-essential libtool \
                    libcap2-bin python3-lxml libpng-dev libcppunit-dev \
                    pkg-config fontconfig chromium

LibreOffice

CODE needs LibreOffice to be built to run. However, it takes a considerable amount of time and brings in extra complexity. So, we will instead download a daily built archive which contains only the pieces that are absolutely necessary. If you are working only on the online side, without doing any code-level changes on the LibreOffice core, or you just want to quickly get going to do some small fixes, then this will be enough for you. Otherwise, refer to the general instructions.

Now download a daily-built archive of LibreOffice core:

wget https://github.com/CollaboraOnline/online/releases/download/for-code-assets/core-co-22.05-assets.tar.gz

Extract the contents of the archive:

tar xvf core-co-22.05-assets.tar.gz

Export the location of the extracted contents as a variable before changing directory:

export LOCOREPATH=$(pwd)

# Or make it persistent as part of your .bashrc with
echo "export LOCOREPATH=$(pwd)" >> ~/.bashrc && source ~/.bashrc

Building CODE

You need to clone it, run autoconf/automake, configure and build using the GNU make. Before moving on, fork the repo if you haven’t done that yet.

Now clone the forked repo:

git clone https://github.com/YOURUSERNAME/online.git collabora-online

Switch to the local clone’s directory:

cd collabora-online

Run autogen to generate the configure file:

./autogen.sh

Run the generated configure script with proper parameters:

./configure --enable-silent-rules --with-lokit-path=${LOCOREPATH}/include \
            --with-lo-path=${LOCOREPATH}/instdir \
            --enable-debug --enable-cypress

Note: you can also add --disable-ssl instead of changing coolwsd.xml every time you want to disable ssl.

Start the actual build, which might take from a few minutes to half an hour (or more) depending on how powerful your machine is:

make -j $(nproc)

Running & Hacking

Now do:

make run

Among other, the output will contain the links that you can directly follow to see Writer, Calc, and Impress test documents in your browser.

Hacking it

When you change a JavaScript file (they are located under the browser/ subdirectory), you need to stop the existing CODE instance and issue make run again, because the files are cached. Alternatively you can export a variable like:

export COOL_SERVE_FROM_FS=1

to avoid the caching, so that you can just Shift+Reload the pages to see the new content.


Build CODE & LO

Dependencies

The CODE must be built on Linux, and you need the following:

  • LibreOffice
    • you need to build your own tree
  • Poco library: http://pocoproject.org/
    • either use a package from your distro, or build it yourself (see below)
  • libpng, libcap-progs, libtool, automake, autoconf, pkg-config, sudo, pam
    • use the packages from your distro

You may also want to have the following optional dependencies:

  • Chromium
    • Needed for running cypress tests
  • The lxml and polib libraries for python
    • Needed for building javascript
    • These can both be installed via pip or your distro’s packages
  • Cppunit
    • Needed for unit tests
  • Node.js
    • Needed for building the JS parts (not needed if you build them on another linux machine)

LibreOffice

CODE needs LibreOffice to be built to run. However, you have two options to meet this requirement: either by building it locally (Option A - recommended), or by downloading a daily built archive (Option B - quick & dirty) which contains only the absolutely necessary pieces. If you are working only on the online side, without doing any code-level changes on the LibreOffice core, or you just want to quickly get going to do some small fixes, you may prefer the second way.

Option A - Build LibreOffice locally (Recommended)

To build LibreOffice, follow the LibreOffice building pages:

https://wiki.documentfoundation.org/Development/BuildingOnLinux

Make sure you use and build the following specific core branch: distro/collabora/co-22.05

Option B - Download a Daily-Built Archive of LibreOffice (Quick & Dirty)

Download the daily archive:

wget https://github.com/CollaboraOnline/online/releases/download/for-code-assets/core-co-22.05-assets.tar.gz

Extract the archive:

tar xvf core-co-22.05-assets.tar.gz

You should now have two new directories extracted: instdir and include. You will use the locations of these directories for the configure parameters in the following steps.

POCO

If you use openSUSE Leap 15.3, you can use:

zypper ar http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_Leap_15.3/devel:libraries:c_c++.repo
zypper in poco-devel libcap-progs python3-polib libcap-devel npm libtool cppunit-devel pam-devel python3-lxml

Similar repos exist for other openSUSE and SLE releases.

Collabora provides Poco packages for Debian 8, Debian 9, Ubuntu 16.04 LTS, and CentOS 7 via the CODE (Collabora Online Development Edition) repositories, see:

https://www.collaboraoffice.com/code/linux-packages/

Alternatively you can build your own POCO. In that case, ideally use a recent version like 1.10.1 or newer.

Building CODE

You need to clone it, run autoconf/automake, configure and build using the GNU make:

git clone https://github.com/YOURUSERNAME/online.git collabora-online

Switch to the local clone’s directory:

cd collabora-online
./autogen.sh
./configure --enable-silent-rules --with-lokit-path=${MASTER}/include \
            --with-lo-path=${MASTER}/instdir \
            --with-poco-includes=<POCOINST>/include --with-poco-libs=<POCOINST>/lib \
            --enable-debug --enable-cypress

Note: you can also add --disable-ssl instead of changing coolwsd.xml everytime you want to disable ssl.

make -j `nproc`

In the above, ${MASTER} is the location of the LibreOffice source tree you have built in the previous steps. POCOINST is the location of your custom-built or externally installed POCO library. If you use POCO from a distro package (not a self-built version), you can omit the --with-poco-includes and --with-poco-libs from the above.

If you want to run the unit tests, use make check instead of the make.

Note that the coolforkit program needs the CAP_SYS_CHROOT capability, thus you will be asked the root password when running make as it invokes sudo to run /sbin/setcap.

Running & Hacking

Now do:

make run

Among other, the output will contain the links that you can directly follow to see Writer, Calc, and Impress test documents in your browser.

Hacking it

When you change a JavaScript file (they are located under the browser/ subdirectory), you need to stop the existing CODE instance and issue make run again, because the files are cached. Alternatively you can export a variable like:

export COOL_SERVE_FROM_FS=1

to avoid the caching, so that you can just Shift+Reload the pages to see the new content.

Edit page

build make
  • Gitpod
    • Running & Hacking
  • openSUSE
    • Dependencies
    • LibreOffice
    • Building CODE
    • Running & Hacking
  • Fedora
    • Dependencies
    • LibreOffice
    • Building CODE
    • Running & Hacking
  • Arch
    • Dependencies
    • LibreOffice
    • Building CODE
    • Running & Hacking
  • Debian/Ubuntu
    • Dependencies
    • LibreOffice
    • Building CODE
    • Running & Hacking
  • Build CODE & LO
    • Dependencies
    • LibreOffice
    • POCO
    • Building CODE
    • Running & Hacking
Build for Android

Build for Android

Are you familiar with Android development environment and interested to learn more while helping the project?
Build for iOS

Build for iOS

Are you familiar with iOS development environment and interested to learn more while helping the project?

Unless a license is otherwise specified, content is under CC-BY-SA 3.0

Powered by Hugo with Chunky Poster.