Environment variable reference

A list of environment variables used by Dapr

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

Environment VariableUsed ByDescription
DAPR_HTTP_PORTYour applicationThe HTTP port that Dapr is listening on. Your application should use this variable to connect to Dapr instead of hardcoding the port value. Injected by the dapr-sidecar-injector into all the containers in the pod.
DAPR_GRPC_PORTYour applicationThe gRPC port that Dapr is listening on. Your application should use this variable to connect to Dapr instead of hardcoding the port value. Injected by the dapr-sidecar-injector into all the containers in the pod.
DAPR_TOKEN_APIYour applicationThe token used for Dapr API authentication for requests from the application. Read enable API token authentication in Dapr for more information.
APP_TOKEN_APIYour applicationThe token used by the app to authenticate requests from Dapr. Read authenticate requests from Dapr using token authentication for more information.
DAPR_PLACEMENT_HOSTYour applicationThe address for the Dapr Placement service. Only needed in self-hosted mode if you run your app (which creates actors) and you want to tell the app the location of the Placement service. This is never needed outside of local machine development.
DAPR_NETWORKDapr CLIOptionally used by the Dapr CLI to specify the Docker network on which to deploy the Dapr runtime.
NAMESPACEDapr runtimeUsed to specify a component’s namespace in self-hosted mode