---
type: WebPage
title: "Gotenberg “LibreOffice listener fails to start”: the fix | Marqius"
description: "Why Gotenberg’s LibreOffice does not start in time (“listener”,
  “socket not available”, “start timeout”) and how to fix it: a longer start
  timeout, auto-start, more memory."
resource: https://marqius.com/gotenberg/libreoffice-fails-to-start/
tags:
  - marqius
  - products-and-guides
status: stable
sources:
  - id: official-page
    resource: https://marqius.com/gotenberg/libreoffice-fails-to-start/
generated:
  by: process:marqius-site-build
  at: 2026-12-01T02:35:40.196Z
x_marqius:
  language: en
  source_sha256: bb6b650ceee43fda7317ad40bc5960d21e90807fc77bef611c92452da8c76db7
  extraction: public-main-content
---

GOTENBERG ERROR

# LibreOffice fails to start in Gotenberg

Gotenberg starts LibreOffice when it needs it and gives it 20 seconds to be ready. On a slow or busy machine, a NAS or a container short of memory, LibreOffice can take longer, and Gotenberg reports that it did not start. Give it longer with `--libreoffice-start-timeout`, start it with the container, and give the container more memory.

[Fix it in Gotenberg](https://marqius.com/gotenberg/libreoffice-fails-to-start/#fix) [See what Marqius Kern does](https://marqius.com/gotenberg/libreoffice-fails-to-start/#marqius-kern)

Gotenberg 8.34 to 8.40:

```
LibreOffice did not become available within the start timeout; increase --libreoffice-start-timeout or check system resources: context deadline exceeded
```

Gotenberg 7.10 to 8.33:

```
LibreOffice socket not available: context deadline exceeded
```

Gotenberg 7:

```
start long-running LibreOffice listener: execute LibreOffice listener: context done: context deadline exceeded
```

The app that sent the document usually sees `503 Service Unavailable`.

WHY IT HAPPENS

## Twenty seconds to start.

-   **The start takes longer than the start timeout.** `--libreoffice-start-timeout`, 20 seconds by default, bounds each start and each restart. Weak processors, NAS boxes and containers starting from cold can take longer.
-   **LibreOffice starts inside a request.** Unless told to start with the container, it starts with the first Office document, and again after every 10 conversions; a slow start then fails that request too.
-   **Not enough memory or CPU.** A container short of memory, with Chromium beside LibreOffice, can have its LibreOffice stopped as it starts.
-   **Old versions and hosts.** Some older Gotenberg images carried LibreOffice builds that started unreliably; Gotenberg 8.27 to 8.31 also kept failing after one failed start until the container was restarted (fixed in 8.32). Gotenberg’s documentation asks Debian hosts to run a current version of Debian.

FIX IT IN GOTENBERG

## A longer start, at start-up.

**1\. Give LibreOffice longer to start, and start it with the container.** In your compose file, add these lines to the `gotenberg` service:

```
   gotenberg:
     image: gotenberg/gotenberg:8
+    command:
+      - "gotenberg"
+      - "--libreoffice-start-timeout=60s"
+      - "--libreoffice-auto-start=true"
+      - "--api-timeout=120s"
```

If the service has a `command` already, as Paperless-ngx’s has, add only the three lines that start with `--`. The longer `--api-timeout` leaves room for a start inside a request. From Gotenberg 8.17 the same settings also work as environment variables: `LIBREOFFICE_START_TIMEOUT`, `LIBREOFFICE_AUTO_START` and `API_TIMEOUT`.

**2\. Start the service again, and wait until it reports LibreOffice up.** The second command asks the server’s health from inside its container, so it works whether or not the service publishes a port:

```
docker compose up -ddocker compose exec gotenberg curl --fail --silent --retry 30 --retry-delay 2 --retry-all-errors http://localhost:3000/health
```

**3\. If it still fails,** give the container more memory and CPU, and run the latest Gotenberg 8 image or Gotenberg 9. On a Synology NAS with Paperless-ngx, Gotenberg’s documentation points to a configuration users tested at length: more memory, a longer start timeout and API timeout, LibreOffice started with the container and never restarted.

OR SWITCH TO MARQIUS KERN

## Nothing to start.

Marqius Kern answers Gotenberg’s API and reads Word, Excel and PowerPoint files itself, with no LibreOffice inside, so there is no office suite to start, time or restart. It is ready in 0.14 seconds, and the first document converts like the hundredth.

In our test, a container given a fiftieth of a processor, as a slow machine gives it: Gotenberg 8 with its defaults answered the first Word file with 503 after 20 seconds, LibreOffice not started; with the fix above, LibreOffice was up after 37 seconds and the file converted. Marqius Kern converted it in under half a second.

The switch is the image line, then the same command:

```
-    image: gotenberg/gotenberg:8
+    image: marqius/kern
```

```
docker compose up -d
```

It takes the same flags, `--libreoffice-start-timeout` among them, which then has nothing to wait for. It reads Word, Excel, PowerPoint, OpenDocument, RTF and CSV files; rarer formats, such as PowerPoint 97-2003, OpenDocument drawings and Visio, are refused with the reason.

[How to switch, step by step](https://marqius.com/gotenberg/guide)

LICENCE

## Free for open source. Licensed for business.

**Personal, teaching and open-source use is free** with a Community licence, including open-source projects’ CI runs and documentation builds.

1.  **Get your free key** on marqius.com/licence/marqius-kern, then sign in with Google.
2.  Tick “I’ll use Marqius Kern only for personal, teaching or open-source work”.
3.  **Get my free key**, then **Copy key**.
4.  Set it as the variable `MARQIUS_LICENCE` on your server.

**Anything done by or for a business,** including internal tools and client work, needs a paid licence. [See the plans and prices](https://marqius.com/licence/marqius-kern).

QUESTIONS & ANSWERS

## Questions

### What does “LibreOffice listener fails to start” mean?

Gotenberg started LibreOffice to convert an Office file, and LibreOffice was not ready within the start timeout. Gotenberg 7 called LibreOffice’s connection a listener, 8 a socket; Gotenberg 8.34 and later say “did not become available within the start timeout”.

### What is Gotenberg’s LibreOffice start timeout?

20 seconds, set by --libreoffice-start-timeout (LIBREOFFICE\_START\_TIMEOUT from Gotenberg 8.17). It bounds every start and restart of LibreOffice.

### Why does it fail on a Synology NAS or a Raspberry Pi?

A slower processor and less memory make LibreOffice’s start longer than 20 seconds. Raise --libreoffice-start-timeout and --api-timeout, start LibreOffice with the container, and give the container more memory.

### Does --libreoffice-auto-start help?

Yes: LibreOffice then starts with the container, not inside the first request, so that request does not wait for it.

### Does Marqius Kern need LibreOffice?

No. It reads Word, Excel, PowerPoint, OpenDocument, RTF and CSV files itself, so there is nothing to start: it is ready in 0.14 seconds.

READY WHEN YOU ARE

## Change one line. Keep your documents.

Compare your own documents side by side first, as the switching guide shows, then switch.

[Read the switching guide](https://marqius.com/gotenberg/guide) [Get your free key](https://marqius.com/licence/marqius-kern)

Source for this page [^official-page].

[^official-page]: https://marqius.com/gotenberg/libreoffice-fails-to-start/

[Browse this section](index.md) · [Knowledge index](../index.md)
