---
title: "Deploy Gotenberg | (Just Updated) PDF API, Password-Locked From Boot"
description: "Gotenberg PDF API. Password on from boot, no fields to fill, public URL"
category: "Other"
url: https://railway.com/deploy/gotenberg-or-just-updated-pdf-api-passwo
---

# Deploy Gotenberg | (Just Updated) PDF API, Password-Locked From Boot

Gotenberg PDF API. Password on from boot, no fields to fill, public URL

**[Deploy Gotenberg | (Just Updated) PDF API, Password-Locked From Boot on Railway](https://railway.com/template/gotenberg-or-just-updated-pdf-api-passwo)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/gotenberg-or-just-updated-pdf-api-passwo/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** Other

## Template content

### gotenberg

- **Image:** gotenberg/gotenberg:8@sha256:f29984bd1e226bf1b93ba90af06000afa8b315853e99d27b9aaa41b93f15c769
- **Start command:** `/bin/sh -c 'export GOTENBERG_API_BASIC_AUTH_USERNAME=gotenberg; echo "[railway] gotenberg auth user=$GOTENBERG_API_BASIC_AUTH_USERNAME port=$PORT uid=$(id -u) tmp_writable=$(test -w /tmp && echo yes || echo no)"; exec /usr/bin/tini -- gotenberg --api-port-from-env=PORT --api-enable-basic-auth --chromium-auto-start --chromium-deny-private-ips --api-download-from-deny-private-ips --webhook-deny-private-ips'`
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host Gotenberg on Railway

Gotenberg is a stateless API that turns HTML, Markdown, URLs and Office files (Word, Excel,
PowerPoint, LibreOffice formats) into PDF, using headless Chromium and LibreOffice. It can also
merge, split, flatten and watermark PDFs. Apps in any language call it over HTTP instead of
bundling a browser of their own.

This template runs Gotenberg 8 as one service from the official image, pinned by digest, with a
public Railway domain and a password generated for every deploy.

## About Hosting Gotenberg

- **The API is password-protected from the first request.** A stock Gotenberg container is
  anonymous: anyone who finds the URL can render pages and convert files on your bill. Here basic
  auth is switched on at boot with the username `gotenberg` and a password generated for your
  deploy (`GOTENBERG_API_BASIC_AUTH_PASSWORD`). `/health` stays open so Railway can check the
  service.
- **Requests cannot reach your private network.** Chromium and URL downloads refuse private and
  internal addresses, so a caller cannot make the service fetch other services in your project.
- **Nothing to fill in.** There are no required fields on the deploy form, and no volume: Gotenberg
  keeps nothing between requests. Chromium starts with the container so the first conversion is
  not a cold start.
- **Memory.** Idle it holds roughly 370 MB; a service with 1 GB or more is comfortable, and large
  Office files or heavy pages need more.

## Common Use Cases

- Invoice, receipt and report PDFs rendered from HTML templates
- Converting uploaded Word, Excel and PowerPoint files to PDF
- Saving a web page as PDF, or taking a screenshot, from a backend job
- Merging and splitting PDFs in an automation or AI document pipeline

## Dependencies for Gotenberg Hosting

- None. A single service, no database and no volume.

### Deployment Dependencies

- Gotenberg project: https://github.com/gotenberg/gotenberg
- Documentation: https://gotenberg.dev/docs/getting-started/introduction

### Implementation Details

| Variable | Purpose |
| --- | --- |
| `GOTENBERG_API_BASIC_AUTH_PASSWORD` | Password for every API call except `/health`, generated per deploy. The username is `gotenberg`. |

```sh
curl -u gotenberg: \
  https:///forms/chromium/convert/url \
  --form url=https://example.com -o example.pdf
```

Inside the same Railway project use `http://gotenberg.railway.internal:8080` with the same
credentials.

## Why Deploy Gotenberg 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 Gotenberg 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.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/gotenberg-or-just-updated-pdf-api-passwo
