> For the complete documentation index, see [llms.txt](https://help.form.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.form.io/reference/ports/pdf-server-ports.md). Agents can also search and read this documentation through its [MCP server](https://help.form.io/~gitbook/mcp).

# PDF Server Ports

#### Inbound

| Port     | Process    | Protocol                                | Set by            | Default | Notes                                                                                                    |
| -------- | ---------- | --------------------------------------- | ----------------- | ------- | -------------------------------------------------------------------------------------------------------- |
| **4005** | PDF server | HTTP, or HTTPS when `ENABLE_SSL` is set | `FORMIO_PDF_PORT` | `4005`  | Main API and the `/view` viewer. The only port clients need.                                             |
| **8080** | pdf-libs   | HTTP                                    | `PDFLIBS_PORT`    | `8080`  | Internal, in the same container. PDF-to-HTML conversion and form-field extraction. **Don't publish it.** |

#### Outbound

| Port          | Destination             | Set by                                      | Default                                           | Notes                                                                                          |
| ------------- | ----------------------- | ------------------------------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| **8080**      | pdf-libs (loopback)     | `PDFLIBS_URL`                               | `http://localhost:8080`                           | Must match `PDFLIBS_PORT`. The Dockerfile sets `PDFLIBS_URL=http://localhost:8080`.            |
| **4005**      | Itself (loopback)       | `FORMIO_VIEWER`, `PAGE_POOL_DEFAULT_VIEWER` | `http(s)://localhost:${FORMIO_PDF_PORT}/view/...` | Headless Chrome loads the viewer and `/resources` from the server's own port.                  |
| **443** or 80 | Enterprise API server   | `FORMIO_SERVER`                             | `https://api.form.io`                             | Otherwise the `x-host` request header is used.                                                 |
| **27017**     | MongoDB                 | `MONGO` (or `MONGO_PORT_27017_TCP_PORT`)    | `localhost:27017`, or `mongo:27017` inside Docker |                                                                                                |
| **8333**      | S3-compatible storage   | `FORMIO_S3_PORT`                            | `8333`                                            | A per-project storage setting can override it. Set it to `443` for AWS S3 or `9000` for MinIO. |
| 443           | Azure Blob              | `FORMIO_AZURE_CONNECTION_STRING`            | HTTPS                                             |                                                                                                |
| 443           | AWS Textract / SNS / S3 | `TEXTRACT_*`                                | HTTPS                                             | Used only when Textract is configured.                                                         |
| **443**       | License server          | `LICENSE_SERVER`                            | `https://license.form.io`                         |                                                                                                |
| 443           | PDF project             | `FORMIO_PDF_PROJECT`                        | none                                              |                                                                                                |
| any           | Proxy                   | `PROXY`, `HTTP_PROXY`, `HTTPS_PROXY`        | none                                              | Passed to Chrome with `--proxy-server`.                                                        |
| 4318          | OTLP collector          | `OTEL_*`                                    | SDK default                                       | Used only when telemetry is enabled.                                                           |

Headless Chrome is launched through Puppeteer with no fixed remote-debugging port, so it doesn't open a port you need to allow.

***

### Typical Deployment Settings

| From                    | To              | Port                                  |
| ----------------------- | --------------- | ------------------------------------- |
| Clients / load balancer | API server      | 80 (or your `PORT`)                   |
| Clients / API server    | PDF server      | 4005                                  |
| API server              | MongoDB         | 27017                                 |
| PDF server              | MongoDB         | 27017                                 |
| PDF server              | API server      | 80/443 (`FORMIO_SERVER`)              |
| PDF server              | S3 / MinIO      | 8333 by default (usually 443 or 9000) |
| Both                    | license.form.io | 443                                   |
| API server              | SMTP relay      | 587                                   |
| PDF server              | pdf-libs        | 8080 (loopback only)                  |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.form.io/reference/ports/pdf-server-ports.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
