From 7159e79cadacb53bf35967307de26aaa6e93b529 Mon Sep 17 00:00:00 2001 From: joshvanl Date: Tue, 10 Feb 2026 18:38:21 +0000 Subject: [PATCH] Env: Set DAPR_HOST_IP=127.0.0.1 By default, set the DAPR_HOST_IP to localhost on daprd when using the run command. This ensures remote actors (workflows) works out of the box running in standalone mode. Will not override DAPR_HOST_IP if it is already set in the environment. Signed-off-by: joshvanl --- cmd/run.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/run.go b/cmd/run.go index 2f9d3d240..1c6cf4c8c 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -929,6 +929,11 @@ func startDaprdProcess(runConfig *standalone.RunConfig, runE *runExec.RunExec, } print.StatusEvent(runE.DaprCMD.OutputWriter, print.LogInfo, startInfo) + // If DAPR_HOST_IP is not set, set to localhost. + if _, ok := os.LookupEnv("DAPR_HOST_IP"); !ok { + runE.DaprCMD.Command.Env = append(runE.DaprCMD.Command.Environ(), "DAPR_HOST_IP=127.0.0.1") + } + err := runE.DaprCMD.Command.Start() if err != nil { errorChan <- err