<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Run Dapr in self-hosted mode on Dapr Docs</title><link>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/</link><description>Recent content in Run Dapr in self-hosted mode on Dapr Docs</description><generator>Hugo</generator><language>en</language><atom:link href="https://v1-18.docs.dapr.io/operations/hosting/self-hosted/index.xml" rel="self" type="application/rss+xml"/><item><title>Overview of Dapr in self-hosted mode</title><link>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-overview/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-overview/</guid><description>&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>Dapr can be configured to run in self-hosted mode on your local developer machine or on production VMs. Each running service has a Dapr runtime process (or sidecar) which is configured to use state stores, pub/sub, binding components and the other building blocks.&lt;/p>
&lt;h2 id="initialization">Initialization&lt;/h2>
&lt;p>Dapr can be initialized &lt;a href="https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-with-docker/">with Docker&lt;/a> (default) or in &lt;a href="https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-no-docker/">slim-init mode&lt;/a>. It can also be initialized and run in &lt;a href="https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-airgap/">offline or airgap environments&lt;/a>.&lt;/p>


&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>

 You can also use &lt;a href="https://podman.io/">Podman&lt;/a> in place of Docker as container runtime. Please refer &lt;a href="https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-with-podman/">dapr init with Podman&lt;/a> for more details. It can be useful in the scenarios where docker cannot be installed due to various networking constraints.

&lt;/div>

&lt;p>The default Docker setup provides out of the box functionality with the following containers and configuration:&lt;/p></description></item><item><title>How-To: Run Dapr in self-hosted mode with Docker</title><link>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-with-docker/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-with-docker/</guid><description>&lt;p>This article provides guidance on running Dapr with Docker on a Windows/Linux/macOS machine or VM.&lt;/p>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://v1-18.docs.dapr.io/getting-started/install-dapr-cli/">Dapr CLI&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://docs.docker.com/get-docker/">Docker&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://docs.docker.com/compose/install/">Docker-Compose&lt;/a> (optional)&lt;/li>
&lt;/ul>
&lt;h2 id="initialize-dapr-environment">Initialize Dapr environment&lt;/h2>
&lt;p>To initialize the Dapr control plane containers and create a default configuration file, run:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>dapr init
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="run-both-app-and-sidecar-as-a-process">Run both app and sidecar as a process&lt;/h2>
&lt;p>The &lt;a href="https://v1-18.docs.dapr.io/reference/cli/dapr-run/">&lt;code>dapr run&lt;/code> CLI command&lt;/a> can be used to launch a Dapr sidecar along with your application:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>dapr run --app-id myapp --app-port &lt;span style="color:#0000cf;font-weight:bold">5000&lt;/span> -- dotnet run
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This command will launch both the daprd sidecar binary and run &lt;code>dotnet run&lt;/code>, launching your application.&lt;/p></description></item><item><title>How-To: Run Dapr in self-hosted mode with Podman</title><link>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-with-podman/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-with-podman/</guid><description>&lt;p>This article provides guidance on running Dapr with Podman on a Windows/Linux/macOS machine or VM.&lt;/p>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://v1-18.docs.dapr.io/getting-started/install-dapr-cli/">Dapr CLI&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://podman-desktop.io/downloads">Podman&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="initialize-dapr-environment">Initialize Dapr environment&lt;/h2>
&lt;p>To initialize the Dapr control plane containers and create a default configuration file, run:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>dapr init --container-runtime podman
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="run-both-app-and-sidecar-as-a-process">Run both app and sidecar as a process&lt;/h2>
&lt;p>The &lt;a href="https://v1-18.docs.dapr.io/reference/cli/dapr-run/">&lt;code>dapr run&lt;/code> CLI command&lt;/a> can be used to launch a Dapr sidecar along with your application:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>dapr run --app-id myapp --app-port &lt;span style="color:#0000cf;font-weight:bold">5000&lt;/span> -- dotnet run
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This command launches both the daprd sidecar and your application.&lt;/p></description></item><item><title>How-To: Run Dapr in an offline or airgap environment</title><link>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-airgap/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-airgap/</guid><description>&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>By default, Dapr initialization downloads binaries and pulls images from the network to setup the development environment. However, Dapr also supports offline or airgap installation using pre-downloaded artifacts, either with a Docker or slim environment. The artifacts for each Dapr release are built into a &lt;a href="https://github.com/dapr/installer-bundle">Dapr Installer Bundle&lt;/a> which can be downloaded. By using this installer bundle with the Dapr CLI &lt;code>init&lt;/code> command, you can install Dapr into environments that do not have any network access.&lt;/p></description></item><item><title>How-To: Run Dapr in self-hosted mode without Docker</title><link>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-no-docker/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-no-docker/</guid><description>&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://v1-18.docs.dapr.io/getting-started/install-dapr-selfhost/#installing-dapr-cli">Install the Dapr CLI&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="initialize-dapr-without-containers">Initialize Dapr without containers&lt;/h2>
&lt;p>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:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>dapr init --slim
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Two different binaries are installed:&lt;/p>
&lt;ul>
&lt;li>&lt;code>daprd&lt;/code>&lt;/li>
&lt;li>&lt;code>placement&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>The &lt;code>placement&lt;/code> binary is needed to enable &lt;a href="https://v1-18.docs.dapr.io/developing-applications/building-blocks/actors/actors-overview/">actors&lt;/a> in a Dapr self-hosted installation.&lt;/p></description></item><item><title>How-to: Persist Scheduler Jobs</title><link>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-persisting-scheduler/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-persisting-scheduler/</guid><description>&lt;p>The &lt;a href="https://v1-18.docs.dapr.io/concepts/dapr-services/scheduler/">Scheduler&lt;/a> service is responsible for writing jobs to its Etcd database and scheduling them for execution.
By default, the Scheduler service database writes this data to the local volume &lt;code>dapr_scheduler&lt;/code>, meaning that &lt;strong>this data is persisted across restarts&lt;/strong>.&lt;/p>
&lt;p>The host file location for this local volume is typically located at either &lt;code>/var/lib/docker/volumes/dapr_scheduler/_data&lt;/code> or &lt;code>~/.local/share/containers/storage/volumes/dapr_scheduler/_data&lt;/code>, depending on your container runtime.
Note that if you are using Docker Desktop, this volume is located in the Docker Desktop VM&amp;rsquo;s filesystem, which can be accessed using:&lt;/p></description></item><item><title>Steps to upgrade Dapr in a self-hosted environment</title><link>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-upgrade/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-upgrade/</guid><description>&lt;ol>
&lt;li>
&lt;p>Uninstall the current Dapr deployment:&lt;/p>


