# OpenWebUIResource.withHostPort

- Module: [CommunityToolkit.Aspire.Hosting.Ollama](/reference/api/typescript/communitytoolkit.aspire.hosting.ollama.md)
- Defined on: [OpenWebUIResource](/reference/api/typescript/communitytoolkit.aspire.hosting.ollama/openwebuiresource.md)
- Version: `13.4.0`
- Kind: `method`

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

## Definition

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

## Signature

```typescript
withHostPort(port: number): OpenWebUIResource
```

## Parameters

- `port` (`number`)

## Returns

[OpenWebUIResource](/reference/api/typescript/communitytoolkit.aspire.hosting.ollama/openwebuiresource.md) `builder`

## Defined on

- [OpenWebUIResource](/reference/api/typescript/communitytoolkit.aspire.hosting.ollama/openwebuiresource.md) -- `handle`
