<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Matheus Guimaraes</title>
    <description>The latest articles on DEV Community by Matheus Guimaraes (@techwithmatheus).</description>
    <link>https://dev.to/techwithmatheus</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F990373%2Fc3282166-8fbe-4de0-ae95-edb54e59fc04.png</url>
      <title>DEV Community: Matheus Guimaraes</title>
      <link>https://dev.to/techwithmatheus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/techwithmatheus"/>
    <language>en</language>
    <item>
      <title>Running Kiro Crew in Docker on Windows</title>
      <dc:creator>Matheus Guimaraes</dc:creator>
      <pubDate>Wed, 12 Aug 2026 20:12:47 +0000</pubDate>
      <link>https://dev.to/aws/running-kiro-crew-in-docker-on-windows-19j6</link>
      <guid>https://dev.to/aws/running-kiro-crew-in-docker-on-windows-19j6</guid>
      <description>&lt;p&gt;I've been playing with &lt;a href="https://kiro.dev/docs/crew/installation/" rel="noopener noreferrer"&gt;Kiro Crew&lt;/a&gt; recently, and when I went to get it running on my Windows machine I had a decision to make.&lt;/p&gt;

&lt;p&gt;Kiro Crew doesn't currently have a Windows desktop app. You can still run it natively on Windows, but the documented route involves installing and running the Gateway from source.&lt;/p&gt;

&lt;p&gt;But then, while looking through the &lt;a href="https://github.com/kirodotdev/KiroCrew" rel="noopener noreferrer"&gt;Kiro Crew GitHub repository&lt;/a&gt;, I noticed another option that immediately caught my attention: &lt;strong&gt;there's an official Docker image!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Docker is already a familiar part of the development workflow for many of us, and a container felt like a nice, clean way to get Kiro Crew running without installing it from source.&lt;/p&gt;

&lt;p&gt;So that's the route I took.&lt;/p&gt;

&lt;p&gt;It worked, but along the way I ran into an interesting security detail that made the setup slightly less straightforward than simply running a container.&lt;/p&gt;

&lt;p&gt;And, as it turns out, that's actually a good thing.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we're going to do
&lt;/h2&gt;

&lt;p&gt;By the end of this post, we'll have Kiro Crew running in Docker on Windows, with its agent sandbox enabled and without giving the container more privileges than it actually needs.&lt;/p&gt;

&lt;p&gt;I'm using Docker Desktop with WSL 2, so you'll want to have those installed before following along.&lt;/p&gt;

&lt;p&gt;You can check your WSL installation with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;wsl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With that out of the way, let's get Kiro Crew running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starting with the official container image
&lt;/h2&gt;

&lt;p&gt;The Kiro Crew team publishes a public container image, so we don't need to build anything ourselves or even authenticate with a container registry. Nice and easy.&lt;/p&gt;

&lt;p&gt;Before doing anything else, I created a directory to keep the files for this setup together:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;kiro-crew
&lt;span class="nb"&gt;cd &lt;/span&gt;kiro-crew
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, at first glance, running Kiro Crew looks like it should be as simple as starting the official image.&lt;/p&gt;

&lt;p&gt;And technically, the Gateway itself will run.&lt;/p&gt;

&lt;p&gt;But there's another security boundary inside that container that we need to understand before we can start it properly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wait... a sandbox inside a container?
&lt;/h2&gt;

&lt;p&gt;This was the interesting part for me.&lt;/p&gt;

&lt;p&gt;We're already putting Kiro Crew inside a Docker container, which gives us an isolation boundary between Kiro Crew and our Windows host.&lt;/p&gt;

&lt;p&gt;But Kiro Crew adds another boundary of its own.&lt;/p&gt;

&lt;p&gt;Agent commands aren't simply executed with access to everything available to the main Kiro Crew process. On Linux, Kiro Crew creates an internal user-namespace sandbox for those commands.&lt;/p&gt;

&lt;p&gt;Conceptually, our setup looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Windows
└── Docker container
    └── Kiro Crew
        └── Agent sandbox
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why sandbox an agent that's already inside a container?&lt;/p&gt;

&lt;p&gt;Because the two boundaries are protecting different things.&lt;/p&gt;

