skip to content

How do you run the Aspire 13 dashboard standalone, without an AppHost, and what does it lose in that mode?

level: middleimportance: nice to knowfreq 25%

answer

  1. an OTLP viewer on its own
  2. aspire dashboard run
  3. UI 18888, OTLP 18889 and 18890 in the container
  4. token in the container logs
  5. no resource controls, no console logs

basics

~20 s

Run aspire dashboard run, or the mcr.microsoft.com/dotnet/aspire-dashboard container, and point each app's OTLP exporter at it. Standalone, it shows structured logs, traces and metrics only: no resource states, console logs or start and stop controls, because no AppHost feeds it.

solid answer

~40 s

`aspire dashboard run` starts the dashboard with its UI on `http://localhost:18888` and OTLP receivers on `4317` (gRPC) and `4318` (HTTP). The container image `mcr.microsoft.com/dotnet/aspire-dashboard` listens on `18888` for the UI and `18889`/`18890` for OTLP gRPC and HTTP, which you usually map to host ports `4317` and `4318`. Each app then exports with `OTEL_EXPORTER_OTLP_ENDPOINT` (and `OTEL_EXPORTER_OTLP_PROTOCOL` for HTTP), so the ticketing services already running under Docker Compose can send telemetry without any Aspire hosting. The UI is still protected by a browser token, printed in the terminal or the container logs; `ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS=true` or `--allow-anonymous` turns that off for local use. What standalone mode loses is everything an AppHost supplies: the Resources page's process state and actions, console-log capture and terminals. Its persistence defaults to a temporary database.

code

yaml · 11 lines
yaml
services:
  aspire-dashboard:
    image: mcr.microsoft.com/dotnet/aspire-dashboard:latest
    ports:
      - "18888:18888"
  ticketing-api:
    image: ticketing-api:local
    environment:
      OTEL_EXPORTER_OTLP_ENDPOINT: http://aspire-dashboard:18889
      OTEL_EXPORTER_OTLP_PROTOCOL: grpc
      OTEL_SERVICE_NAME: ticketing-api

go deeper

for a junior

Recall that the dashboard can run on its own with aspire dashboard run or a container, and that apps must export OTLP to it.

for a middle

Explain the ports (UI 18888; OTLP 4317/4318 from the CLI, 18889/18890 inside the container), the token login, and what disappears without a resource service.

for a senior

Secure a shared standalone dashboard with OpenID Connect and an OTLP API key, and choose a persistence mode deliberately, since the default is a temporary database.

for a principal

Decide when a standalone dashboard is a sensible team tool for non-Aspire services and when telemetry belongs in the organisation's real observability platform.

## Why run it without an AppHost The **Aspire dashboard** is, at heart, an **OTLP receiver with a UI**: it accepts OpenTelemetry logs, traces and metrics over the OpenTelemetry Protocol and renders them. Nothing about that needs an AppHost. Teams use the standalone mode when: - the event-ticketing services already run under Docker Compose and the team wants a local trace viewer without adopting the AppHost; - a non-.NET service (Node.js, Python) needs a quick place to send telemetry while it is being instrumented; - someone needs a short-lived diagnostic view of a test environment. ## Two ways to start it | | `aspire dashboard run` | Container image | |---|---|---| | Command | `aspire dashboard run` | `docker run -p 18888:18888 -p 4317:18889 -p 4318:18890 mcr.microsoft.com/dotnet/aspire-dashboard` | | UI | `http://localhost:18888` | container port `18888` | | OTLP/gRPC | `http://localhost:4317` | container port `18889` | | OTLP/HTTP | `http://localhost:4318` | container port `18890` | | Login token | printed in the terminal | printed in the container logs | | Turn auth off | `--allow-anonymous` | `ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS=true` | The CLI also takes `--frontend-url`, `--otlp-grpc-url`, `--otlp-http-url`, `--application-name` and `--persistence`. The older `DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS` name is still read as a legacy alias. ## Sending telemetry to it The dashboard does not instrument anything. Each app needs an OpenTelemetry SDK and an exporter pointed at the dashboard, usually through the standard variables: - `OTEL_EXPORTER_OTLP_ENDPOINT` — `http://localhost:4317` for gRPC or `http://localhost:4318` for HTTP; - `OTEL_EXPORTER_OTLP_PROTOCOL` — `grpc`, `http/protobuf` or `http/json`; - `OTEL_SERVICE_NAME` — the name the dashboard shows for that app. In a Compose file, the services use the dashboard's service name instead of `localhost`, for example `http://aspire-dashboard:18889` on the internal network. ## What standalone mode loses With no AppHost there is no **resource service**, so: 1. The Resources page lists telemetry service names, not managed resources: no process state, health, endpoints or environment variables. 2. There are no start, stop or restart actions. 3. Console logs are not captured — only what the apps export as OTLP logs. 4. Resource terminals and the AppHost terminal dock are unavailable. Structured logs, Traces and Metrics work exactly as they do under an AppHost. ## Security and retention - The UI defaults to **browser-token** authentication. The OTLP endpoints can require an API key (`Dashboard:Otlp:AuthMode` set to `ApiKey` with `Dashboard:Otlp:PrimaryApiKey`) or a client certificate; when OTLP is unsecured the dashboard logs a warning. - Since Aspire 13.6 all storage is SQLite. The standalone default is **None**: a temporary database deleted on clean shutdown. `--persistence Resume` with a stable `--application-name` keeps one database across restarts; in a container, mount `ASPIRE_DASHBOARD_DATA_DIRECTORY` from a volume. - Telemetry limits still apply — by default 100,000 log records, 100,000 traces and 50,000 metric points — and the docs position it for development and short-term diagnostics, not long-term production observability. ## Querying it from a terminal The Aspire CLI reads a standalone dashboard too. `aspire otel logs`, `aspire otel traces` and `aspire otel spans` accept `--dashboard-url` with the full login URL; the CLI exchanges the browser token for an API key and prints telemetry in the terminal. That is handy in a CI job that spins up the dashboard container next to the services under test and dumps the traces of a failed run into the job log. ## Exposing it beyond a laptop Running it on a shared test server is possible, but then anonymous mode is off the table: use OpenID Connect for the UI and an API key for OTLP, and remember the telemetry it stores can contain request data and secrets.

  • Why does the Resources page look empty compared with an AppHost run?
    It is fed by a resource service that only an AppHost provides. Standalone, the dashboard knows telemetry service names from OTLP data, so there is no process state, health, endpoints, environment, console output or start/stop control — those require configuring a resource service.
  • Where is the login token when the dashboard runs in a container?
    In the container's logs: the dashboard prints a login URL with a `login?t=` token at startup, so `docker container logs aspire-dashboard` shows it. Setting `ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS=true` removes the login, which is acceptable only on a developer machine.

  • The standalone dashboard needs an AppHost project to receive any telemetry.
  • Starting the dashboard container instruments the apps automatically.
  • Apps should send OTLP to port 18888, the dashboard's UI port.
  • Standalone mode still captures each service's console output.
  • The standalone dashboard keeps its data across restarts by default.

Assumes Aspire 13.6: SQLite storage with the None, Run and Resume persistence modes arrived in 13.6; the standalone default stays a temporary database.