init CLI command reference

    Install Dapr on supported hosting platforms.

    Self hosted environment

    Install Dapr by pulling container images for Placement, Redis and Zipkin. By default these images are pulled from Docker Hub. To switch to Dapr Github container registry as the default registry, set the DAPR_DEFAULT_IMAGE_REGISTRY environment variable value to be GHCR. To switch back to Docker Hub as default registry, unset this environment variable.

    1. dapr init

    You can also specify a specific runtime version. Be default, the latest version is used.

    1. dapr init --runtime-version 1.4.0

    Dapr can also run without Docker.

    1. dapr init --from-dir <path-to-installer-bundle-directory>

    Dapr can also run in slim self-hosted mode without Docker in an airgap environment.

    1. dapr init -s --from-dir <path-to-installer-bundle-directory>

    You can also specify a private registry to pull container images from. These images need to be published to private registries as shown below to enable Dapr CLI to pull them successfully via the dapr init command -

    1. Redis container image(rejson) - dapr/3rdparty/rejson
    2. Zipkin container image(zipkin) - dapr/3rdparty/zipkin

    This command resolves the complete image URI as shown below -

    1. Placement container image(dapr) - docker.io/username/dapr/dapr:
    2. Redis container image(rejson) - docker.io/username/dapr/3rdparty/rejson
    3. zipkin container image(zipkin) - docker.io/username/dapr/3rdparty/zipkin

    Kubernetes environment

    1. dapr init -k

    You can wait for the installation to complete its deployment with the --wait flag. The default timeout is 300s (5 min), but can be customized with the --timeout flag.

      You can also specify a specific runtime version.

      Use the --set flag to configure a set of during Dapr installation to help set up a Kubernetes cluster.