# Building Euro-Office Desktop Editors (.deb / .rpm)

Guide to building the **Euro-Office Desktop Editors** from source on Linux and
producing `.deb` and `.rpm` installers.

> **Status:** Euro-Office launched **2026-06-09** as a European "sovereign" fork
> of **OnlyOffice 9.3.x**. At launch only the browser-based editors shipped — the
> **desktop apps were intentionally not released**. Building them ourselves (as
> below) is the supported path; the upstream provides a Docker build pipeline.

---

## TL;DR

```sh
# 1. Install Docker Engine + buildx (see "Prerequisites")
# 2. Clone the meta-repo with submodules
git clone --recurse-submodules https://github.com/Euro-Office/DesktopEditors.git
cd DesktopEditors/build

# 3. Build the editors (binaries) -> build/deploy/desktop
docker buildx bake

# 4. Build the installers -> build/deploy/packages  (*.deb, *.rpm, *.tar.xz)
docker buildx bake packages
```

---

## What Euro-Office is

- A lightly-rebranded fork of **OnlyOffice**. Repo structure is 1:1
  (`core`, `sdkjs`, `web-apps`, `desktop-sdk`, `desktop-apps`, `dictionaries`,
  and the `DesktopEditors` meta-repo).
- Backed by a European industry initiative (IONOS, Nextcloud, Eurostack,
  XWiki, OpenProject, etc.) as an alternative to Microsoft 365 / Google
  Workspace. AGPLv3.
- **Current version:** `9.3.1` (tracks OnlyOffice 9.3.x). Default branch: `main`.

### Why the Docker Bake path (and not OnlyOffice `build_tools`)

Euro-Office did **not** fork OnlyOffice's `build_tools` orchestrator. Instead
they replaced it with a modern **Docker Buildx Bake** pipeline that lives in
`DesktopEditors/build/` and whose git submodules already point at the
`github.com/Euro-Office/*` forks. This is the documented, tested route and the
one that emits installers, so we use it.

> Retargeting OnlyOffice's `build_tools` is **not** recommended: its GitHub org
> is hardcoded (`owner = ... else "ONLYOFFICE"` in `scripts/base.py`), so it
> cannot be pointed at Euro-Office by config alone.

---

## Resource requirements

| Resource | Needed | Notes |
|---|---|---|
| Disk | **30–60+ GB free** | vcpkg + Docker layers are large |
| RAM | 8 GB min, 16 GB+ recommended | C++/Qt compile |
| CPU | more cores = faster | first build is long |
| Time | **~1–3+ hours** (first build) | subsequent builds cache |
| Network | several GB | submodules: `sdkjs` ~1.1 GB, `web-apps` ~1.3 GB, `core` ~850 MB |

---

## Prerequisites: Docker Engine + buildx

The pipeline needs `docker buildx bake`. The distro `docker.io` package is often
too old / lacks the bake feature, so install **Docker Engine from Docker's
official apt repo**.

### Ubuntu / Debian

```sh
# Add Docker's official repo
sudo apt-get update
sudo apt-get install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
  -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] \
  https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
  | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Install engine + buildx + compose plugins
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io \
  docker-buildx-plugin docker-compose-plugin

# Run docker without sudo (log out/in afterwards, or use `newgrp docker`)
sudo usermod -aG docker "$USER"
```

### WSL2 note

If you are **not** using Docker Desktop, start the daemon manually (WSL2 has no
systemd by default):

```sh
sudo dockerd > /tmp/dockerd.log 2>&1 &
# verify
docker version
docker buildx version
```

(If your WSL distro has systemd enabled, `sudo service docker start` works too.)

---

## Build steps

### 1. Clone with submodules

```sh
git clone --recurse-submodules https://github.com/Euro-Office/DesktopEditors.git
cd DesktopEditors
# If you forgot --recurse-submodules:
git submodule update --init --recursive
```

