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
- 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.
- 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. - 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.
- 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:
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 covers SSH and Haven CLI against it.
What a container for fx has to keep
fx keeps its settings in ~/.fx (source). 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):
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.