Configuration
Gotenberg is configured via CLI flags or environment variables. Override the Docker image's default command to set them.
How To
With the Docker CLI:
docker run --rm -p "3000:3000" gotenberg/gotenberg:8 gotenberg --my-module-property=foo
Or with Docker Compose:
services:
# Your other services.
gotenberg:
image: gotenberg/gotenberg:8
command:
- "gotenberg"
- "--my-module-property=foo"
Override the command, not the entrypoint. See this issue for details.
You can also use environment variables. With the Docker CLI:
docker run --rm -p "3000:3000" -e MY_MODULE_PROPERTY=foo gotenberg/gotenberg:8
Or with Docker Compose:
services:
# Your other services.
gotenberg:
image: gotenberg/gotenberg:8
environment:
MY_MODULE_PROPERTY: "foo"
API
HTTP/1 and HTTP/2 (H2C) server.
| Flag | Environment variable | Description | Default |
|---|---|---|---|
| --api-port | API_PORT | Set the port on which the API should listen. | 3000 |
| --api-port-from-env | API_PORT_FROM_ENV | Set the environment variable with the port on which the API should listen - override the default port. | None |
| --api-bind-ip | API_BIND_IP | Set the IP address the API should bind to for incoming connections. | 0.0.0.0 |
| --api-tls-cert-file | API_TLS_CERT_FILE | Path to the TLS/SSL certificate file - for HTTPS support. | None |
| --api-tls-key-file | API_TLS_KEY_FILE | Path to the TLS/SSL key file - for HTTPS support. | None |
| --api-start-timeout | API_START_TIMEOUT | Set the time limit for the API to start. | 30s |
| --api-timeout | API_TIMEOUT | Set the time limit for requests. | 30s |
| --api-body-limit | API_BODY_LIMIT | Set the body limit for multipart/form-data requests - it accepts values like 5MB, 1GB, etc. | None |
| --api-root-path | API_ROOT_PATH | Set the root path of the API - for service discovery via URL paths | / |
| --api-correlation-id-header | API_CORRELATION_ID_HEADER | Set the header name to use for identifying requests. | Gotenberg-Trace |
| --api-enable-basic-auth | API_ENABLE_BASIC_AUTH | Enable basic authentication - will look for the GOTENBERG_API_BASIC_AUTH_USERNAME and GOTENBERG_API_BASIC_AUTH_PASSWORD environment variables. | false |
| --api-download-from-allow-list | API_DOWNLOAD_FROM_ALLOW_LIST | Set the allowed URLs for the download from feature using regular expressions. Accepts multiple patterns via comma-separated values or repeated flags. | All |
| --api-download-from-deny-list | API_DOWNLOAD_FROM_DENY_LIST | Set the denied URLs for the download from feature using regular expressions. Accepts multiple patterns via comma-separated values or repeated flags. | Internal ranges (see below) |
| --api-download-from-max-retry | API_DOWNLOAD_FROM_MAX_RETRY | Set the maximum number of retries for the download from feature. | 4 |
| --api-disable-download-from | API_DISABLE_DOWNLOAD_FROM | Disable the download from feature. | false |
| --api-disable-health-check-route-telemetry | API_DISABLE_HEALTH_CHECK_ROUTE_TELEMETRY | Disable telemetry for the health check route. | true |
| --api-disable-root-route-telemetry | API_DISABLE_ROOT_ROUTE_TELEMETRY | Disable telemetry for the root route. | true |
| --api-disable-debug-route-telemetry | API_DISABLE_DEBUG_ROUTE_TELEMETRY | Disable telemetry for the debug route. | true |
| --api-disable-version-route-telemetry | API_DISABLE_VERSION_ROUTE_TELEMETRY | Disable telemetry for the version route. | true |
| --api-enable-debug-route | API_ENABLE_DEBUG_ROUTE | Enable debug route. | false |
As of Gotenberg 8.29.0, --api-trace-header has been deprecated in favor of --api-correlation-id-header, and --api-disable-health-check-logging has been deprecated in favor of --api-disable-health-check-route-telemetry.
Since Gotenberg 8.31.0, --api-download-from-deny-list defaults to:
^https?://(10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.|169\.254\.|0\.0\.0\.0|127\.|localhost|\[::1\]|\[fd)
It blocks loopback, RFC1918, link-local, and IPv6 unique-local ranges. Gotenberg also resolves each target host and rejects non-public addresses, pinning the dial to the validated IP to prevent DNS rebinding. Set --api-download-from-allow-list to fetch from internal hosts. See Outbound URL Security.
Chromium
The Chromium module interacts with the Chromium browser to convert HTML documents to PDF.
A single Chromium browser manages the conversions in a stateful mode, enabling quicker single conversions. A Chromium browser can handle up to 6 parallel operations.
During periods of heavy load, incoming requests will accumulate in the queue until they are processed, time out, or the queue reaches its maximum capacity. In the latter case, the request will be terminated prematurely.
To maintain performance under a heavy load, consider increasing the number of Gotenberg instances.
Before Gotenberg 8.22.0, the amd64 image used Google Chrome (stable), while other architectures used Chromium.
Now all architectures use Chromium.
The following flags allow you to configure the Chromium module:
| Flag | Environment variable | Description | Default |
|---|---|---|---|
| --chromium-restart-after | CHROMIUM_RESTART_AFTER | Number of conversions after which Chromium will automatically restart. Set to 0 to disable this feature. | 100* |
| --chromium-max-queue-size | CHROMIUM_MAX_QUEUE_SIZE | Maximum request queue size for Chromium. Set to 0 to disable this feature. | 0 |
| --chromium-max-concurrency | CHROMIUM_MAX_CONCURRENCY | Maximum number of concurrent conversions. Chromium supports up to 6. | 6 |
| --chromium-auto-start | CHROMIUM_AUTO_START | Automatically launch Chromium upon initialization if set to true; otherwise, Chromium will start at the time of the first conversion. | false |
| --chromium-start-timeout | CHROMIUM_START_TIMEOUT | Maximum duration to wait for Chromium to start or restart. | 20s |
| --chromium-idle-shutdown-timeout | CHROMIUM_IDLE_SHUTDOWN_TIMEOUT | Shut down Chromium after this idle duration. Set to 0 to disable. | 0s |
| --chromium-allow-file-access-from-files | CHROMIUM_ALLOW_FILE_ACCESS_FROM_FILES | Allow file:// URIs to read other file:// URIs. | false |
| --chromium-allow-insecure-localhost | CHROMIUM_ALLOW_INSECURE_LOCALHOST | Ignore TLS/SSL errors on localhost. | false |
| --chromium-allow-list | CHROMIUM_ALLOW_LIST | Set the allowed URLs for Chromium using regular expressions. Accepts multiple patterns via comma-separated values or repeated flags. | All |
| --chromium-deny-list | CHROMIUM_DENY_LIST | Set the denied URLs for Chromium using regular expressions. Accepts multiple patterns via comma-separated values or repeated flags. | ^file:(?!//\/tmp/).* |
| --chromium-ignore-certificate-errors | CHROMIUM_IGNORE_CERTIFICATE_ERRORS | Ignore the certificate errors. | false |
| --chromium-disable-web-security | CHROMIUM_DISABLE_WEB_SECURITY | Don't enforce the same-origin policy. | false |
| --chromium-incognito | CHROMIUM_INCOGNITO | Deprecated. Ignored since Gotenberg 8.29.0. | false |
| --chromium-host-resolver-rules | CHROMIUM_HOST_RESOLVER_RULES | Set custom mappings to the host resolver. | None |
| --chromium-proxy-server | CHROMIUM_PROXY_SERVER | Set the outbound proxy server; this switch only affects HTTP and HTTPS requests. | None |
| --chromium-clear-cache | CHROMIUM_CLEAR_CACHE | Clear Chromium cache between each conversion. | false |
| --chromium-clear-cookies | CHROMIUM_CLEAR_COOKIES | Clear Chromium cookies between each conversion. | false |
| --chromium-disable-javascript | CHROMIUM_DISABLE_JAVASCRIPT | Disable JavaScript. | false |
| --chromium-disable-routes | CHROMIUM_DISABLE_ROUTES | Disable the routes. | false |
*Prior to Gotenberg 8.15.2, restarting Chromium resulted in zombie processes.
LibreOffice
The LibreOffice module interacts with LibreOffice to convert numerous documents to PDF, thanks to unoconv.
A single LibreOffice instance manages the conversions in a stateful mode, enabling quicker single conversions. However, due to a lock mechanism, a LibreOffice instance cannot execute parallel operations.
During periods of heavy load, incoming requests will accumulate in the queue until they are processed, time out, or the queue reaches its maximum capacity. In the latter case, the request will be terminated prematurely.
To maintain performance under a heavy load, consider increasing the number of Gotenberg instances.
The following flags allow you to configure the LibreOffice module:
| Flag | Environment variable | Description | Default |
|---|---|---|---|
| --libreoffice-restart-after | LIBREOFFICE_RESTART_AFTER | Number of conversions after which LibreOffice will automatically restart. Set to 0 to disable this feature. | 10 |
| --libreoffice-max-queue-size | LIBREOFFICE_MAX_QUEUE_SIZE | Maximum request queue size for LibreOffice. Set to 0 to disable this feature. | 0 |
| --libreoffice-auto-start | LIBREOFFICE_AUTO_START | Automatically launch LibreOffice upon initialization if set to true; otherwise, LibreOffice will start at the time of the first conversion. | false |
| --libreoffice-start-timeout | LIBREOFFICE_START_TIMEOUT | Maximum duration to wait for LibreOffice to start or restart. | 20s |
| --libreoffice-idle-shutdown-timeout | LIBREOFFICE_IDLE_SHUTDOWN_TIMEOUT | Shut down LibreOffice after this idle duration. Set to 0 to disable. | 0s |
| --libreoffice-disable-routes | LIBREOFFICE_DISABLE_ROUTES | Disable the routes. | false |
Switch Language
By default, LibreOffice uses the English language when it converts documents to PDF. You may override this behavior by building your own Docker image.
For instance, with the German language:
Gotenberg 8.23.1 and after
FROM gotenberg/gotenberg:8
USER root
RUN apt-get update -qq &&\
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends -t trixie-backports libreoffice-l10n-de &&\
sed -i '/de_DE.UTF-8/s/^# //g' /etc/locale.gen &&\
locale-gen &&\
# Cleanup.
# Note: the Debian image does automatically a clean after each install thanks to a hook.
# Therefore, there is no need for apt-get clean.
# See https://stackoverflow.com/a/24417119/3248473.
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV LANG de_DE.UTF-8
ENV LANGUAGE de_DE:de
ENV LC_ALL de_DE.UTF-8
USER gotenberg
Prior Gotenberg 8.22.0
FROM gotenberg/gotenberg:8
USER root
RUN apt-get update -qq &&\
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends -t bookworm-backports libreoffice-l10n-de &&\
sed -i '/de_DE.UTF-8/s/^# //g' /etc/locale.gen &&\
locale-gen &&\
# Cleanup.
# Note: the Debian image does automatically a clean after each install thanks to a hook.
# Therefore, there is no need for apt-get clean.
# See https://stackoverflow.com/a/24417119/3248473.
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV LANG de_DE.UTF-8
ENV LANGUAGE de_DE:de
ENV LC_ALL de_DE.UTF-8
USER gotenberg
PDF Engines
The PDF Engines module gathers all engines that can manipulate PDF files. It calls each engine until one successfully handles a task. A PDF engine is an external tool that Gotenberg leverages to perform a specific task, such as merging PDF files.
Currently, Gotenberg supports the following PDF engines:
| Feature | ExifTool | PDFtk | pdfcpu | QPDF | UNO |
|---|---|---|---|---|---|
| Merge | ❌ | ✅ | ✅ | ✅ | ❌ |
| Split | ❌ | ✅ | ✅ | ✅ | ❌ |
| Flatten | ❌ | ❌ | ❌ | ✅ | ❌ |
| Convert (PDF/A & PDF/UA) | ❌ | ❌ | ❌ | ❌ | ✅ |
| Read metadata | ✅ | ❌ | ❌ | ❌ | ❌ |
| Write metadata | ✅ | ❌ | ❌ | ❌ | ❌ |
| Encrypt | ❌ | ✅ | ✅ | ✅ | ❌ |
| Embed files | ❌ | ❌ | ✅ | ❌ | ❌ |
| Watermark | ❌ | ✅ | ✅ | ❌ | ❌ |
| Stamp | ❌ | ✅ | ✅ | ❌ | ❌ |
| Read bookmarks | ❌ | ❌ | ✅ | ❌ | ❌ |
| Write bookmarks | ❌ | ❌ | ✅ | ❌ | ❌ |
| Rotate | ❌ | ✅ | ✅ | ❌ | ❌ |
PDFtk and QPDF only support the split mode pages with unification.
PDFTk’s encryption feature requires both a user password and an owner password, and they must be different.
The encryption strength is limited to AES-128, contrary to other PDF engines (AES-256).
The following flags allow you to configure the PDF Engines module:
| Flag | Environment variable | Description | Default |
|---|---|---|---|
| --pdfengines-merge-engines | PDFENGINES_MERGE_ENGINES | Set the PDF engines and their order for the merge feature - empty means all. | qpdf,pdfcpu,pdftk |
| --pdfengines-split-engines | PDFENGINES_SPLIT_ENGINES | Set the PDF engines and their order for the split feature - empty means all. | pdfcpu,qpdf,pdftk |
| --pdfengines-flatten-engines | PDFENGINES_FLATTEN_ENGINES | Set the PDF engines and their order for the flatten feature - empty means all. | qpdf |
| --pdfengines-convert-engines | PDFENGINES_CONVERT_ENGINES | Set the PDF engines and their order for the convert feature - empty means all. | libreoffice-pdfengine |
| --pdfengines-read-metadata-engines | PDFENGINES_READ_METADATA_ENGINES | Set the PDF engines and their order for the read metadata feature - empty means all. | exiftool |
| --pdfengines-write-metadata-engines | PDFENGINES_WRITE_METADATA_ENGINES | Set the PDF engines and their order for the read metadata feature - empty means all. | exiftool |
| --pdfengines-encrypt-engines | PDFENGINES_ENCRYPT_ENGINES | Set the PDF engines and their order for the password protection feature - empty means all. | qpdf,pdftk,pdfcpu |
| --pdfengines-embed-engines | PDFENGINES_EMBED_ENGINES | Set the PDF engines and their order for the file embedding feature - empty means all. | qpdf,pdfcpu |
| --pdfengines-embed-metadata-engines | PDFENGINES_EMBED_METADATA_ENGINES | Set the PDF engines and their order for the embed metadata feature - empty means all. | qpdf |
| --pdfengines-watermark-engines | PDFENGINES_WATERMARK_ENGINES | Set the PDF engines and their order for the watermark feature - empty means all. | pdfcpu,pdftk |
| --pdfengines-stamp-engines | PDFENGINES_STAMP_ENGINES | Set the PDF engines and their order for the stamp feature - empty means all. | pdfcpu,pdftk |
| --pdfengines-write-bookmarks-engines | PDFENGINES_WRITE_BOOKMARKS_ENGINES | Set the PDF engines and their order for the write bookmarks feature - empty means all. | pdfcpu,pdftk |
| --pdfengines-read-bookmarks-engines | PDFENGINES_READ_BOOKMARKS_ENGINES | Set the PDF engines and their order for the read bookmarks feature - empty means all. | pdfcpu |
| --pdfengines-rotate-engines | PDFENGINES_ROTATE_ENGINES | Set the PDF engines and their order for the rotate feature - empty means all. | pdfcpu,pdftk |
| --pdfengines-disable-routes | PDFENGINES_DISABLE_ROUTES | Disable the routes. | false |
As of Gotenberg 8.13.0, the flag --pdfengines-engines has been deprecated.
Webhook
The webhook feature enables Gotenberg to upload the output file originating from multipart/form-data routes to a selected destination.
The following flags allow you to configure the Webhook module:
| Flag | Environment variable | Description | Default |
|---|---|---|---|
| --webhook-enable-sync-mode | WEBHOOK_ENABLE_SYNC_MODE | Enable synchronous mode for the webhook feature. | false |
| --webhook-allow-list | WEBHOOK_ALLOW_LIST | Set the allowed URLs for the webhook feature using regular expressions. Accepts multiple patterns via comma-separated values or repeated flags. | All |
| --webhook-deny-list | WEBHOOK_DENY_LIST | Set the denied URLs for the webhook feature using regular expressions. Accepts multiple patterns via comma-separated values or repeated flags. | Internal ranges (see below) |
| --webhook-error-allow-list | WEBHOOK_ERROR_ALLOW_LIST | Deprecated. Use --webhook-allow-list instead. | All |
| --webhook-error-deny-list | WEBHOOK_ERROR_DENY_LIST | Deprecated. Use --webhook-deny-list instead. | None |
| --webhook-max-retry | WEBHOOK_MAX_RETRY | Set the maximum number of retries for the webhook feature. | 4 |
| --webhook-retry-min-wait | WEBHOOK_RETRY_MIN_WAIT | Set the minimum duration to wait before trying to call the webhook again. | 1s |
| --webhook-retry-max-wait | WEBHOOK_RETRY_MAX_WAIT | Set the maximum duration to wait before trying to call the webhook again. | 30s |
| --webhook-client-timeout | WEBHOOK_CLIENT_TIMEOUT | Set the time limit for requests to the webhook. | 30s |
| --webhook-disable | WEBHOOK_DISABLE | Disable the webhook feature. | false |
As of Gotenberg 8.31.0, --webhook-error-allow-list has been deprecated in favor of --webhook-allow-list, and --webhook-error-deny-list has been deprecated in favor of --webhook-deny-list. Success and error callbacks now share the same allow/deny rules.
Since Gotenberg 8.31.0, --webhook-deny-list defaults to:
^https?://(10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.|169\.254\.|0\.0\.0\.0|127\.|localhost|\[::1\]|\[fd)
It blocks loopback, RFC1918, link-local, and IPv6 unique-local ranges. Gotenberg also resolves each target host and rejects non-public addresses, pinning the dial to the validated IP to prevent DNS rebinding. Set --webhook-allow-list to call internal hosts. See Outbound URL Security.
Prometheus
As of Gotenberg 8.29.0, the Prometheus module is deprecated. Use OpenTelemetry instead, including for migrating from Prometheus.
The Prometheus module collects metrics from other modules and exposes an HTTP endpoint that can be scraped by Prometheus.
The following flags allow you to configure the Prometheus module:
| Flag | Environment variable | Description | Default |
|---|---|---|---|
| --prometheus-metrics-path | PROMETHEUS_METRICS_PATH | Set the metrics endpoint path. | /prometheus/metrics |
| --prometheus-collect-interval | PROMETHEUS_COLLECT_INTERVAL | Set the interval for collecting modules' metrics. | 1s |
| --prometheus-namespace | PROMETHEUS_NAMESPACE | Set the namespace of modules' metrics. | gotenberg |
| --prometheus-disable-collect | PROMETHEUS_DISABLE_COLLECT | Disable the collect of metrics. | false |
| --prometheus-disable-route-telemetry | PROMETHEUS_DISABLE_ROUTE_TELEMETRY | Disable telemetry for the Prometheus metrics route. | true |
As of Gotenberg 8.29.0, --prometheus-disable-route-logging has been deprecated in favor of --prometheus-disable-route-telemetry.
Logging
Gotenberg uses slog-based structured logging. For exporting logs via OpenTelemetry, see Telemetry.
The following flags control stdout log output:
| Flag | Environment variable | Description | Default |
|---|---|---|---|
| --log-std-format | LOG_STD_FORMAT | Specify the format of logging. Options include auto, json, or text. | auto |
| --log-level | LOG_LEVEL | Choose the level of logging detail. Options include error, warn, info, or debug. | info |
| --log-fields-prefix | LOG_FIELDS_PREFIX | Prepend a specified prefix to each field in the logs. | None |
| --log-std-enable-gcp-fields | LOG_STD_ENABLE_GCP_FIELDS | Enable Google Cloud Platform fields: time, message, severity. | false |
As of Gotenberg 8.19.0, --log-enable-gcp-severity has been deprecated in favor of --log-enable-gcp-fields.
As of Gotenberg 8.29.0, --log-format has been deprecated in favor of --log-std-format, and --log-enable-gcp-fields has been deprecated in favor of --log-std-enable-gcp-fields.
Graceful Shutdown
To ensure running tasks have enough time to complete, Gotenberg waits for a specific duration before initiating the shutdown process.
The following flag allows you to configure this duration:
| Flag | Environment variable | Description | Default |
|---|---|---|---|
| --gotenberg-graceful-shutdown-duration | GOTENBERG_GRACEFUL_SHUTDOWN_DURATION | Set the graceful shutdown duration. | 30s |
For Gotenberg versions prior to 8.21.0, when using the webhook feature, make sure this duration is equal to or longer than the API timeout. This ensures that all asynchronous processes finish before Gotenberg begins its shutdown sequence.
Hide Banner
The following flag allows you to hide the startup banner with:
| Flag | Environment variable | Description | Default |
|---|---|---|---|
| --gotenberg-hide-banner | GOTENBERG_HIDE_BANNER | Hide the banner. | false |
Docker Image
The examples below use the full image (gotenberg/gotenberg:8). Replace the base image tag to match your variant
(:8-chromium, :8-libreoffice). See the installation guide for
available variants and their capabilities.
Fonts
Since 8.30.0, the font stack has been simplified from 30+ packages down to 8, covering Latin, Greek, Cyrillic, CJK, and most world scripts through Noto, plus color emoji.
| Package | Coverage |
|---|---|
fonts-noto-core | Arabic, Bengali, Devanagari, Ethiopic, Georgian, Gujarati, Gurmukhi, Hebrew, Kannada, Khmer, Lao, Malayalam, Myanmar, Sinhala, Tamil, Telugu, Thai, and more |
fonts-noto-cjk | Chinese, Japanese, Korean |
fonts-noto-color-emoji | Color emoji |
fonts-dejavu | Latin, Greek, Cyrillic |
fonts-crosextra-carlito | Metric-compatible with Calibri |
fonts-crosextra-caladea | Metric-compatible with Cambria |
fonts-liberation | Metric-compatible with Arial, Times New Roman, Courier New |
fonts-liberation2 | Updated Liberation metrics |
Microsoft Core Fonts (ttf-mscorefonts-installer) are not shipped due to licensing constraints. The image includes
metric-compatible replacements instead: Carlito for Calibri, Caladea for Cambria, and Liberation for Arial, Times New
Roman, and Courier New. These preserve document layout in most cases.
Installing Additional Fonts
Build a custom Dockerfile to add fonts. Three common scenarios:
Microsoft Core Fonts (you accept the Microsoft EULA):
FROM gotenberg/gotenberg:8
USER root
RUN echo "deb http://deb.debian.org/debian trixie contrib non-free" \
> /etc/apt/sources.list.d/contrib.list \
&& echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" \
| debconf-set-selections \
&& apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
ca-certificates \
wget \
ttf-mscorefonts-installer \
&& rm -rf /var/lib/apt/lists/*
USER gotenberg
Specialized script fonts for richer glyph sets, better hinting, or traditional typefaces beyond the basic Noto coverage:
| Script | Package |
|---|---|
| Arabic (Naskh) | fonts-hosny-amiri |
| Bengali | fonts-beng |
| Devanagari (Hindi) | fonts-sarai |
| Ethiopic | fonts-sil-abyssinica |
| Gujarati | fonts-samyak-gujr |
| Gurmukhi (Punjabi) | fonts-lohit-guru |
| Hebrew | culmus |
| Kannada | fonts-lohit-knda |
| Malayalam | fonts-samyak-mlym |
| Myanmar | fonts-sil-padauk |
| Sinhala | fonts-lklug-sinhala |
| Tamil | fonts-samyak-taml |
| Telugu | fonts-telu |
| Thai | fonts-thai-tlwg |
FROM gotenberg/gotenberg:8
USER root
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
fonts-hosny-amiri \
fonts-thai-tlwg \
&& rm -rf /var/lib/apt/lists/*
USER gotenberg
Custom .ttf files from your own collection:
FROM gotenberg/gotenberg:8
USER root
COPY /local/path/to/fonts/* /usr/local/share/fonts/
USER gotenberg
Alternatively, mount a volume to /usr/local/share/fonts/ at runtime as described in this
comment.
Ownership
The Docker image employs a specific non-root user, named gotenberg, with a User ID (uid) and Group ID (gid) of 1001. If you want to change these identifiers, you will have to build a custom Docker image:
FROM gotenberg/gotenberg:8
USER root
RUN usermod -u {uid} -g {gid} gotenberg
USER gotenberg
Since Gotenberg 8.21.0, the image also supports arbitrary user IDs (OpenShift).
Template Repository
Gotenberg comes with a template repository that you can use to quickly bootstrap your own variant:

