---
schema_version: "1"
id: e00290b7677dbf50a41286712630fd6ef6a98262226a19e39e177abd8cdc4e5d
title: Dynamic Ports
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/munit/2.3/dynamic-ports.md
canonical_url: https://docs.mulesoft.com/munit/2.3/dynamic-ports
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 084a549e60cf45023856960650ae0871d2b9db7d0c55d2414365655e5628dffe
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: MUnit
version: 2.3
---

# Dynamic Ports

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

The Dynamic Ports global element allows you to bind a free port to a property. It searches for a
free port available and can be narrowed to a specific range.

For example, a dynamic port would look something like this:

```xml
<munit:dynamic-port propertyName="a.dynamic.port"/>
```

And it can be used in the http configuration:

```xml
<http:request-config name="httpRequestConfig">
    <http:request-connection host="localhost" port="${a.dynamic.port}"/>
</http:request-config>
```

Additionally you can set min and max values from where to get the port:

```xml
<munit:dynamic-port propertyName="a.dynamic.port" min="6000" max="7000"/>
```

## See Also

- [Dynamic Directories](https://docs.mulesoft.com/munit/2.3/dynamic-directories)

- [Storage Event Processors](https://docs.mulesoft.com/munit/2.3/storage-event-processors)
