Development

Gotenberg

Self-hosted PDF generation API — HTML, URLs and LibreOffice to PDF in one REST call.

About Gotenberg

Gotenberg (MIT, 8 k+ GitHub stars) is a Docker-based HTTP microservice for generating PDFs from HTML, URLs, Markdown and Office documents (DOCX, XLSX, PPTX) via a clean REST API. Drop it on a VPS and replace per-page SaaS PDF services with a fixed monthly cost. Chromium and LibreOffice are bundled in the single container — no extra dependencies. Use it to generate invoices, reports, contracts, or any document from your backend applications.

What gets installed

Ready when the VPS starts

Compatible OS
Ubuntu 24.04
Application
Gotenberg
Minimum RAM
500 MB minimum (Chromium rendering), 1 GB recommended
Minimum CPU
1 vCPU
Access
root over SSH

Key features

  • HTML→PDF via Chromium: full CSS, JavaScript and web font support.
  • URL→PDF: screenshot any web page server-side — useful for reports and archiving.
  • LibreOffice conversion: DOCX, XLSX, PPTX, ODP and more to PDF without Microsoft Office.
  • PDF merge: combine multiple PDF files into a single document in one call.
  • Stateless microservice: no database, no auth layer — add your reverse proxy in front.
  • MIT licence — no per-page or per-document billing.

When to use this solution?

Invoice and contract generation

Render your HTML invoice templates to PDF server-side and send them as email attachments or store them in S3. No per-document billing, no third-party access to your financial data.

Report export in SaaS products

Add a 'Download as PDF' button to your dashboard. Your backend sends the HTML report to Gotenberg and streams the PDF back to the user — no frontend library, no browser extension required.

Document format conversion pipeline

Convert uploaded DOCX or XLSX files to PDF for archiving, preview or signing workflows. Gotenberg's LibreOffice route handles the conversion without installing Office on your server.

Guide

Deploy Gotenberg on your VPS

  1. Deploy from the Marketplace

    Open the ServOrbit dashboard, go to Marketplace → Development → Gotenberg, and click Deploy. Docker pulls the gotenberg/gotenberg:8 image — it includes Chromium and LibreOffice — and starts the HTTP server on port 3000. The service is ready in under 30 seconds.

  2. Send your first HTML-to-PDF request

    From your application or a terminal, POST your HTML to the Chromium route: ` curl -s --request POST 'http://127.0.0.1:3000/forms/chromium/convert/html' \ --form '[email protected]' \ -o invoice.pdf` Gotenberg renders the page with a full Chromium instance and returns the PDF as a binary stream.

  3. Convert a URL to PDF

    To snapshot a live web page: ` curl -s --request POST 'http://127.0.0.1:3000/forms/chromium/convert/url' \ --form 'url=https://your-report-page.com' \ -o report.pdf` Useful for archiving dashboard views, generating weekly reports or capturing receipts.

  4. Add authentication

    Gotenberg has no built-in authentication. Protect the API by putting it behind a reverse proxy (nginx) with HTTP basic auth or by restricting access to an internal network only. The standard pattern is to keep port 3000 bound to 127.0.0.1 and call it from your application backend on the same server.

Frequently asked questions

Questions about Gotenberg

← Back to DevelopmentAll applications
Yes. Gotenberg is stateless and horizontally scalable. A single container handles dozens of concurrent requests; add more containers behind a load balancer for high-throughput workloads. The Chromium route supports concurrency settings via the --chromium-max-queue-size flag.

Embed the deploy button

Maintaining a project that uses Gotenberg? This button lets your readers deploy it on a VPS in one click, without reading Docker documentation.

Deploy Gotenberg on ServOrbit
Markdown
[![Deploy Gotenberg on ServOrbit](https://servorbit.com/brand/deploy/button.svg)](https://servorbit.com/vps-cloud?template=gotenberg&utm_source=deploy-badge&utm_medium=referral&utm_campaign=gotenberg)
HTML
<a href="https://servorbit.com/vps-cloud?template=gotenberg&utm_source=deploy-badge&utm_medium=referral&utm_campaign=gotenberg"><img src="https://servorbit.com/brand/deploy/button.svg" alt="Deploy Gotenberg on ServOrbit" height="40"></a>

The button points to a VPS order with the template preselected. The image is served from servorbit.com — nothing to host on your side.

Need help?

Browse our help center and FAQ, or reach our team — callback, WhatsApp or email.

Message us on WhatsAppopens in a new tab