Environment:AFK surf Open agent Docker Engine
| Knowledge Sources | |
|---|---|
| Domains | Deployment, Infrastructure, Self_Hosting |
| Last Updated | 2026-10-25 00:00 GMT |
Overview
Docker Engine with the Compose plugin for running the Open-Agent self-hosting stack (postgres, redis, app-init, app) via a single `docker compose up -d` command.
Description
This environment provides the container runtime used by the Self_Hosting_Deployment workflow. It is invoked through the Docker Compose CLI plugin (`docker compose`) against a `docker-compose.yml` copied into a deploy directory. The compose file defines four services that share an internal network, use bind-mounted volumes for data persistence and config injection, and rely on Compose `depends_on` conditions to enforce startup ordering and health gates.
Usage
Use this environment when running Docker_Compose_Stack or Config_Json_Schema (the config file is consumed by the app container). It is the mandatory prerequisite for the self-hosting deployment workflow — copy the compose file and `config.json` into a deploy folder, then run `docker compose up -d`.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux, macOS, or Windows (WSL2) | Docker Desktop or Docker Engine installed |
| Software | Docker Engine 24+ with Compose v2 | Use `docker compose` (plugin), not legacy `docker-compose` |
| Hardware | 2+ CPU cores, 2GB+ RAM | Sufficient for postgres + redis + app containers |
| Disk | 5GB+ free | For container images and the `./database` / `./cache` bind-mount volumes |
Dependencies
System Packages
- `docker` (Engine) >= 24.0
- `docker compose` plugin v2
Image References
- `ghcr.io/afk-surf/open-agent:${VERSION:-canary}` — the Open-Agent application image (used by both `app-init` and `app`)
Credentials
No credentials are required for Docker Engine itself. Image access depends on the registry:
- `GHCR_TOKEN` (optional) — GitHub Container Registry read token if the `ghcr.io/afk-surf/open-agent` image is in a private registry
- `VERSION` (optional) — environment variable selecting the image tag; defaults to `canary`
Quick Install
# Copy the deploy files into a dedicated directory
mkdir deploy && cd deploy
cp ../.docker/config.example.json ./config.json
cp ../.docker/docker-compose.yml ./docker-compose.yml
# Edit config.json to add API keys, then start the stack
docker compose up -d
Code Evidence
Image tag with version fallback from `.docker/docker-compose.yml:29,45`:
app-init:
image: ghcr.io/afk-surf/open-agent:${VERSION:-canary}
app:
image: ghcr.io/afk-surf/open-agent:${VERSION:-canary}
Health-gated `depends_on` ordering from `.docker/docker-compose.yml:54-60`:
app:
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
app-init:
condition: service_completed_successfully
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `docker compose: command not found` | Compose v2 plugin not installed | Install the `docker-compose-plugin` package; do not rely on the legacy `docker-compose` Python script |
| `bind source path does not exist` | Running compose from the wrong directory | Ensure `./config.json` and `./docker-compose.yml` are present in the directory where `docker compose up` runs |
| `no space left on device` | Bind-mount `./database` / `./cache` filled the disk | Prune unused images/volumes (`docker system prune`) or move the deploy directory to a larger disk |
| app container fails to start | `app-init` (migrations) did not complete successfully | Run `docker compose logs app-init` and fix config.json / DB connectivity before restarting |
Compatibility Notes
- Podman: Should work with `podman compose` but is untested; the healthcheck and `depends_on: condition: service_completed_successfully` syntax must be supported.
- Rootless Docker: Supported; ensure the bind-mount directories are writable by the container user.
- compose standalone (v1): Not supported — the file uses Compose v2 `depends_on` condition syntax.