# AppHost configuration

The AppHost project configures and starts your distributed application. Configuration includes settings for the resource service, the [Aspire dashboard](/dashboard/overview/), and internal settings used by integrations.

AppHost configuration is provided through launch profiles:

<PivotSelector
  title="Select your programming language"
  key="aspire-lang"
  marginTop={1}
  options={[
    { id: 'csharp', title: 'C#' },
    { id: 'typescript', title: 'TypeScript' },
  ]}
/>
<Pivot id="csharp">
In C# AppHosts, profiles live in `launchSettings.json`:

```json title="launchSettings.json"
{
  "$schema": "https://json.schemastore.org/launchsettings.json",
  "profiles": {
    "https": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "applicationUrl": "https://localhost:17134;http://localhost:15170",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development",
        "DOTNET_ENVIRONMENT": "Development",
        "ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21030",
        "ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22057"
      }
    }
  }
}
```
</Pivot>
<Pivot id="typescript">
In TypeScript AppHosts, profiles live in `aspire.config.json`:

```json title="aspire.config.json"
{
  "appHost": {
    "path": "apphost.mts",
    "language": "typescript/nodejs"
  },
  "profiles": {
    "https": {
      "applicationUrl": "https://localhost:17134;http://localhost:15170",
      "environmentVariables": {
        "ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21030",
        "ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22057"
      }
    }
  }
}
```
</Pivot>
**Note:** Configuration described on this page is for the Aspire AppHost project. To
  configure the standalone dashboard, see [dashboard
  configuration](/dashboard/configuration/).

## Common configuration

| Option                             | Default value | Description                                                                                                                                                                                                      |
| ---------------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ASPIRE_ALLOW_UNSECURED_TRANSPORT`       | `false`       | Allows communication with the AppHost without https. `ASPNETCORE_URLS` (dashboard address) and `ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL` (AppHost resource service address) must be secured with HTTPS unless true. |
| `ASPIRE_CONTAINER_RUNTIME`               | `docker`      | Allows the user of alternative container runtimes for resources backed by containers. Possible values are `docker` (default) or `podman`.                                                                        |
| `ASPIRE_DCP_USE_DEVELOPER_CERTIFICATE`   | `true`        | When `true` (the default), Aspire uses the ASP.NET Core developer certificate to secure the internal DCP server instead of an ephemeral certificate generated by DCP. On Windows, Aspire passes the certificate thumbprint to DCP. On macOS and Linux, Aspire passes the certificate and private key file paths (plus the thumbprint) so DCP can verify the loaded certificate. Set to `false` to opt out and use DCP's default ephemeral certificate. If no trusted developer certificate is found, Aspire automatically falls back to the ephemeral certificate. For more information, see [Certificate configuration](/app-host/certificate-configuration/). |
| `ASPIRE_ENVIRONMENT`                     | `null`        | Configures the AppHost environment when no higher-priority environment source is set. If no environment is configured, the AppHost uses `Production`.                                                            |
| `ASPIRE_VERSION_CHECK_DISABLED`          | `false`       | When set to `true`, Aspire doesn't check for newer versions on startup.                                                                                                                                          |

## AppHost environment

Use `ASPIRE_ENVIRONMENT` to set the environment name used by the AppHost while it evaluates the application model. Precedence is `--environment`, `DOTNET_ENVIRONMENT`, `ASPIRE_ENVIRONMENT`, then `Production`. This doesn't configure the dashboard's `ASPNETCORE_ENVIRONMENT` or automatically flow to child resources; set framework-specific variables on resources as needed. For details, see [Aspire environments](/deployment/environments/).

## Version update notifications

When an Aspire app starts, it checks if a newer version of Aspire is available on NuGet. If a new version is found, a notification appears in the dashboard with the latest version number, [a link to upgrade instructions](https://aka.ms/dotnet/aspire/update-latest), and button to ignore that version in the future.

<Image
  src={dashboardUpdateNotification}
  alt="Screenshot of dashboard showing a version update notification with upgrade options."
/>

The version check runs only when:

- The dashboard is enabled (interaction service is available).
- At least 2 days have passed since the last check.
- The check hasn't been disabled via the `ASPIRE_VERSION_CHECK_DISABLED` configuration setting.
- The app is not running in publish mode.

Updates are manual. You need to edit your project file to upgrade the Aspire SDK and package versions.

## Resource service

A resource service is hosted by the AppHost. The resource service is used by the dashboard to fetch information about resources which are being orchestrated by Aspire.

| Option                                    | Default value                                  | Description                                                                                                                                                                                                                                                                            |
| ----------------------------------------- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL`    | `null`                                         | Configures the address of the resource service hosted by the AppHost. Automatically generated with _launchSettings.json_ to have a random port on localhost. For example, `https://localhost:17037`.                                                                                   |
| `ASPIRE_DASHBOARD_RESOURCESERVICE_APIKEY` | Automatically generated 128-bit entropy token. | The API key used to authenticate requests made to the AppHost's resource service. The API key is required if the AppHost is in run mode, the dashboard isn't disabled, and the dashboard isn't configured to allow anonymous access with `ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS`. |

