How-To: Run Dapr in self-hosted mode without Docker
Initialize Dapr without containers
The Dapr CLI provides an option to initialize Dapr using slim init, without the default creation of a development environment with a dependency on Docker. To initialize Dapr with slim init, after installing the Dapr CLI, use the following command:
Two different binaries are installed:
placement
The binary is needed to enable in a Dapr self-hosted installation.
In slim init mode, no default components (such as Redis) are installed for state management or pub/sub. This means that, aside from service invocation, no other building block functionality is available “out-of-the-box” on install. Instead, you can set up your own environment and custom components.
Actor-based service invocation is possible if a state store is configured, as explained in the following sections.
Enable state management or pub/sub
See documentation around to enable a local state store or pub/sub broker for messaging.
To enable actor placement:
- Run the placement service locally.
- Enable a to use actors. For example, Redis configured in self-hosted mode.
By default, the placement
binary is installed in:
- For Linux/MacOS:
- Windows
Now, to run an application with actors enabled, you can follow the sample example created for:
Update the state store configuration files to match the Redis host and password with your setup.
Enable it as a actor state store by making the metadata piece similar to the sample Java Redis component definition.
Clean up
When finished, remove the binaries by following Uninstall Dapr in a self-hosted environment to remove the binaries.
- Run Dapr with Podman, using the default , or in an airgap environment