The `.gitmodules` already targets Euro-Office forks (all on `main`):
`desktop-apps`, `desktop-sdk`, `core`, `sdkjs`, `dictionaries`, `web-apps`,
`document-templates`, `core-fonts`, `sdkjs-forms`.

### 2. Build the editors

```sh
cd build
docker buildx bake
```

- Default group builds the `desktop-export` target.
- Output: **`build/deploy/desktop/`** (assembled DesktopEditors tree).
- Compiles C++/Qt via vcpkg + Ninja + CMake inside containers.

### 3. Build the installers

```sh
docker buildx bake packages
```

- Output: **`build/deploy/packages/`** containing `*.deb`, `*.rpm`, `*.tar.xz`.
- Internally runs (in an Ubuntu container):
  `make deb rpm tar BRANDING_DIR="." PRODUCT_VERSION="9.3.1" PACKAGE_EDITION=opensource`
  against `desktop-apps/package/Makefile`.
- Package name: `euro-office-desktopeditors`.

### Optional overrides

```sh
docker buildx bake packages \
  --set *.args.PRODUCT_VERSION=9.3.1 \
  --set *.args.BUILD_NUMBER=1
```

---

## Installing the result

```sh
# Debian / Ubuntu
sudo apt install ./build/deploy/packages/euro-office-desktopeditors_*.deb

# Fedora / RHEL
sudo dnf install ./build/deploy/packages/euro-office-desktopeditors-*.rpm

# openSUSE
sudo zypper install ./build/deploy/packages/euro-office-desktopeditors-*.rpm
```

---

## Bake targets reference (`build/docker-bake.hcl`)

| Variable | Default |
|---|---|
| `PRODUCT_VERSION` | `9.3.1` |
| `COMPANY_NAME` | `Euro-Office` |
| `PRODUCT_NAME` | `Desktop Editors` |
| `BUILD_NUMBER` | `0` |
| `REGISTRY` | `euro-office` |
| `TAG` | `latest` |

| Target | Purpose |
|---|---|
| `core-base` | base build image |
| `core-wasm` | wasm components |
| `desktop-js`, `sdkjs-desktop`, `web-apps` | JS/editor assets |
| `desktop-builder` | compile desktop binaries |
| `desktop-export` | **default** — assemble editors tree |
| `packages` | export `.deb`/`.rpm`/`.tar.xz` to `./deploy/packages` |

Groups: `default` → `[desktop-export]`; `deps` → `[core-base, desktop-js, sdkjs-desktop, web-apps]`.

Packaging Makefile targets (`desktop-apps/package/Makefile`):
`deb` (→ `dpkg-buildpackage`), `rpm` (→ `rpmbuild -bb`), `rpm-suse`, `tar`.

---

## Gotchas

1. **`docker buildx bake` builds editors only.** Run `docker buildx bake packages`
   for installers.
2. **Branches are `main`, not `master`.**
3. **Packaging path is `desktop-apps/package/`** (not the upstream
   `win-linux/package/linux/`).
4. **Disk pressure** from vcpkg + Docker layers — keep 30–60+ GB free; prune with
   `docker buildx prune` / `docker system prune` between attempts.
5. **No AppImage / Flatpak / Snap** from this pipeline — those need separate
   tooling.
6. Official Dockerfiles target **Ubuntu 24.04** containers; they run fine on a
   22.04 host. Native (non-Docker) builds are not the tested path.

---

## Source references (verified)

- Org & branches: `github.com/Euro-Office`, `api.github.com/orgs/Euro-Office/repos`
- Meta-repo: `Euro-Office/DesktopEditors` — `.gitmodules`, `build/README.md`,
  `build/docker-bake.hcl`, `build/.docker/*.bake.Dockerfile`, `CHANGELOG.md`
- Packaging: `Euro-Office/desktop-apps` — `package/Makefile`, `package/deb/`,
  `package/rpm/`, `.docker/desktop-apps.bake.Dockerfile`
- Upstream (for contrast): `ONLYOFFICE/build_tools` — `scripts/base.py`
