# withHostPort

- Module: [CommunityToolkit.Aspire.Hosting.Dbx](/reference/api/typescript/communitytoolkit.aspire.hosting.dbx.md)
- Version: `13.5.0`
- Kind: `method`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/4ff8268fbd97ddd23cb73dc8eff9cc92718156d1)

Configures the host port that the dbx resource is exposed on instead of using randomly assigned port.

## Definition

```typescript
interface DbxContainerResource {
  // ... omitted for brevity
  withHostPort(port: number): DbxContainerResource
}
```

## Parameters

- `port` (`number`)

## Returns

[DbxContainerResource](/reference/api/typescript/communitytoolkit.aspire.hosting.dbx/dbxcontainerresource.md) `builder`

## Applies to

- [DbxContainerResource](/reference/api/typescript/communitytoolkit.aspire.hosting.dbx/dbxcontainerresource.md)