&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>

 This will remove the default &lt;code>$HOME/.dapr&lt;/code> directory, binaries and all containers (dapr_redis, dapr_placement and dapr_zipkin). Linux users need to run &lt;code>sudo&lt;/code> if docker command needs sudo.

&lt;/div>

&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>dapr uninstall --all
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Download and install the latest CLI by visiting &lt;a href="https://v1-18.docs.dapr.io/getting-started/install-dapr-cli/">this guide&lt;/a>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Initialize the Dapr runtime:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>dapr init
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Ensure you are using the latest version of Dapr (v1.16.9)) with:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ dapr --version
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>CLI version: 1.16
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Runtime version: 1.16
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol></description></item><item><title>Uninstall Dapr in a self-hosted environment</title><link>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-uninstall/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/self-hosted/self-hosted-uninstall/</guid><description>&lt;p>The following CLI command removes the Dapr sidecar binaries and the placement container:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>dapr uninstall
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The above command will not remove the Redis or Zipkin containers that were installed during &lt;code>dapr init&lt;/code> by default, just in case you were using them for other purposes. To remove Redis, Zipkin, Actor Placement container, as well as the default Dapr directory located at &lt;code>$HOME/.dapr&lt;/code> or &lt;code>%USERPROFILE%\.dapr\&lt;/code>, run:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>dapr uninstall --all
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>

&lt;div class="alert alert-primary" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>

 For Linux/MacOS users, if you run your docker cmds with sudo or the install path is &lt;code>/usr/local/bin&lt;/code>(default install path), you need to use &lt;code>sudo dapr uninstall&lt;/code> to remove dapr binaries and/or the containers.

&lt;/div></description></item></channel></rss>