&lt;p&gt;The container isolates Kiro Crew from our host. The inner sandbox isolates &lt;strong&gt;agent commands from sensitive state available to Kiro Crew itself&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example, Kiro Crew's sandbox hides credential directories such as &lt;code&gt;~/.aws&lt;/code&gt; and &lt;code&gt;~/.ssh&lt;/code&gt; from agent subprocesses by bind-mounting empty directories over them. So if an agent-executed command tries to access one of those directories, it simply sees an empty directory rather than our AWS credentials or SSH keys.&lt;/p&gt;

&lt;p&gt;That means the Gateway can have the credentials it needs to do its job without automatically making those credentials readable by commands executed by an agent.&lt;/p&gt;

&lt;p&gt;That's a pretty important distinction when we're giving an AI agent the ability to execute commands.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Docker gets in the way
&lt;/h2&gt;

&lt;p&gt;There's one complication.&lt;/p&gt;

&lt;p&gt;To create that inner sandbox, Kiro Crew needs Linux system calls including:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;unshare(CLONE_NEWUSER)
unshare(CLONE_NEWNS)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Docker's default seccomp security policy blocks those operations.&lt;/p&gt;

&lt;p&gt;So if the Kiro Crew container can't create its inner sandbox, it doesn't quietly shrug its shoulders and run agent commands without one.&lt;/p&gt;

&lt;p&gt;It &lt;strong&gt;fails closed&lt;/strong&gt;, meaning that when the security mechanism can't be established, access is denied rather than silently falling back to a less secure mode.&lt;/p&gt;

&lt;p&gt;The Gateway and dashboard can still run, but agent command execution remains disabled.&lt;/p&gt;

&lt;p&gt;I actually really like this design! What initially looks like an extra hurdle in getting the container running is Kiro Crew refusing to silently weaken its security model.&lt;/p&gt;

&lt;p&gt;So how do we fix it?&lt;/p&gt;

&lt;h2&gt;
  
  
  The tempting solution and the better solution
&lt;/h2&gt;

&lt;p&gt;There are a few ways we could approach this.&lt;/p&gt;

&lt;p&gt;One option is to simply tell Kiro Crew that we accept running agent commands without the inner sandbox. Kiro Crew provides an environment variable for exactly that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;KIROCREW_ALLOW_UNSANDBOXED=1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We could pass that into our container and Kiro Crew would allow agent execution, leaving Docker itself as our only isolation boundary.&lt;/p&gt;

&lt;p&gt;We could also reach for the rather large hammer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;--privileged
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That would make the sandbox work, but it does so by granting the container extremely broad privileges and removing many of Docker's normal isolation restrictions.&lt;/p&gt;

&lt;p&gt;That's a much bigger security concession than we actually need.&lt;/p&gt;

&lt;p&gt;What we really want is much narrower:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Allow the operations Kiro Crew needs to create its sandbox while keeping the rest of Docker's security restrictions in place.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And this is another nice detail about the Kiro Crew implementation: the team already provides a seccomp profile specifically for this!&lt;/p&gt;

&lt;p&gt;So we don't have to create one ourselves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Downloading the Kiro Crew seccomp profile
&lt;/h2&gt;

&lt;p&gt;From the &lt;code&gt;kiro-crew&lt;/code&gt; directory we created earlier, download the &lt;a href="https://github.com/kirodotdev/KiroCrew/blob/main/docker/seccomp/kirocrew-seccomp.json" rel="noopener noreferrer"&gt;official Kiro Crew seccomp profile&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/kirodotdev/KiroCrew/main/docker/seccomp/kirocrew-seccomp.json &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-o&lt;/span&gt; kirocrew-seccomp.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should now have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kiro-crew/
└── kirocrew-seccomp.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Having trouble downloading it from WSL?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I happened to be dealing with a DNS issue in my WSL environment when I did this, so &lt;code&gt;curl&lt;/code&gt; couldn't resolve GitHub. If you happen to run into the same thing, there's nothing special about downloading the file through &lt;code&gt;curl&lt;/code&gt;: you can download &lt;code&gt;kirocrew-seccomp.json&lt;/code&gt; directly from the Kiro Crew GitHub repository in your browser and place it in this directory manually, which is what I did.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now we can start the container using that profile.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running Kiro Crew
&lt;/h2&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; kirocrew &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 127.0.0.1:5476:5476 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; kirocrew-home:/home/kirocrew &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--security-opt&lt;/span&gt; &lt;span class="nv"&gt;seccomp&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;kirocrew-seccomp.json &lt;span class="se"&gt;\&lt;/span&gt;
  ghcr.io/kirodotdev/kirocrew:stable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are a couple of things worth noticing here.&lt;/p&gt;

