# Run IronPDF as a Remote Container
The IronPdfEngine is a standalone service which can handle the creating, writing, editing, and reading of PDFs. IronPDF Docker is ready to run docker services with compatible versions of IronPDF (v2023.2.x and above). This will help developers eradicate deployment issues that they may be experiencing with IronPDF.
## Why running IronPDF as its own container is a good idea
IronPDF requires both Chrome and Pdfium binaries in order to operate which are huge in file size (hundreds of MBs). It also requires several dependencies to be installed on the machine.
By using this method, your client will only take up a fraction of the size (in MB).
### Avoid Deployment Issues
It can be challenging to configure the environment/container to include all dependencies properly. Using the IronPDF Docker container means that IronPDF comes _pre-installed_ and _guaranteed_ to work, avoiding all deployment and dependency headaches.
## Versions
The IronPDF Docker tag is based on the version of IronPdfEngine itself. It is not the same version as the IronPDF product.
Each IronPDF version will have its own associated IronPdfEngine version. The version number **must** match the IronPDF Docker version.
For example, `IronPDF for Java` version `2023.2.1` requires IronPdfEngine version `2023.2.1`. You **cannot** use mismatched IronPdfEngine and IronPDF versions.
<hr />
## How to use IronPDF Docker
### Install IronPDF
Add the IronPdf.Slim Nuget package to your project.
[https://www.nuget.org/packages/IronPdf.Slim/](https://www.nuget.org/packages/IronPdf.Slim/)
**Note: `IronPdf`, `IronPdf.Linux` and `IronPdf.MacOs` packages all contain IronPdf.Slim.**
To reduce your application size, we recommend installing just IronPdf.Slim. Package `IronPdf.Native.Chrome.xxx` is no longer used, so you can remove it from your project.
### Determine Required Container Version
By default, the IronPDF for Docker version will match the current version of IronPDF on NuGet. You may use the code below to check the version manually:
```csharp
:path=/static-assets/pdf/content-code-examples/how-to/ironpdfengine-docker-version.cs
```
### Setup IronPDF for Docker Container
#### Without Docker Compose
Run the docker container using the version from the previous step.
* Docker must be installed.
**Setup**
1. Go to [https://hub.docker.com/r/ironsoftwareofficial/ironpdfengine](https://hub.docker.com/r/ironsoftwareofficial/ironpdfengine)
2. Pull the latest ironsoftwareofficial/ironpdfengine image
```shell
docker pull ironsoftwareofficial/ironpdfengine
```
Or pull the specific version (recommended)
```shell
docker pull ironsoftwareofficial/ironpdfengine:2026.7.2
```
3. Run the ironsoftwareofficial/ironpdfengine container.
This command will create a container and run it in the background with port 33350
```shell
docker run -d -p 33350:33350 -e IRONPDF_ENGINE_LICENSE_KEY=MY_LICENSE_KEY ironsoftwareofficial/ironpdfengine:2026.7.2
```
### How Do I Configure IronPdfEngine Runtime Parameters?
Runtime parameters can be passed directly to the container as `key=value` pairs after the image name. These configure engine behavior without rebuilding the image.
```shell
docker run -d -p 33350:33350 ironsoftwareofficial/ironpdfengine:2026.7.2 \
license_key="YOUR_LICENSE_KEY" \
enable_debug=true \
chrome_browser_limit=8
```
The following parameters are available:
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `port` | int | `33350` | gRPC listening port |
| `license_key` | string | - | IronPDF license key |
| `enable_debug` | bool | `false` | Enable full debug logging |
| `log_path` | path | - | Log file path (also enables full debug logging) |
| `logging_mode` | string | `Console` | Logging mode: None, Console, Custom, DebugOutputWindow, File, All |
| `chrome_browser_limit` | int | - | Maximum concurrent Chrome browser instances |
| `chrome_cache_path` | path | - | Directory for Chrome browser cache |
| `chrome_gpu_mode` | int | `0` | GPU mode: 0 Disabled, 1 Hardware, 2 HardwareFull, 3 Software |
| `chrome_custom_deployment_dir` | path | - | Custom directory for Chrome deployment binaries |
| `temp_folder_path` | path | - | Override temp directory |
| `skip_shutdown` | bool | `false` | Prevent engine from shutting down when idle |
| `skip_initialization` | bool | `false` | Skip Chrome/Pdfium initialization at startup |
| `keep_alive` | bool | `false` | Keep engine running after client disconnects |
| `single_process` | bool | - | Run Chrome in single-process mode |
| `linux_and_docker_auto_config` | bool | `true` | Auto-configure Linux/Docker dependencies (set automatically by the Docker entrypoint) |
| `send_anonymous_analytics_and_crash_data` | bool | - | Enable or disable anonymous telemetry |
[[i:(The `linux_and_docker_auto_config` parameter is set to true automatically by the Docker entrypoint. You do not need to pass it manually. The `chrome_gpu_mode` should remain 0 (Disabled) in Docker unless your host provides GPU passthrough.)]]
The `IRONPDF_ENGINE_LICENSE_KEY` environment variable can also be used to set the license key via `-e` or `environment:` in Docker Compose. Command-line parameters take precedence over environment variables when both are set.
**Production example:**
```shell
docker run -d --restart=unless-stopped \
-p 33350:33350 \
-e IRONPDF_ENGINE_LICENSE_KEY=MY_KEY \
ironsoftwareofficial/ironpdfengine \
chrome_browser_limit=8 skip_shutdown=true
```
**Debugging example:**
```shell
docker run -p 33350:33350 \
ironsoftwareofficial/ironpdfengine \
enable_debug=true log_path=/app/logs/engine.log
```
#### With Docker Compose
The key is to set up a Docker network that allows IronPdfEngine and your application to see each other. Set 'depends_on' to ensure that IronPdfEngine is up before your application starts.
**Setup**
1. Start by creating a `docker-compose.yml` file. Set up your Docker Compose file using the following template:
```yaml
version: '3.6'
services:
myironpdfengine:
container_name: ironpdfengine
image: ironsoftwareofficial/ironpdfengine:latest
ports:
- '33350:33350'
networks:
- ironpdf-network
myconsoleapp:
container_name: myconsoleapp
build:
# enter YOUR project directory path here
context: ./MyConsoleApp/
# enter YOUR dockerfile name here, relative to project directory
dockerfile: Dockerfile
networks:
- ironpdf-network
depends_on:
myironpdfengine:
condition: service_started
networks:
ironpdf-network:
driver: 'bridge'
```
1. Set the address of IronPdfEngine inside your application (myconsoleapp) to "myironpdfengine:33350"
2. Run docker compose
```shell
docker compose up --detach --force-recreate --remove-orphans --timestamps
```
### Connect to IronPdfEngine
Run your IronPDF code; your app now communicates with the IronPdfEngine in Docker!
```csharp
:path=/static-assets/pdf/content-code-examples/how-to/ironpdfengine-docker-use.cs
```
<hr />
### Connection Type
There are several `IronPdfConnectionType` that you can assign depending on the connection type you wish to make.
Here's a list of available properties:
**LocalExecutable:** To connect to an IronPdfEngine "server" running an executable on your local machine, we use this option. A quick example would be a WinForm invoicing application that generates PDFs locally without relying on cloud services.
**Docker:** This option should be used when trying to connect to a Docker container either locally or in the cloud.
**RemoteServer:** This option is used for IronPdfEngine in the cloud. This connects to a cloud-hosted (e.g., Docker) IronPdfEngine instance through the HTTP or HTTPS protocol. Note that, since this is connecting to a remote server, the full URL is required (including the HTTP or HTTPS protocol).
**Custom:** For full control and customization over the connection, you can use this option. This option uses your custom-defined **Grpc.Core.ChannelBase** instead of the other defined options from above. Developers can create a new channel by either creating a new **Grpc.Core.Channel** object or using **`Grpc.Net.Client.GrpcChannel.ForAddress(System.String)`** to custom and complete control over the gRPC channel.
#### .NET Framework with NetFrameworkChannel
For .NET Framework, we require a different setup because gRPC works differently in .NET Framework projects.
For this method to work, please ensure the [**Grpc.Core**](https://www.nuget.org/packages/grpc.core) NuGet package is installed. We'll be using a custom gRPC channel derived from **Grpc.Core.ChannelBase** for this specific setup.
Let's examine this example, where we'll implement the connection channel to create and save a PDF using IronPDFEngine.
[[t:(Since gRPC works differently in .NET Framework project, if the following code is not working try removing the `<http>` or `<https>` prefix in the address.)]]
[[w:(Do note that this `pdf.Dispose` is required in this case.)]]
```csharp
:path=/static-assets/pdf/content-code-examples/how-to/ironpdfengine-docker-use-grpc.cs
```
#### Alternative method with WithCustomChannel
An alternative method would be to utilize the `WithCustomChannel` method provided by the `IronPdf.GrpcLayer`.
The `WithCustomChannel` takes in two parameters, the `customChannel`, which is your custom gRPC channel, and `metadata`. The `metadata` parameter is optional and is set to `null` by default.
```csharp
:path=/static-assets/pdf/content-code-examples/how-to/ironpdfengine-docker-use-grpc-alt.cs
```
<hr />
## Deploy IronPdfEngine on AWS ECS
### Prerequisites
* Pull the IronPdfEngine Docker image. This is in the [Setup IronPDF for Docker Container](#anchor-setup-ironpdf-for-docker-container) above.
* An AWS account with access to ECS.
### Setup
1. Create an ECS Cluster. Follow this guide [to create a cluster for the Fargate and External launch types using the console](https://docs.aws.amazon.com/AmazonECS/latest/userguide/create-cluster-console-v2.html).
2. Create a task definition. Follow this guide for [creating a task definition using the console](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-task-definition.html).
Recommended settings:
* **AWS Fargate**
* A minimum 1 vCPU with 2 GB of RAM is recommended. Depending on your workload, if you are working with PDFs containing more than 10 pages or experiencing heavy load requests, please select a higher tier.
* **Network mode:** awsvpc
* **Port mappings:**
```json
{
"containerPort": 33350,
"hostPort": 33350,
"protocol": "tcp",
"appProtocol": "grpc"
}
```
* **Image URI:** point to any IronPdfEngine from us. For example, "ironsoftwareofficial/ironpdfengine:2026.7.2" (from DockerHub)
* **AWS Permission** & **Networking** are on your own
* **Enable Amazon CloudWatch** is recommended. (Enable logging)
* **Container startup order** is necessary if you want to deploy your application container in the same task definition.
3. Run a task definition. You could run a task definition as a **Task** or **Service**. Follow this guide on [creating a service using the console](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-service-console-v2.html).
Recommended settings:
* Launch type: **AWS Fargate**
* Public IP: **Turned on** for test and **Turned off** for production. Security and AWS Networking are on your own.
4. Enjoy! IronPdfEngine docker is up and running in your AWS!
[[i:(The IronPdfEngine Docker container itself does not support horizontal scaling; it is designed as a single-instance backend service. Your application using the IronPDF library (with or without IronPdfEngine) can still scale horizontally by deploying multiple application instances. See the [IronPdfEngine Limitation](/get-started/ironpdfengine/#anchor-ironpdfengine-limitation) for more details.)]]
<hr />
## Deploy IronPdfEngine on Azure Container Instances
### Prerequisites
* Pull the IronPdfEngine Docker image. This is in the [Setup IronPDF for Docker Container](#anchor-setup-ironpdf-for-docker-container) above.
* Azure Account
### Setup
1. Create an Azure Container. Follow this [quickstart guide on deploying a container instance in Azure using the Azure portal](https://learn.microsoft.com/en-us/azure/container-instances/container-instances-quickstart-portal).
Recommended settings:
* **Image source:** Other registry
* **Image:** **ironsoftwareofficial/ironpdfengine:2026.7.2** (from Docker Hub)
* **OS type:** Linux
* **Size:** Minimum of 1 vCPU and 2 GiB of memory, or higher
* **Port:** TCP Port 33350
2. Enjoy! IronPdfEngine docker is up and running in your Azure Container Instances!
[[i:(The IronPdfEngine Docker container does not support horizontal scaling; designed as a single-instance backend service. Your application using the IronPDF library (with or without IronPdfEngine) can still scale horizontally by deploying multiple application instances. See the [IronPdfEngine Limitation](/get-started/ironpdfengine/#anchor-ironpdfengine-limitation) for more information.)]]
<hr />
## Getting IronPdfEngine in AWS ECR Public Gallery
### Prerequisite
* Docker must be installed.
### Setup
1. Go to [https://gallery.ecr.aws/v1m9w8y1/ironpdfengine](https://gallery.ecr.aws/v1m9w8y1/ironpdfengine)
2. Pull the v1m9w8y1/ironpdfengine image
```shell
docker pull https://gallery.ecr.aws/v1m9w8y1/ironpdfengine
```
Or pull the specific version (recommended)
```shell
docker pull https://gallery.ecr.aws/v1m9w8y1/ironpdfengine:2026.7.2
```
3. Run ironpdfengine container.
This command will create a container and run it in the background with port 33350
```shell
docker run -d -p 33350:33350 ironsoftwareofficial/ironpdfengine
```
Learn how to configure the IronPDF client to utilize IronPdfEngine by navigating to the section "[Update the Code to Use IronPdfEngine](#anchor-update-the-code-to-use-ironpdfengine)."
<hr />
## Get IronPdfEngine from the Marketplace
To help you get started quickly, we have set up IronPdfEngine on both the Azure and AWS Marketplaces.
### Azure Marketplace
<div class="content-img-align-center">
<div class="center-image-wrapper">
<a href="https://azuremarketplace.microsoft.com/en-us/marketplace/apps/ironsoftwarecoltd1682560478296.ironpdf-docker-container-v1?tab=Overview"><img src="/static-assets/pdf/how-to/pull-run-ironpdfengine/azure-marketplace.webp" alt="Azure Marketplace" class="img-responsive add-shadow" /></a>
</div>
</div>
**Setup**
1. Go to [IronPDF Docker Container on Azure Marketplace](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/ironsoftwarecoltd1682560478296.ironpdf-docker-container-v1?tab=Overview). Click on the "Get It Now" and "Continue."
2. Complete the "Basics", "Cluster Details", and "Application Details" to create the Kubernetes service.
3. Once the deployment has completed, navigate to the left sidebar and select Kubernetes resources> Run command. Run the following command:
```shell
kubectl get services
```
<div class="content-img-align-center">
<div class="center-image-wrapper">
<img src="/static-assets/pdf/how-to/pull-run-ironpdfengine/azure-market-run-command.webp" alt="Kubernetes service - run command" class="img-responsive add-shadow" />
</div>
</div>
With the information of EXTERNAL-IP and PORT(S), you can configure the IronPDFEngine connection accordingly.
```csharp
:path=/static-assets/pdf/content-code-examples/how-to/pull-run-ironpdfengine-azure-marketplace.cs
```
### AWS Marketplace
<div class="content-img-align-center">
<div class="center-image-wrapper">
<a href="https://aws.amazon.com/marketplace/pp/prodview-t66wmni5ri7ve?sr=0-1&ref_=beagle&applicationId=AWSMPContessa"><img src="/static-assets/pdf/how-to/pull-run-ironpdfengine/aws-marketplace.webp" alt="aws marketplace" class="img-responsive add-shadow" /></a>
</div>
</div>
**Prerequisites**
* Docker must be installed.
* AWS CLI must be installed and logged in.
**Setup**
1. Go to [IronPdfEngine on AWS marketplace](https://aws.amazon.com/marketplace/pp/prodview-t66wmni5ri7ve?sr=0-1&ref_=beagle&applicationId=AWSMPContessa). Click on the 'Continue to Subscribe.'
3. Accept the Terms.
<div class="content-img-align-center">
<div class="center-image-wrapper">
<img src="/static-assets/pdf/how-to/pull-run-ironpdfengine/accept-EULA.webp" alt="Accept EULA" class="img-responsive add-shadow" />
</div>
</div>
4. Continue to Configuration.
<div class="content-img-align-center">
<div class="center-image-wrapper">
<img src="/static-assets/pdf/how-to/pull-run-ironpdfengine/subscribe-complete.webp" alt="Subscribe complete" class="img-responsive add-shadow" />
</div>
</div>
5. Pull the ironpdfengine image. This step will show you a command to pull the ironpdfengine image.
<div class="content-img-align-center">
<div class="center-image-wrapper">
<img src="/static-assets/pdf/how-to/pull-run-ironpdfengine/launch-this-software.webp" alt="Launch this software" class="img-responsive add-shadow" />
</div>
</div>
For Example:
```shell
aws ecr get-login-password \
--region us-east-1 | docker login \
--username AWS \
--password-stdin 000000000000.dkr.ecr.us-east-1.amazonaws.com
CONTAINER_IMAGES="000000000000.dkr.ecr.us-east-1.amazonaws.com/iron-software/ironpdfengine:2026.7.2"
for i in $(echo $CONTAINER_IMAGES | sed "s/,/ /g"); do docker pull $i; done
```
6. Run the ironpdfengine container. This command will create a container and run it in the background with port 33350.
```shell
docker run -d -p 33350:33350 000000000000.dkr.ecr.us-east-1.amazonaws.com/iron-software/ironpdfengine:2026.7.2
```
## Health Check For IronPdfEngine
Checking on the health of your Docker Container is crucial for ensuring reliability and availability in a production environment. The ability to check for the IronPdfEngine Docker container allows developers to restart the service if it fails, as well as scale resources if the demand increases, along with monitoring a continuous application.
To check on the health of your IronPdfEngine, we can send a gRPC request to the same IronPdfEngine port (by default, it would be 33350) to verify if we get a response.
### Health Check with gRPC
IronPdfEngine adheres to the standard gRPC health check pattern, utilizing the following protocol structure.
```protobuf
message HealthCheckRequest {
string service = 1; // Name of the service to check (e.g., "IronPdfEngine")
}
```
Since we're checking for IronPdfEngine, we replace the service name with `IronPdfEngine`.
Here's an example using JavaScript with [Postman](https://www.postman.com) to send a gRPC request to the local IronPdfEngine service with the default number of 33350.
<div class="content-img-align-center">
<div class="center-image-wrapper">
<img src="/static-assets/pdf/how-to/Ironpdfengine-docker/servicestatus.webp" alt="Status" class="img-responsive add-shadow" />
</div>
</div>
As you can see from the response, the status response is `SERVING`, indicating the service is up and running. If the container is not healthy, the status response would be `NOT_SERVING`.
### Health Check with Kubernetes Setup
For Kubernetes setups, we can use the following to check whether the service is healthy or not.
```yaml
livenessProbe:
exec:
command:
- /bin/grpc_health_probe
- -addr=:33350
- -rpc-timeout=5s
```
The IronPdfEngine is a standalone service which can handle the creating, writing, editing, and reading of PDFs. IronPDF Docker is ready to run docker services with compatible versions of IronPDF (v2023.2.x and above). This will help developers eradicate deployment issues that they may be experiencing with IronPDF.
Why running IronPDF as its own container is a good idea
IronPDF requires both Chrome and Pdfium binaries in order to operate which are huge in file size (hundreds of MBs). It also requires several dependencies to be installed on the machine.
By using this method, your client will only take up a fraction of the size (in MB).
Avoid Deployment Issues
It can be challenging to configure the environment/container to include all dependencies properly. Using the IronPDF Docker container means that IronPDF comes pre-installed and guaranteed to work, avoiding all deployment and dependency headaches.
Versions
The IronPDF Docker tag is based on the version of IronPdfEngine itself. It is not the same version as the IronPDF product.
Each IronPDF version will have its own associated IronPdfEngine version. The version number must match the IronPDF Docker version.
For example, IronPDF for Java version 2023.2.1 requires IronPdfEngine version 2023.2.1. You cannot use mismatched IronPdfEngine and IronPDF versions.
How to use IronPDF Docker
Install IronPDF
Add the IronPdf.Slim Nuget package to your project.
Note: IronPdf, IronPdf.Linux and IronPdf.MacOs packages all contain IronPdf.Slim.
To reduce your application size, we recommend installing just IronPdf.Slim. Package IronPdf.Native.Chrome.xxx is no longer used, so you can remove it from your project.
Determine Required Container Version
By default, the IronPDF for Docker version will match the current version of IronPDF on NuGet. You may use the code below to check the version manually:
Run the ironsoftwareofficial/ironpdfengine container.
This command will create a container and run it in the background with port 33350
docker run -d -p 33350:33350 -e IRONPDF_ENGINE_LICENSE_KEY=MY_LICENSE_KEY ironsoftwareofficial/ironpdfengine:2026.7.2
docker run -d -p 33350:33350 -e IRONPDF_ENGINE_LICENSE_KEY=MY_LICENSE_KEY ironsoftwareofficial/ironpdfengine:2026.7.2
SHELL
How Do I Configure IronPdfEngine Runtime Parameters?
Runtime parameters can be passed directly to the container as key=value pairs after the image name. These configure engine behavior without rebuilding the image.
Auto-configure Linux/Docker dependencies (set automatically by the Docker entrypoint)
send_anonymous_analytics_and_crash_data
bool
-
Enable or disable anonymous telemetry
Please note: The linux_and_docker_auto_config parameter is set to true automatically by the Docker entrypoint. You do not need to pass it manually. The chrome_gpu_mode should remain 0 (Disabled) in Docker unless your host provides GPU passthrough.
The IRONPDF_ENGINE_LICENSE_KEY environment variable can also be used to set the license key via -e or environment: in Docker Compose. Command-line parameters take precedence over environment variables when both are set.
docker run -p 33350:33350 \ ironsoftwareofficial/ironpdfengine \ enable_debug=true log_path=/app/logs/engine.log
docker run -p 33350:33350 \
ironsoftwareofficial/ironpdfengine \
enable_debug=true log_path=/app/logs/engine.log
SHELL
With Docker Compose
The key is to set up a Docker network that allows IronPdfEngine and your application to see each other. Set 'depends_on' to ensure that IronPdfEngine is up before your application starts.
Setup
Start by creating a docker-compose.yml file. Set up your Docker Compose file using the following template:
version: '3.6'services: myironpdfengine: container_name: ironpdfengine image: ironsoftwareofficial/ironpdfengine:latest ports: - '33350:33350' networks: - ironpdf-network myconsoleapp: container_name: myconsoleapp build: # enter YOUR project directory path here context: ./MyConsoleApp/ # enter YOUR dockerfile name here, relative to project directory dockerfile: Dockerfile networks: - ironpdf-network depends_on: myironpdfengine: condition: service_startednetworks: ironpdf-network: driver: 'bridge'
version: '3.6'
services:
myironpdfengine:
container_name: ironpdfengine
image: ironsoftwareofficial/ironpdfengine:latest
ports:
- '33350:33350'
networks:
- ironpdf-network
myconsoleapp:
container_name: myconsoleapp
build:
# enter YOUR project directory path here
context: ./MyConsoleApp/
# enter YOUR dockerfile name here, relative to project directory
dockerfile: Dockerfile
networks:
- ironpdf-network
depends_on:
myironpdfengine:
condition: service_started
networks:
ironpdf-network:
driver: 'bridge'
Text
Set the address of IronPdfEngine inside your application (myconsoleapp) to "myironpdfengine:33350"
Run docker compose
docker compose up --detach --force-recreate --remove-orphans --timestamps
docker compose up --detach --force-recreate --remove-orphans --timestamps
SHELL
Connect to IronPdfEngine
Run your IronPDF code; your app now communicates with the IronPdfEngine in Docker!
using IronPdf;using IronPdf.GrpcLayer;// Configure for Docker containervar config = IronPdfConnectionConfiguration.Docker;config.Host = "localhost";IronPdf.Installation.ConnectToIronPdfHost(config);// Use IronPDFChromePdfRenderer renderer = new ChromePdfRenderer();PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Hello IronPDF Docker!<h1>");pdf.SaveAs("ironpdf.pdf");
using IronPdf;
using IronPdf.GrpcLayer;
// Configure for Docker container
var config = IronPdfConnectionConfiguration.Docker;
config.Host = "localhost";
IronPdf.Installation.ConnectToIronPdfHost(config);
// Use IronPDF
ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Hello IronPDF Docker!<h1>");
pdf.SaveAs("ironpdf.pdf");
ImportsIronPdfImportsIronPdf.GrpcLayer' Configure for Docker containerPrivate config = IronPdfConnectionConfiguration.Dockerconfig.Host = "localhost"IronPdf.Installation.ConnectToIronPdfHost(config)' Use IronPDFDim renderer As New ChromePdfRenderer()Dim pdf AsPdfDocument = renderer.RenderHtmlAsPdf("<h1>Hello IronPDF Docker!<h1>")pdf.SaveAs("ironpdf.pdf")
Imports IronPdf
Imports IronPdf.GrpcLayer
' Configure for Docker container
Private config = IronPdfConnectionConfiguration.Docker
config.Host = "localhost"
IronPdf.Installation.ConnectToIronPdfHost(config)
' Use IronPDF
Dim renderer As New ChromePdfRenderer()
Dim pdf As PdfDocument = renderer.RenderHtmlAsPdf("<h1>Hello IronPDF Docker!<h1>")
pdf.SaveAs("ironpdf.pdf")
Connection Type
There are several IronPdfConnectionType that you can assign depending on the connection type you wish to make.
Here's a list of available properties:
LocalExecutable: To connect to an IronPdfEngine "server" running an executable on your local machine, we use this option. A quick example would be a WinForm invoicing application that generates PDFs locally without relying on cloud services.
Docker: This option should be used when trying to connect to a Docker container either locally or in the cloud.
RemoteServer: This option is used for IronPdfEngine in the cloud. This connects to a cloud-hosted (e.g., Docker) IronPdfEngine instance through the HTTP or HTTPS protocol. Note that, since this is connecting to a remote server, the full URL is required (including the HTTP or HTTPS protocol).
Custom: For full control and customization over the connection, you can use this option. This option uses your custom-defined Grpc.Core.ChannelBase instead of the other defined options from above. Developers can create a new channel by either creating a new Grpc.Core.Channel object or using Grpc.Net.Client.GrpcChannel.ForAddress(System.String) to custom and complete control over the gRPC channel.
.NET Framework with NetFrameworkChannel
For .NET Framework, we require a different setup because gRPC works differently in .NET Framework projects.
For this method to work, please ensure the Grpc.Core NuGet package is installed. We'll be using a custom gRPC channel derived from Grpc.Core.ChannelBase for this specific setup.
Let's examine this example, where we'll implement the connection channel to create and save a PDF using IronPDFEngine.
Tips: Since gRPC works differently in .NET Framework project, if the following code is not working try removing the <http> or <https> prefix in the address.
Warning: Do note that this pdf.Dispose is required in this case.
using IronPdf;// This code demonstrates how to use IronPdf with gRPC in a .NET Framework application.// 1. Configure connection to use local IronPdfEngine executablevar config = IronPdf.GrpcLayer.IronPdfConnectionConfiguration.Executable;// 2. Connect to the IronPDF host with the executable configurationIronPdf.Installation.ConnectToIronPdfHost(config);// 3. Create a PDF renderer instanceChromePdfRenderer renderer = new ChromePdfRenderer();// 4. Render HTML string as PDF documentPdfDocument pdf = renderer.RenderHtmlAsPdf("Hello world");// 5. Save the PDF to diskpdf.SaveAs("output.pdf");// 6. Clean up , this is needed to workpdf.Dispose();
using IronPdf;
// This code demonstrates how to use IronPdf with gRPC in a .NET Framework application.
// 1. Configure connection to use local IronPdfEngine executable
var config = IronPdf.GrpcLayer.IronPdfConnectionConfiguration.Executable;
// 2. Connect to the IronPDF host with the executable configuration
IronPdf.Installation.ConnectToIronPdfHost(config);
// 3. Create a PDF renderer instance
ChromePdfRenderer renderer = new ChromePdfRenderer();
// 4. Render HTML string as PDF document
PdfDocument pdf = renderer.RenderHtmlAsPdf("Hello world");
// 5. Save the PDF to disk
pdf.SaveAs("output.pdf");
// 6. Clean up , this is needed to work
pdf.Dispose();
ImportsIronPdf' This code demonstrates how to use IronPdf with gRPC in a .NET Framework application.' 1. Configure connection to use local IronPdfEngine executableDim config = IronPdf.GrpcLayer.IronPdfConnectionConfiguration.Executable' 2. Connect to the IronPDF host with the executable configurationIronPdf.Installation.ConnectToIronPdfHost(config)' 3. Create a PDF renderer instanceDim renderer As New ChromePdfRenderer()' 4. Render HTML string as PDF documentDim pdf AsPdfDocument = renderer.RenderHtmlAsPdf("Hello world")' 5. Save the PDF to diskpdf.SaveAs("output.pdf")' 6. Clean up, this is needed to workpdf.Dispose()
Imports IronPdf
' This code demonstrates how to use IronPdf with gRPC in a .NET Framework application.
' 1. Configure connection to use local IronPdfEngine executable
Dim config = IronPdf.GrpcLayer.IronPdfConnectionConfiguration.Executable
' 2. Connect to the IronPDF host with the executable configuration
IronPdf.Installation.ConnectToIronPdfHost(config)
' 3. Create a PDF renderer instance
Dim renderer As New ChromePdfRenderer()
' 4. Render HTML string as PDF document
Dim pdf As PdfDocument = renderer.RenderHtmlAsPdf("Hello world")
' 5. Save the PDF to disk
pdf.SaveAs("output.pdf")
' 6. Clean up, this is needed to work
pdf.Dispose()
Alternative method with WithCustomChannel
An alternative method would be to utilize the WithCustomChannel method provided by the IronPdf.GrpcLayer.
The WithCustomChannel takes in two parameters, the customChannel, which is your custom gRPC channel, and metadata. The metadata parameter is optional and is set to null by default.
using IronPdf;using IronPdf.GrpcLayer;using Grpc.Core;// 1. Create custom gRPC channel (.NET Framework style)var channel = new Channel("123.456.7.8:80", ChannelCredentials.SecureSsl);// 2. (Optional) Add metadata headers if neededvar metadata = new Metadata{ { "Authorization", "Bearer your_token_here" }};// 3. Configure IronPDF with custom channelvar config = IronPdfConnectionConfiguration.WithCustomChannel(channel, metadata);IronPdf.Installation.ConnectToIronPdfHost(config);// 4. Generate PDFvar renderer = new ChromePdfRenderer();PdfDocument pdf = renderer.RenderHtmlAsPdf("Hello world");// 5. Save the PDF to diskpdf.SaveAs("output.pdf");// 6. Clean up , this is needed to workpdf.Dispose();
using IronPdf;
using IronPdf.GrpcLayer;
using Grpc.Core;
// 1. Create custom gRPC channel (.NET Framework style)
var channel = new Channel("123.456.7.8:80", ChannelCredentials.SecureSsl);
// 2. (Optional) Add metadata headers if needed
var metadata = new Metadata
{
{ "Authorization", "Bearer your_token_here" }
};
// 3. Configure IronPDF with custom channel
var config = IronPdfConnectionConfiguration.WithCustomChannel(channel, metadata);
IronPdf.Installation.ConnectToIronPdfHost(config);
// 4. Generate PDF
var renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("Hello world");
// 5. Save the PDF to disk
pdf.SaveAs("output.pdf");
// 6. Clean up , this is needed to work
pdf.Dispose();
ImportsIronPdfImportsIronPdf.GrpcLayerImportsGrpc.Core' 1. Create custom gRPC channel (.NET Framework style)Dim channel As New Channel("123.456.7.8:80", ChannelCredentials.SecureSsl)' 2. (Optional) Add metadata headers if neededDim metadata As New MetadataFrom { {"Authorization", "Bearer your_token_here"}}' 3. Configure IronPDF with custom channelDim config AsIronPdfConnectionConfiguration = IronPdfConnectionConfiguration.WithCustomChannel(channel, metadata)IronPdf.Installation.ConnectToIronPdfHost(config)' 4. Generate PDFDim renderer As New ChromePdfRenderer()Dim pdf AsPdfDocument = renderer.RenderHtmlAsPdf("Hello world")' 5. Save the PDF to diskpdf.SaveAs("output.pdf")' 6. Clean up, this is needed to workpdf.Dispose()
Imports IronPdf
Imports IronPdf.GrpcLayer
Imports Grpc.Core
' 1. Create custom gRPC channel (.NET Framework style)
Dim channel As New Channel("123.456.7.8:80", ChannelCredentials.SecureSsl)
' 2. (Optional) Add metadata headers if needed
Dim metadata As New Metadata From {
{"Authorization", "Bearer your_token_here"}
}
' 3. Configure IronPDF with custom channel
Dim config As IronPdfConnectionConfiguration = IronPdfConnectionConfiguration.WithCustomChannel(channel, metadata)
IronPdf.Installation.ConnectToIronPdfHost(config)
' 4. Generate PDF
Dim renderer As New ChromePdfRenderer()
Dim pdf As PdfDocument = renderer.RenderHtmlAsPdf("Hello world")
' 5. Save the PDF to disk
pdf.SaveAs("output.pdf")
' 6. Clean up, this is needed to work
pdf.Dispose()
A minimum 1 vCPU with 2 GB of RAM is recommended. Depending on your workload, if you are working with PDFs containing more than 10 pages or experiencing heavy load requests, please select a higher tier.
Public IP: Turned on for test and Turned off for production. Security and AWS Networking are on your own.
Enjoy! IronPdfEngine docker is up and running in your AWS!
Please note: The IronPdfEngine Docker container itself does not support horizontal scaling; it is designed as a single-instance backend service. Your application using the IronPDF library (with or without IronPdfEngine) can still scale horizontally by deploying multiple application instances. See the IronPdfEngine Limitation for more details.
Size: Minimum of 1 vCPU and 2 GiB of memory, or higher
Port: TCP Port 33350
Enjoy! IronPdfEngine docker is up and running in your Azure Container Instances!
Please note: The IronPdfEngine Docker container does not support horizontal scaling; designed as a single-instance backend service. Your application using the IronPDF library (with or without IronPdfEngine) can still scale horizontally by deploying multiple application instances. See the IronPdfEngine Limitation for more information.
Complete the "Basics", "Cluster Details", and "Application Details" to create the Kubernetes service.
Once the deployment has completed, navigate to the left sidebar and select Kubernetes resources> Run command. Run the following command:
kubectl get services
kubectl get services
SHELL
With the information of EXTERNAL-IP and PORT(S), you can configure the IronPDFEngine connection accordingly.
using IronPdf;using IronPdf.GrpcLayer;IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01";IronPdfConnectionConfiguration configuration = new IronPdfConnectionConfiguration();configuration.ConnectionType = IronPdfConnectionType.RemoteServer;configuration.Host = "http://48.216.143.233";configuration.Port = 80;IronPdf.Installation.ConnectToIronPdfHost(configuration);ChromePdfRenderer renderer = new ChromePdfRenderer();PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>testing</h1>");pdf.SaveAs("output.pdf");
using IronPdf;
using IronPdf.GrpcLayer;
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01";
IronPdfConnectionConfiguration configuration = new IronPdfConnectionConfiguration();
configuration.ConnectionType = IronPdfConnectionType.RemoteServer;
configuration.Host = "http://48.216.143.233";
configuration.Port = 80;
IronPdf.Installation.ConnectToIronPdfHost(configuration);
ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>testing</h1>");
pdf.SaveAs("output.pdf");
ImportsIronPdfImportsIronPdf.GrpcLayerIronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01"Dim configuration As New IronPdfConnectionConfiguration()configuration.ConnectionType = IronPdfConnectionType.RemoteServerconfiguration.Host = "http://48.216.143.233"configuration.Port = 80IronPdf.Installation.ConnectToIronPdfHost(configuration)Dim renderer As New ChromePdfRenderer()Dim pdf AsPdfDocument = renderer.RenderHtmlAsPdf("<h1>testing</h1>")pdf.SaveAs("output.pdf")
Imports IronPdf
Imports IronPdf.GrpcLayer
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01"
Dim configuration As New IronPdfConnectionConfiguration()
configuration.ConnectionType = IronPdfConnectionType.RemoteServer
configuration.Host = "http://48.216.143.233"
configuration.Port = 80
IronPdf.Installation.ConnectToIronPdfHost(configuration)
Dim renderer As New ChromePdfRenderer()
Dim pdf As PdfDocument = renderer.RenderHtmlAsPdf("<h1>testing</h1>")
pdf.SaveAs("output.pdf")
Pull the ironpdfengine image. This step will show you a command to pull the ironpdfengine image.
For Example:
aws ecr get-login-password \ --region us-east-1 | docker login \ --username AWS \ --password-stdin 000000000000.dkr.ecr.us-east-1.amazonaws.comCONTAINER_IMAGES="000000000000.dkr.ecr.us-east-1.amazonaws.com/iron-software/ironpdfengine:2026.7.2" for i in $(echo $CONTAINER_IMAGES | sed "s/,/ /g"); do docker pull $i; done
aws ecr get-login-password \
--region us-east-1 | docker login \
--username AWS \
--password-stdin 000000000000.dkr.ecr.us-east-1.amazonaws.com
CONTAINER_IMAGES="000000000000.dkr.ecr.us-east-1.amazonaws.com/iron-software/ironpdfengine:2026.7.2"
for i in $(echo $CONTAINER_IMAGES | sed "s/,/ /g"); do docker pull $i; done
SHELL
Run the ironpdfengine container. This command will create a container and run it in the background with port 33350.
docker run -d -p 33350:33350 000000000000.dkr.ecr.us-east-1.amazonaws.com/iron-software/ironpdfengine:2026.7.2
docker run -d -p 33350:33350 000000000000.dkr.ecr.us-east-1.amazonaws.com/iron-software/ironpdfengine:2026.7.2
SHELL
Health Check For IronPdfEngine
Checking on the health of your Docker Container is crucial for ensuring reliability and availability in a production environment. The ability to check for the IronPdfEngine Docker container allows developers to restart the service if it fails, as well as scale resources if the demand increases, along with monitoring a continuous application.
To check on the health of your IronPdfEngine, we can send a gRPC request to the same IronPdfEngine port (by default, it would be 33350) to verify if we get a response.
Health Check with gRPC
IronPdfEngine adheres to the standard gRPC health check pattern, utilizing the following protocol structure.
message HealthCheckRequest { string service = 1; // Name of the service to check (e.g., "IronPdfEngine")}
message HealthCheckRequest {
string service = 1; // Name of the service to check (e.g., "IronPdfEngine")
}
Text
Since we're checking for IronPdfEngine, we replace the service name with IronPdfEngine.
Here's an example using JavaScript with Postman to send a gRPC request to the local IronPdfEngine service with the default number of 33350.
As you can see from the response, the status response is SERVING, indicating the service is up and running. If the container is not healthy, the status response would be NOT_SERVING.
Health Check with Kubernetes Setup
For Kubernetes setups, we can use the following to check whether the service is healthy or not.
What is IronPdfEngine and why would I use it in Docker?
IronPdfEngine is a standalone service dedicated to creating, editing, and reading PDFs. By running it in Docker, you can streamline deployment by encapsulating all necessary dependencies, avoiding size and dependency issues while ensuring consistent performance.
What versions of IronPDF are compatible with IronPdfEngine Docker?
IronPdfEngine Docker is compatible with IronPDF versions 2023.2.x and above. It's important to ensure that the version of IronPDF matches the version of IronPdfEngine Docker to avoid issues.
How can I determine the required IronPDF Docker container version?
To determine the required IronPDF Docker container version, check the version of IronPDF you're using from NuGet. Use the `IronPdf.Installation.IronPdfEngineVersion` property in your code to verify the correct version.
Why is running IronPDF as a container beneficial?
Running IronPDF as a container is beneficial because it reduces the file size overhead by only requiring a fraction of the size for the client. It also simplifies deployment by bundling all dependencies already configured.
How do I avoid deployment issues with IronPDF Docker?
Deployment issues can be avoided by using IronPDF Docker as it comes pre-installed and configured with all necessary dependencies, reducing setup complexity and ensuring smooth operation.
Can IronPdfEngine Docker handle runtime parameter configurations?
Yes, IronPdfEngine Docker allows you to configure runtime parameters using key-value pairs when running the Docker container. This flexibility lets you tailor settings like debug mode and browser limits without altering the image.
What are the minimum system requirements for deploying IronPDF on AWS Fargate?
For an effective deployment on AWS Fargate, it's recommended to have at least 1 vCPU and 2 GB of RAM. Depending on your PDF workload, you might require more resources for optimal performance.
How does IronPdfEngine improve PDF operations?
IronPdfEngine enhances PDF operations by providing a reliable service that ensures PDF generation and manipulation are efficient, consistent, and scalable, especially when used within scalable environments like Docker.
What is the significance of using a Docker network when setting up IronPdfEngine?
Using a Docker network allows your application to communicate seamlessly with the IronPdfEngine container, ensuring proper execution order and network resource utilization when using Docker Compose setups.
Are there specific logging configurations available for IronPdfEngine?
Yes, IronPdfEngine supports various logging configurations, including console, file, and custom modes. This flexibility helps in monitoring and debugging, allowing developers to choose the best method for their needs.
Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.