# fx in Docker

> Run fx in a container: EnvHaven's open-source image with fx 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 fx 0.0.11 in EnvHaven v1.9.0_

A container keeps whatever fx 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 fx and tap **Sign in**: it starts fx, which asks you to sign in the first time. For an API key, choose **Set key** instead and paste `AI_GATEWAY_API_KEY`; the workspace keeps it write-only.
3. Start it with one tap: signed in, fx gets a green dot in the Launch menu and an icon in the workspace's top bar. Support is built in (0.0.11), so there is nothing to install or update.
4. Give it a task. The image sets `FX_PERMISSION_MODE=yolo`, which fx 0.0.11 reports as "mode=full access".

## The EnvHaven image, on your own Docker

The workspace image is MIT-licensed and ships fx 0.0.11 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 `fx` 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 fx has to keep

fx keeps its settings in `~/.fx` ([source](https://fx.sh/docs/using-fx/data-and-privacy)). Sign-ins are `auth.json`, `chatgpt-auth.json` and `grok-auth.json` there, and a saved AI Gateway key is `api-key`.

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

## Full access inside the container

For every session, as an environment variable (fx 0.0.11):

```bash
export FX_PERMISSION_MODE=yolo
```

fx's default mode, `auto`, sends every unresolved tool call to a reviewer model and bills that request; full access skips the check. Newer releases call the mode `full-access` (flag `--full-access`) and read the old name `yolo` only until 0.0.18, and fx updates itself in the background, so `full-access` is the spelling that lasts. `fx permissions` shows the current mode.

## Keep reading

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

Source: https://envhaven.com/agents/fx/docker
