# Configure .NET on TurboStack

Enable the .NET runtime for an application, choose a version, and let TurboStack run your app as a service behind nginx.

![The .NET panel under Configure application > Technologies, enabled, showing the version selector and the Listen Port option defaulting to 5000|1000](../../assets/screenshots/technologies/dotnet.png)

## Where to configure it

.NET is configured per application. Open your host, go to an application's **Configure application > Technologies > .NET**, enable it, and select the runtime version. Saving updates the host YAML, provisions the runtime, and wires up the Nginx reverse proxy in front of your app.

## YAML configuration

### Required

| Key | Meaning |
|---|---|
| `dotnet_version` | The .NET runtime version to install, for example `"8.0"` (or newer). Setting this key is what enables the .NET runtime for the application; there is no separate enable key. |

### Optional

| Key | Meaning |
|---|---|
| `dotnet_port_enabled` | Set to `true` to use a custom local listen port instead of the default. |
| `dotnet.listen_port` | The local port your app listens on, which Nginx forwards to. Defaults to `5000`. |

```yaml
dotnet_version: "8.0"

# Optional: run the app on a custom local port behind nginx
dotnet_port_enabled: true
dotnet:
  listen_port: 5000
```

> [!NOTE]
> Your application only needs to listen on the local port. Nginx handles public HTTP/HTTPS traffic and Transport Layer Security (TLS) termination, forwarding requests to your app.

## Related

- [What is .NET?](what-is.md)
- [Applications](../../platform/hosts/applications/index.md)
- [Applications overview](../../applications/index.md)
