Skip to main content
A single Docker container that exposes the Forme render engine as an HTTP API. Same endpoints as the API reference, runs anywhere Docker runs. No Chromium, no LibreOffice, no database, no native dependencies.
PDF API on port 3000. That’s the whole install.

Quick Start

Docker run

Docker Compose

docker-compose.yml

Health check


API Endpoints

All SDKs work against the self-hosted server — their HTTP clients take a base URL.

Inline render

Pass the compiled template JSON and data directly in the request body. No template storage needed. Fully stateless.
The template field is the compiled document JSON tree — the output of forme build --template or serialize() in @formepdf/react. The data field is optional; when present, Forme evaluates template expressions ($ref, $each, $if) against it before rendering.

Template render

Mount a directory of pre-compiled JSON templates and reference them by slug (filename without .json).
Templates are loaded from disk on each request — no restart needed when templates change.

Certify

Redact

Merge

Rasterize

Returns { "pages": ["<base64 PNG>", ...] }. The rasterizer runs as a PDFium-based sidecar service on port 3001 inside the container. It starts automatically. Configure via RASTERIZER_URL if running separately.

Compiling Templates

The self-hosted container is a pure Rust binary with no Node.js runtime. This means .tsx templates must be compiled to JSON before mounting — the same way you’d compile TypeScript before deploying to production.
In your CI pipeline, add the build step alongside your existing TypeScript compilation:

Authentication

Optional. If FORME_API_KEY is not set, the API is open — suitable for local development or internal network use behind a firewall. If set, all /v1/* endpoints require:
The /health endpoint is always public.

Configuration

All configuration is via environment variables. No config files.

SDK Configuration

All Forme SDKs support a custom base URL. Point them at your self-hosted instance:

Deployment Examples

Kubernetes

Stateless — scales horizontally with no coordination needed.

With templates in Kubernetes

Mount templates from a ConfigMap or persistent volume:

Scope

The container is a pure render server: PDF in/out over HTTP, stateless, nothing persisted. Template management (editing, versioning, storage) lives in your codebase and deploy pipeline — compile .tsx to JSON in CI and mount the output, the same way you ship any built artifact. There is no queue, no webhook system, and no built-in document store; if you need those, compose them from your own infrastructure around the container.

Comparison

Gotenberg converts existing documents (HTML, Word, etc.). Forme generates from code templates. Different tools for different jobs.