&lt;p&gt;We're only publishing port &lt;code&gt;5476&lt;/code&gt; on the host's loopback interface, so the dashboard isn't being exposed to the rest of our network.&lt;/p&gt;

&lt;p&gt;We're also creating a named Docker volume:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kirocrew-home
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kiro Crew keeps its persistent state under &lt;code&gt;/home/kirocrew&lt;/code&gt;, including its configuration and Kiro CLI credentials. That means our state can survive replacing or upgrading the container.&lt;/p&gt;

&lt;p&gt;And, most importantly for what we've just discussed, we're passing the Kiro Crew seccomp profile with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;--security-opt seccomp=kirocrew-seccomp.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The container can now create the inner namespace sandbox while Docker's other default security restrictions remain in place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's open it
&lt;/h2&gt;

&lt;p&gt;At this point I did what I imagine most developers would do.&lt;/p&gt;

&lt;p&gt;I opened:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:5476
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And instead of the Kiro Crew dashboard, I was greeted by a message telling me I was missing a token.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fibs1dbiy2gnkertdm7o2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fibs1dbiy2gnkertdm7o2.png" alt="Kiro Crew dashboard showing that an access token is required" width="800" height="706"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another security measure!&lt;/p&gt;

&lt;p&gt;Simply being able to reach port &lt;code&gt;5476&lt;/code&gt; isn't enough to get access to the dashboard. Kiro Crew also requires a bearer token, so someone who can reach the Gateway still needs to authenticate before they can use it.&lt;/p&gt;

&lt;p&gt;So, there's one more part of the setup we need to do.&lt;/p&gt;

&lt;p&gt;Actually, two.&lt;/p&gt;

&lt;h2&gt;
  
  
  Authenticating Kiro CLI
&lt;/h2&gt;

&lt;p&gt;Kiro Crew's agent runtime uses &lt;code&gt;kiro-cli&lt;/code&gt;, so first we need to authenticate the CLI running inside our container.&lt;/p&gt;

&lt;p&gt;We can do that without opening an interactive shell ourselves:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; kirocrew kiro-cli login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Follow the authentication flow and log in with the identity you use for Kiro.&lt;/p&gt;

&lt;p&gt;Once authentication succeeds, those credentials are stored in the &lt;code&gt;kirocrew-home&lt;/code&gt; volume we created earlier, so they survive container upgrades.&lt;/p&gt;

&lt;p&gt;But that authenticates the agent runtime.&lt;/p&gt;

&lt;p&gt;We still need access to the dashboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting our dashboard token
&lt;/h2&gt;

&lt;p&gt;Every request to the Kiro Crew dashboard requires a token.&lt;/p&gt;

&lt;p&gt;We can mint a temporary login link from the running container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nb"&gt;exec &lt;/span&gt;kirocrew kirocrew token &lt;span class="nt"&gt;--ttl&lt;/span&gt; 2h
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kiro Crew will print a URL containing the token.&lt;/p&gt;

&lt;p&gt;It will look roughly like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:5476/?token=...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open that URL in your browser and...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fugtlxga5vgxv3hj4i2f8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fugtlxga5vgxv3hj4i2f8.png" alt="Kiro Crew running successfully in Docker on Windows" width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We're in!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And with that, we have Kiro Crew running nicely inside Docker on Windows, without having to build it from source and without unnecessarily weakening either of its isolation boundaries.&lt;/p&gt;

&lt;p&gt;Now I just need someone to explain why the Solarized theme is green instead of yellow. 😄&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://kiro.dev/docs/crew/installation/" rel="noopener noreferrer"&gt;Kiro Crew installation documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kirodotdev/KiroCrew" rel="noopener noreferrer"&gt;Kiro Crew GitHub repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kirodotdev/KiroCrew/blob/main/docs/guides/docker.md" rel="noopener noreferrer"&gt;Kiro Crew Docker guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>ai</category>
      <category>security</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
