# Factory Droid in Docker

> Run Factory Droid in a container: EnvHaven's open-source image with Factory Droid built in, a managed workspace with nothing to run, and the folders and keys a container of your own has to keep.

_Updated November 23, 2026 · Checked against Factory Droid 0.249.0 in EnvHaven v1.9.0_

A container keeps whatever Factory Droid does with full access away from your own files, which makes it the usual home for unattended runs. EnvHaven is built on that idea in two forms: a managed workspace, which is the container already running on a server of its own, and the open-source workspace image, which you run with Docker yourself.

## A managed workspace: nothing to run

1. Open your workspace in any browser. It is the EnvHaven container on its own always-on server, with an HTTPS address for what you build.
2. Tap **Launch**, choose Factory Droid and tap **Sign in**: it starts Factory Droid, which asks you to sign in the first time. For an API key, choose **Set key** instead and paste `FACTORY_API_KEY`; the workspace keeps it write-only.
3. Start it with one tap: signed in, Factory Droid gets a green dot in the Launch menu and an icon in the workspace's top bar. Support is built in (0.249.0), so there is nothing to install or update.
4. Give it a task. Runs with the default autonomy; pick the level per run.

## The EnvHaven image, on your own Docker

The workspace image is MIT-licensed and ships Factory Droid 0.249.0 beside 16 other agents. Its home is `/config`, so one volume keeps every agent's settings and sign-in when the container is replaced:

```bash
docker run -d \
  --name envhaven \
  -p 8443:8443 \
  -p 2222:22 \
  -e PASSWORD=password \
  -e SUDO_PASSWORD=password \
  -v envhaven-config:/config \
  ghcr.io/envhaven/envhaven:latest
```

Open `http://localhost:8443`, run `droid` in the terminal and sign in. The [self-hosted guide](https://envhaven.com/guides/self-hosted-dev-environment) covers SSH and Haven CLI against it.

## What a container for Factory Droid has to keep

Factory Droid keeps its settings in `~/.factory` ([source](https://docs.factory.com/droid-cli/settings)). Factory does not document where the sign-in token is kept, so in a container `FACTORY_API_KEY` is the dependable route.

In a container of your own, mount a volume there so a rebuilt container stays signed in, or pass `FACTORY_API_KEY` as an environment variable instead of signing in.

## Full access inside the container

Scripted runs, every permission:

```bash
droid exec --skip-permissions-unsafe "<prompt>"
```

Highest tiered autonomy:

```bash
droid exec --auto high "<prompt>"
```

`--skip-permissions-unsafe` skips every permission prompt (block rules still apply) and cannot be combined with `--auto`. High is not prompt-free: an ask rule in your permission rules still prompts, and a block rule refuses with no way to approve. Without `--auto`, `droid exec` runs read-only. In the interactive app, Ctrl+L cycles autonomy from Off to High.

## Keep reading

- [Factory Droid](https://envhaven.com/agents/factory-droid)
- [Factory Droid in the browser](https://envhaven.com/agents/factory-droid/browser)
- [Factory Droid on iPhone](https://envhaven.com/agents/factory-droid/iphone)
- [Factory Droid on iPad](https://envhaven.com/agents/factory-droid/ipad)
- [Factory Droid on Android](https://envhaven.com/agents/factory-droid/android)
- [Factory Droid on a Chromebook](https://envhaven.com/agents/factory-droid/chromebook)
- [Coding agents in Docker](https://envhaven.com/agents/docker)

Source: https://envhaven.com/agents/factory-droid/docker