## Dashboard

By default, the dashboard is automatically started by the AppHost. The dashboard supports [its own set of configuration](/dashboard/configuration/), and some settings can be configured from the AppHost.

| Option                                      | Default value                                               | Description                                                                                                                                                                                                                                                                                                    |
| ------------------------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ASPNETCORE_URLS`                           | `null`                                                      | Dashboard address. Must be `https` unless `ASPIRE_ALLOW_UNSECURED_TRANSPORT` or `DistributedApplicationOptions.AllowUnsecuredTransport` is true. Automatically generated with _launchSettings.json_ to have a random port on localhost. The value in launch settings is set on the `applicationUrls` property. |
| `ASPNETCORE_ENVIRONMENT`                    | `Production`                                                | Configures the environment the dashboard runs as. For more information, see [Use multiple environments in ASP.NET Core](https://learn.microsoft.com/aspnet/core/fundamentals/environments).                                                                                                                    |
| `ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL`        | `http://localhost:18889` if no gRPC endpoint is configured. | Configures the dashboard <abbr title="OpenTelemetry Protocol" data-tooltip-placement="top">OTLP</abbr> gRPC address. Used by the dashboard to receive telemetry over OTLP. Set on resources as the `OTEL_EXPORTER_OTLP_ENDPOINT` env var. The `OTEL_EXPORTER_OTLP_PROTOCOL` env var is `grpc`. Automatically generated with _launchSettings.json_ to have a random port on localhost.   |
| `ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL`   | `null`                                                      | Configures the dashboard OTLP HTTP address. Used by the dashboard to receive telemetry over OTLP. If only `ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL` is configured then it is set on resources as the `OTEL_EXPORTER_OTLP_ENDPOINT` env var. The `OTEL_EXPORTER_OTLP_PROTOCOL` env var is `http/protobuf`.      |
| `ASPIRE_DASHBOARD_CORS_ALLOWED_ORIGINS`     | `null`                                                      | Overrides the CORS allowed origins configured in the dashboard. This setting replaces the default behavior of calculating allowed origins based on resource endpoints.                                                                                                                                         |
| `ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS`| `false`                                                     | Configures the dashboard to not use authentication and accept anonymous access. Sets frontend, OTLP, <abbr title="Model Context Protocol" data-tooltip-placement="top">MCP</abbr>, and API auth modes to `Unsecured`.                                                                                                                                                                  |
| `ASPIRE_DASHBOARD_FRONTEND_BROWSERTOKEN`    | Automatically generated 128-bit entropy token.              | Configures the frontend browser token. This is the value that must be entered to access the dashboard when the auth mode is BrowserToken. If no browser token is specified then a new token is generated each time the AppHost is launched.                                                                    |
| `ASPIRE_DASHBOARD_TELEMETRY_OPTOUT`         | `false`                                                     | Configures the dashboard to never send [usage telemetry](/dashboard/microsoft-collected-dashboard-telemetry/).                                                                                                                                                                                                 |
| `ASPIRE_DASHBOARD_AI_DISABLED`              | `true`                                                      | Reserved for future use. The in-dashboard GitHub Copilot UI was removed in Aspire 13.3. AI coding agents can still access telemetry data via the [Aspire CLI and MCP server](/dashboard/ai-coding-agents/). |
| `ASPIRE_DASHBOARD_API_ENABLED`              | `true`                                                      | Enables the dashboard [telemetry API](/dashboard/configuration/#api) (`/api/telemetry/*`) endpoints. The AppHost always sets this to `true`.                                                                                                                                                                   |
| `ASPIRE_DASHBOARD_FORWARDEDHEADERS_ENABLED` | `false`                                                     | Enables the Forwarded headers middleware that replaces the scheme and host values on the Request context with the values coming from the `X-Forwarded-Proto` and `X-Forwarded-Host` headers.                                                                                                                   |

## Internal

Internal settings are used by the AppHost and integrations. Internal settings aren't designed to be configured directly.

| Option                             | Default value                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                              |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `AppHost:Directory`                | The content root if there's no project.                                                                                 | Directory of the project where the AppHost is located. Accessible from the `IDistributedApplicationBuilder.AppHostDirectory`.                                                                                                                                                                                                                                                            |
| `AppHost:Path`                     | The directory combined with the application name.                                                                       | The path to the AppHost. It combines the directory with the application name.                                                                                                                                                                                                                                                                                                            |
| `AppHost:Sha256`                   | It is created from the AppHost name when the AppHost is in publish mode. Otherwise it is created from the AppHost path. | Hex encoded hash for the current application. The hash is based on the location of the app on the current machine so it is stable between launches of the AppHost.                                                                                                                                                                                                                       |
| `AppHost:OtlpApiKey`               | Automatically generated 128-bit entropy token.                                                                          | The API key used to authenticate requests sent to the dashboard OTLP service. The value is present if needed: the AppHost is in run mode, the dashboard isn't disabled, and the dashboard isn't configured to allow anonymous access with `ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS`.                                                                                                  |
| `AppHost:DashboardApiKey`          | Automatically generated 128-bit entropy token.                                                                          | The API key used to authenticate requests to the dashboard telemetry API. Also used as a fallback for MCP authentication if `AppHost:McpApiKey` is not set. The value is present if needed: the AppHost is in run mode, the dashboard isn't disabled, and the dashboard isn't configured to allow anonymous access.                                                                      |
| `AppHost:BrowserToken`             | Automatically generated 128-bit entropy token.                                                                          | The browser token used to authenticate browsing to the dashboard when it is launched by the AppHost. The browser token can be set by `ASPIRE_DASHBOARD_FRONTEND_BROWSERTOKEN`. The value is present if needed: the AppHost is in run mode, the dashboard isn't disabled, and the dashboard isn't configured to allow anonymous access with `ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS`. |
| `AppHost:ResourceService:AuthMode` | `ApiKey`. If `ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS` is true then the value is `Unsecured`.                        | The authentication mode used to access the resource service. The value is present if needed: the AppHost is in run mode and the dashboard isn't disabled.                                                                                                                                                                                                                                |
| `AppHost:ResourceService:ApiKey`   | Automatically generated 128-bit entropy token.                                                                          | The API key used to authenticate requests made to the AppHost's resource service. The API key can be set by `ASPIRE_DASHBOARD_RESOURCESERVICE_APIKEY`. The value is present if needed: the AppHost is in run mode, the dashboard isn't disabled, and the dashboard isn't configured to allow anonymous access with `ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS`.                         |

## Advanced orchestration properties
**Caution:** The following MSBuild properties and command-line arguments are intended for internal use by the Aspire SDK and tooling. You should not need to set these manually under normal circumstances. Incorrectly configuring these values can break your AppHost.

### DcpCliPath

The `DcpCliPath` property specifies the path to the **Developer Control Plane (DCP)** executable. The DCP is the core orchestration engine that Aspire uses to run and manage distributed application resources locally during development.

#### How it works

When you use the [Aspire SDK](/get-started/aspire-sdk/), the build system automatically:

1. Imports the platform-specific `Aspire.Hosting.Orchestration` NuGet package (for example, `Aspire.Hosting.Orchestration.win-x64`).
2. Sets `DcpCliPath` to point to the `dcp` executable within that package.
3. Embeds this path as assembly metadata in your compiled AppHost.

At runtime, the AppHost reads this metadata to locate and start the DCP process, which then orchestrates your application's resources.

#### Override options

In rare cases, you may need to override the default DCP path:

| Method | Example |
| ------ | ------- |
| MSBuild property | `<DcpCliPath>C:\path\to\dcp.exe</DcpCliPath>` |
| Command-line argument | `--dcp-cli-path /path/to/dcp` |
| Configuration | `DcpPublisher:CliPath` |

#### When to use

You might override `DcpCliPath` in these scenarios:

- **Aspire contributors**: Testing with a custom or debug build of DCP when developing Aspire itself.
- **CI/CD pipelines**: Non-standard SDK layouts where automatic discovery doesn't work.
- **Troubleshooting**: Temporarily pointing to a specific DCP version to diagnose issues.
**Tip:** If your AppHost fails to start with an error about missing DCP or orchestration dependencies, ensure you have the [Aspire SDK](/get-started/aspire-sdk/) properly configured rather than manually setting `DcpCliPath`.