
Deploy Marqius Kern
The Gotenberg-compatible PDF server: Gotenberg 8.x and 9.x APIs in 41 MB.
marqius-kern
Just deployed
Deploy and Host Marqius Kern on Railway
Marqius Kern is a PDF server that answers Gotenberg's API, 8.x and 9.x. It turns HTML pages, web addresses, Markdown, Word, Excel and PowerPoint files and emails into PDFs, and merges, splits and stamps PDFs. If your code already calls Gotenberg, point it at Marqius Kern and change nothing else.
About Hosting Marqius Kern
This template runs the official image, marqius/kern:latest, as one service:
- Ready when it is deployed. It has a public HTTPS address and a health check on
/health. You don't need to open ports or change any settings. - Protected from the start. Every route except
/healthasks for a username and password. The password is generated when you deploy. - Small. It is a 41 MB image with no Chromium or LibreOffice inside. It is ready in about 0.14 seconds and uses about 9 MB of memory after its first PDF, so it costs little to keep running.
Common Use Cases
- Invoices, reports and statements from your app's HTML templates.
- Word, Excel and PowerPoint files to PDF, with no office suite to install or watch over.
- Emails and mailboxes to archival PDFs. That covers .eml, .msg, .mbox, .pst and .ost files, with their attachments kept.
- Moving off Gotenberg. It answers 8.x requests and 9.x requests side by side, so you can upgrade your client code when it suits you.
Dependencies for Marqius Kern Hosting
- None: Marqius Kern is one service and needs no database or volume.
- Fonts for Chinese, Japanese, Korean, Thai and emoji text are fetched the first time such text appears, and again after a redeploy.
Implementation Details
Connect your app
From another service in the same Railway project, use the private address. Nothing leaves Railway's network:
GOTENBERG_URL=http://${{marqius-kern.RAILWAY_PRIVATE_DOMAIN}}:3000
From outside Railway, use the public address shown on the service, with the username and password from its Variables tab.
Try it:
curl -fsS https://YOUR-DOMAIN/health
curl -fsS -u gotenberg:YOUR-PASSWORD -F files=@index.html https://YOUR-DOMAIN/forms/chromium/convert/html -o page.pdf
curl -fsS -u gotenberg:YOUR-PASSWORD -F files=@report.docx https://YOUR-DOMAIN/forms/libreoffice/convert -o report.pdf
Gotenberg's client libraries work unchanged; set their address and credentials as you would for Gotenberg. You can find language-by-language setup in the switching guide and every route in the API reference.
Settings
| Variable | What it does |
|---|---|
GOTENBERG_API_BASIC_AUTH_USERNAME, GOTENBERG_API_BASIC_AUTH_PASSWORD | The credentials your app sends. The password is generated at deploy time. |
MARQIUS_LICENCE | Your licence key. Without one, the server works and logs that it has none. |
KERN_GOTENBERG_VERSION | The Gotenberg version reported at /version: 8.40.0, or 9.10.3 for code written for Gotenberg 9. Both APIs are answered either way. |
Every Gotenberg setting is accepted unchanged, as a variable or a flag: timeouts, allow and deny lists, webhooks and the rest.
Only your apps on Railway call it? Remove its public domain and set API_ENABLE_BASIC_AUTH to false. Apps that cannot send credentials, such as Paperless-ngx, can then reach it on the private address.
Converting pages other people send you? Set CHROMIUM_DENY_PRIVATE_IPS, API_DOWNLOAD_FROM_DENY_PRIVATE_IPS and WEBHOOK_DENY_PRIVATE_IPS to true. Then those pages cannot reach internal addresses. These switches are off by default, as in Gotenberg.
Proof and licence
- Proof in public: Gotenberg's own test suites, 8.40.0 and 9.10.3, and the tests of 12 client libraries and apps are run against both servers, with every result published: gotenberg-compatibility.
- Licence: personal projects, teaching and learning, and open-source projects are free with a Community key. Anything done by or for a business needs a paid licence.
Why Deploy Marqius Kern on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Marqius Kern on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
marqius-kern
marqius/kern:latest