Build OnlyOffice from source code (2022)

Introduction

Onlyoffice is an online Office suite based on Web. It lets you to edit Microsoft Office documents such as docx, pptx, xlsx and other Open Document files such as odt, ods and odp.

In our Zimbra and Nextcloud SaaS service we offer Onlyoffice integration in order to view and edit documents. This article shows technically how to build OnlyOffice from the source code.

In addition to build OnlyOffice it will be modified to increase the default 20 simultaneous connections maximum limit to 99999 connections. It’s similar to an OnlyOffice without any limits. This is possible thanks to OnlyOffice AGPL license that let us to modify it.

This build has been possible thanks to bTactic I+D department.

Download

If you don’t have the technical expertise to build OnlyOffice yourself you can download our built packages from OnlyOffice v7.0.0.132-btactic-btactic release .
You are also advised to check our many services which include OnlyOffice integration such as Nextcloud and Zimbra. 
(Warning: This packages is not an official OnlyOffice build. If you find problems with it do not seek help on OnlyOffice official forums/trackers. In any case do it if you have manage to reproduce them in the original source code or OnlyOffice original binary packages.)

Build steps

Base system

Debian 11 Netinst with 16 GB RAM (8 GB RAM + 8 SWAP is a recommended minimum) and 50 GB HDD space.

System setup

sudo -i
# Enter user password

sudo apt-get update
 sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io

systemctl status docker
# docker.io start/running, process 14394

Get special tag

sudo -i
cd /root
git clone \
    --depth=1 \
    --recursive \
    --branch v7.0.0.132-btactic \
    https://github.com/btactic/build_tools.git \
    /root/build_tools
# Ignore detached head warning
cd /root/build_tools
mkdir out
docker build --tag onlyoffice-document-editors-builder .
docker run -e PRODUCT_VERSION='7.0.0' -e BUILD_NUMBER='132' -e NODE_ENV='production' -v $(pwd)/out:/build_tools/out onlyoffice-document-editors-builder /bin/bash -c 'cd tools/linux && python3 ./automate.py --branch=tags/v7.0.0.132-btactic'

Package DocumentServer Binaries

apt install build-essential m4 npm
npm install -g pkg

cd /root
git clone https://github.com/ONLYOFFICE/document-server-package.git
cd document-server-package/deb
apt build-dep ./
cd /root/document-server-package
# Workaround for my system where uname -p says: unknown
sed -i 's/TARGET := $(PLATFORM)_$(ARCHITECTURE)/TARGET := $(PLATFORM)_64/g' Makefile
# Workaround to avoid ending with an error
sed -i 's/--changes-option=-u./--changes-option=-u. --buildinfo-option=-u./g' Makefile

PRODUCT_VERSION='7.0.0' BUILD_NUMBER='132~btactic1' make deb

Package is built.

Package onlyoffice-documentserver_7.0.0-132~btactic1_amd64.deb package should be found at: /root/document-server-package/deb/ directory.

Usage

Just use standard documentation on how to install official Ubuntu packages such as: https://helpcenter.onlyoffice.com/installation/docs-community-install-ubuntu.aspx

However do not add OnlyOffice package repository and when you are asked to install onlyoffice-documentserver package you should do instead::

sudo apt-get install /path/to/onlyoffice-documentserver_7.0.0-132~btactic1_amd64.deb

Download

If you don’t have the technical expertise to build OnlyOffice yourself you can download our built packages from OnlyOffice v7.0.0.132-btactic-btactic release .
You are also advised to check our many services which include OnlyOffice integration such as Nextcloud and Zimbra. 
(Warning: This packages is not an official OnlyOffice build. If you find problems with it do not seek help on OnlyOffice official forums/trackers. In any case do it if you have manage to reproduce them in the original source code or OnlyOffice original binary packages.)

More info

For more technical details you can check: README-BUILD-DEBIAN-PACKAGE-NO-LIMITS.md.

7 thoughts on “Build OnlyOffice from source code (2022)”

  1. Thanks for this. Would be great to have (updated) .deb packages published in the Github repo for those, like me, who have almost zero technical knowledge and in our case, a small NGO, licences prices are prohibitif.

    Reply
    • Hello Peter, we offer a Nextcloud service with integrated Onlyoffice, in our infrastructure (Europe), but totally personalized for the client, who can manage and administer autonomously and totally independently, from 160 euros per year, with no limit of users (with 100 Gb capacity, expandable). If you are interested, I can give you more information.

      Reply

Leave a Comment