# Deploy Blazor

Blazor is detected from your project files and runs as a .NET container on port `8080`. No Dockerfile needed - one is [generated](/platform/deployments/builds#dockerfiles-generated-or-your-own) unless the repo has its own.

## Serve it

Kestrel must listen on the routed [port](/create/build-settings#port) on all interfaces. ASP.NET Core reads the standard variables - set nothing and the platform's `PORT` works via the generated setup, or be explicit:

```
ASPNETCORE_URLS=http://0.0.0.0:8080
```

## Configuration

Containers receive [environment variables](/platform/environment-variables#build-time-and-runtime) at runtime, and ASP.NET Core's configuration system maps them as usual - `ConnectionStrings__Default` style double-underscore keys included. `ASPNETCORE_ENVIRONMENT=Production` is the conventional baseline.

## Database

Provision [managed PostgreSQL or MySQL](/platform/databases) and feed the connection details to EF Core or your data layer from the environment - the [Credentials tab](/platform/databases/connect) has every field. Run EF migrations at startup or from your laptop against the same endpoint.

## Which Blazor?

- **Blazor Server / interactive server rendering** - this page: a running container, under normal [scaling](/create/scaling). Server interactivity holds a connection per client, so size [concurrency](/create/scaling#concurrency) accordingly.
- **Blazor WebAssembly, standalone** - a static build: publish output is files, served from the CDN. Deploy it as a [static site](/platform/frameworks#frontend) with the output directory pointed at the published `wwwroot`.

## Related

- [Frameworks](/platform/frameworks): Everything supported and how detection works.
- [Connect an app](/platform/databases/connect): Connection details for EF Core.
- [Scaling](/create/scaling): Concurrency for connection-holding apps.
