The documentation you are viewing is for Dapr v1.10 which is an older version of Dapr. For up-to-date documentation, see the latest version.

Environment variables

The following table lists the environment variables used by the Dapr runtime, CLI, or from within your application:

Environment Variable Used By Description
APP_ID Your application The id for your application, used for service discovery
APP_PORT Your application The port your application is listening on
APP_API_TOKEN Your application The token used by the application to authenticate requests from Dapr API. Read authenticate requests from Dapr using token authentication for more information.
DAPR_HTTP_PORT Your application The HTTP port that the Dapr sidecar is listening on. Your application should use this variable to connect to Dapr sidecar instead of hardcoding the port value. Set by the Dapr CLI run command for self-hosted or injected by the dapr-sidecar-injector into all the containers in the pod.
DAPR_GRPC_PORT Your application The gRPC port that the Dapr sidecar is listening on. Your application should use this variable to connect to Dapr sidecar instead of hardcoding the port value. Set by the Dapr CLI run command for self-hosted or injected by the dapr-sidecar-injector into all the containers in the pod.
DAPR_METRICS_PORT Your application The HTTP Prometheus port to which Dapr sends its metrics information. With this variable, your application sends its application-specific metrics to have both Dapr metrics and application metrics together. See metrics-port for more information
DAPR_PROFILE_PORT Your application The profiling port through which Dapr lets you enable profiling and track possible CPU/memory/resource spikes in your application’s behavior. Enabled by --enable-profiling command in Dapr CLI for self-hosted or dapr.io/enable-profiling annotation in Dapr annotated pod.
DAPR_API_TOKEN Dapr sidecar The token used for Dapr API authentication for requests from the application. Enable API token authentication in Dapr.
NAMESPACE Dapr sidecar Used to specify a component’s namespace in self-hosted mode.
DAPR_DEFAULT_IMAGE_REGISTRY Dapr CLI In self-hosted mode, it is used to specify the default container registry to pull images from. When its value is set to GHCR or ghcr, it pulls the required images from Github container registry. To default to Docker hub, unset this environment variable.
SSL_CERT_DIR Dapr sidecar Specifies the location where the public certificates for all the trusted certificate authorities (CA) are located. Not applicable when the sidecar is running as a process in self-hosted mode.
DAPR_HELM_REPO_URL Your private Dapr Helm chart url Specifies a private Dapr Helm chart url, which defaults to the official Helm chart URL: https://dapr.github.io/helm-charts
DAPR_HELM_REPO_USERNAME A username for a private Helm chart The username required to access the private Dapr Helm chart. If it can be accessed publicly, this env variable does not need to be set
DAPR_HELM_REPO_PASSWORD A password for a private Helm chart The password required to access the private Dapr helm chart. If it can be accessed publicly, this env variable does not need to be set


Last modified September 14, 2022: Upmerge to 1.9 (#2793) (a35f0dcd)