Configuration & Changing Ports

Everything is driven by the single .env file at the repo root. This page explains the switches you’ll actually touch and — importantly — how to change ports when some are already busy on your machine.


The Compose Switches

These live in the “Docker Compose one-command bring-up” block at the bottom of .env:

Variable Default What it does
CLUSTER_MODE auto How Kubernetes is sourced: auto, local, cloud, fresh/kind. See the routes.
KIND_CLUSTER_NAME agentcert-<ACE_INSTANCE_NAME> Name of the kind cluster created/reused (routes 2 & auto). Setup writes a per-user name here so checkouts on a shared host never collide — it is not plain agentcert. Run kind get clusters to see the real name.
HOST_KUBE_DIR ~/.kube Host kube directory mounted into the stack. Use an absolute path if set.
HOST_PUBLIC_IP (empty) Only for CLUSTER_MODE=cloud — the VM address in-cluster pods call back to.
MONGO_MODE local local = run MongoDB in the stack; external = reuse an existing mongo via DB_SERVER.
LANGFUSE_MODE local local = run Langfuse in the stack; external = use an existing one via LANGFUSE_HOST.
LITELLM_MODE local local = run the LiteLLM proxy; external = use an existing gateway via LITELLM_HOST.
COMPOSE_PROFILES mongo,langfuse,litellm The list compose actually reads. Keep in sync with the *_MODE switches.
WEB_PORT 2001 Informational (the UI runs on host networking).
LANGFUSE_PORT 4000 Host port for the Langfuse UI.
LITELLM_PORT 14000 Host port for the LiteLLM proxy.

Profiles: How the Switches Map to What Runs

Compose decides which optional stacks start from COMPOSE_PROFILES. Each *_MODE=local should have its matching token present:

If you set… …put this token in COMPOSE_PROFILES
MONGO_MODE=local mongo
LANGFUSE_MODE=local langfuse
LITELLM_MODE=local litellm

Examples

# Run absolutely everything locally (default — best for a fresh machine):
COMPOSE_PROFILES=mongo,langfuse,litellm

# Reuse an existing mongo + Langfuse, but run LiteLLM locally:
MONGO_MODE=external
LANGFUSE_MODE=external
LITELLM_MODE=local
COMPOSE_PROFILES=litellm

When you set a service to external, point the stack at it:

  • MONGO_MODE=external → set DB_SERVER (and MONGODB_CONNECTION_STRING for the certifier).
  • LANGFUSE_MODE=external → set LANGFUSE_HOST, LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY.
  • LITELLM_MODE=external → set LITELLM_HOST.
The control-plane services (auth, graphql, web) always run — they are the platform itself, not optional infrastructure.

LLM Providers

The wizard (./scripts/setup.sh --deploy) walks through Azure OpenAI, Gemini, OpenRouter, and Ollama. Configure the providers you need:

a) Azure OpenAI

Required for the certifier (all four phases). Also used by the flash-agent if selected.

Variable What it does
AZURE_OPENAI_KEY API key (fanned to certifier standard, reasoning, and embedding consumers)
AZURE_OPENAI_ENDPOINT https://<resource>.openai.azure.com/
AZURE_OPENAI_API_VERSION API version (default in .env.example if omitted)
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME Certifier standard model deployment (e.g. gpt4o)
AZURE_OPENAI_GPT5_CHAT_DEPLOYMENT_NAME Certifier reasoning model deployment (defaults to standard if omitted)
AZURE_EMBEDDING_MODEL Certifier embedding deployment (optional — skip to disable vector search)
AZURE_OPENAI_DEPLOYMENT LiteLLM model alias the flash-agent requests (e.g. gpt-4o)

b) Google Gemini

Optional. Powers the flash-agent only (not the certifier). Provides gemini-3-flash, gemini-2.5-flash, gemini-2.5-flash-lite as LiteLLM aliases.

GEMINI_API_KEY=...

c) OpenRouter

Optional. Powers the flash-agent only. Provides the auto-free alias for zero-cost routing.

OPENROUTER_API_KEY=...

d) Ollama

Optional local model for the flash-agent. When no hosted-provider key is set, the wizard offers Ollama by default and pulls a multi-GB model. The model alias is derived from OLLAMA_MODEL and offered at the flash-agent model prompt. Ollama does not enable certifier reports; the certifier still needs Azure OpenAI.

Flash-agent model

After configuring providers, the wizard shows all available aliases and sets:

FLASH_AGENT_MODEL=gpt-4o   # the LiteLLM alias the flash-agent will request

You can change this in .env and run ./scripts/setup.sh --restart to apply it to the Kubernetes deployment.

Certifier always needs Azure The certifier calls Azure OpenAI directly, not via LiteLLM. Gemini, OpenRouter, and Ollama can power the flash-agent but do not enable certification reports.

Image Sources & Reproducibility

setup.sh writes these into .env; scripts/prepare-images.sh --deploy acts on them (and can be re-run standalone). The defaults make a run reproducible from the checkout alone.

IMAGE_REGISTRY selects the registry for images that are pulled or published. The *_IMAGE_SOURCE settings separately choose whether each image group is built and loaded locally or pulled from that registry. See registry-migration-plan.md for the registry layout:

Variable Default What it controls
IMAGE_REGISTRY (empty) empty = Docker Hub, with third-party images taken from frozen copies under IMAGE_MIRROR_NAMESPACE (e.g. litmuschaos/k8s:latest → agentcert/litmuschaos-k8s:latest) so upstream changes cannot break ACE; set (e.g. infyartifactory.jfrog.io/docker-local inside Infosys) = every image is pulled as <IMAGE_REGISTRY>/<public name>. *_IMAGE values always hold public names
IMAGE_MIRROR_NAMESPACE agentcert Docker Hub namespace of those frozen copies (made by scripts/mirror-images.sh --push with IMAGE_REGISTRY empty); none pulls upstream directly
REGISTRY_USERNAME / REGISTRY_PASSWORD (empty) credentials for IMAGE_REGISTRY (a JFrog access token goes in the password); with it empty, optional Docker Hub credentials for pushes and rate limits
IMAGE_PULL_SECRET_NAME registry-pull Kubernetes image-pull Secret holding those credentials (only when IMAGE_REGISTRY is set)
PLATFORM_IMAGE_SOURCE local auth, graphql, web, certifier, subscriber … — local builds them from this checkout on --restart
HUB_BUNDLE_IMAGE_SOURCE local the immutable hub bundle (app/agent/fault catalogs + charts) GraphQL serves; registry + HUB_BUNDLE_IMAGE for clusters that cannot side-load
INSTALL_APP_IMAGE_SOURCE / INSTALL_AGENT_IMAGE_SOURCE local the installer images, which carry their own copy of the charts — local keeps them identical to the hub bundle (pull policy Never)
SRE_AGENTS_IMAGE_SOURCE local flash-agent, sre-agent-comprehensive, sre-agent-crewai and agent-sidecar
ITBENCH_EXPERIMENT_IMAGE_SOURCE local the ITBench fault runner (published only to the Infosys registry; with IMAGE_REGISTRY empty local is the only working option)
LITMUS_IMAGES_SOURCE local all third-party workflow images (rendered bundled apps, Litmus helpers, fault tools, metrics-server), pre-pulled and side-loaded so runs do not contact registries
ACE_AUTO_REGISTER_INFRA true register + connect the ace-local chaos infrastructure after deploy (ACE_INFRA_NAME, ACE_INFRA_NAMESPACE)
ACE_ALLOW_UNVERIFIED_COMBINATIONS false true downgrades catalog/compatibility validation to warnings — development only, not certification-grade

Each *_IMAGE_SOURCE is local or registry (older .env files saying dockerhub or jfrog are migrated to registry by setup.sh). registry pulls published :latest images from IMAGE_REGISTRY that can lag this checkout; use it only for clusters that cannot side-load (anything other than kind or k3s). If any required local image fails to build, prepare-images.sh exits non-zero and setup stops instead of deploying a stack that would fail later with ImagePullBackOff.


Required Secrets

Fill these in before first start The wizard prompts for all of these. If you run docker compose up -d directly, set them in .env first.

Minimum for running experiments (flash-agent only, no certification):

# One of: Azure / Gemini / OpenRouter; the wizard can also configure Ollama
GEMINI_API_KEY=...          # OR OPENROUTER_API_KEY / Azure block below
FLASH_AGENT_MODEL=gemini-2.5-flash

Full stack including certification reports:

AZURE_OPENAI_KEY=...
AZURE_OPENAI_ENDPOINT=https://<resource>.openai.azure.com/
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME=gpt4o          # certifier standard model
AZURE_OPENAI_GPT5_CHAT_DEPLOYMENT_NAME=gpt5-2    # certifier reasoning (optional)
AZURE_OPENAI_DEPLOYMENT=gpt-4o                   # LiteLLM alias for flash-agent
FLASH_AGENT_MODEL=gpt-4o

If LANGFUSE_MODE=local, the Langfuse org/project/API keys are auto-provisioned on first boot. The local Langfuse login is admin@agentcert.local / agentcert-admin (override with LANGFUSE_INIT_USER_*).


Changing Ports (Busy-Port Scenario)

A. The Kubernetes (kind) deployment — KIND_HOSTPORT_*

This is the path ./scripts/setup.sh --deploy uses, and the one you want in almost every case. Each host port is one .env key, substituted into the kind config by deploy/kind/render-kind-config.sh:

Service .env key Default
AgentCert UI KIND_HOSTPORT_WEB 2001
GraphQL REST KIND_HOSTPORT_GRAPHQL_REST 8081
GraphQL gRPC KIND_HOSTPORT_GRAPHQL_GRPC 8082
Auth REST KIND_HOSTPORT_AUTH_REST 3005
Auth gRPC KIND_HOSTPORT_AUTH_GRPC 3030
Certifier KIND_HOSTPORT_CERTIFIER 18000
LiteLLM KIND_HOSTPORT_LITELLM 14000
Langfuse KIND_HOSTPORT_LANGFUSE 4002
MongoDB KIND_HOSTPORT_MONGO 27017
MinIO KIND_HOSTPORT_MINIO 19090
Ingress KIND_HOSTPORT_INGRESS 8088
Dex KIND_HOSTPORT_DEX 32000
Prometheus KIND_HOSTPORT_PROMETHEUS 31090
Grafana KIND_HOSTPORT_GRAFANA 31687
OTel Prometheus MCP KIND_HOSTPORT_OTEL_PROM_MCP 31085
OTel Kubernetes MCP KIND_HOSTPORT_OTEL_K8S_MCP 31086

Setup normally picks these for you with a free-port walk and saves what it chose, so on a shared host your .env is the authority, not this table. To pin one yourself, set the key and re-run ./scripts/setup.sh --restart — a changed host port requires the cluster to be recreated, which setup detects and offers.

The NodePort side never changes Only the host side of each mapping is configurable. The in-cluster NodePorts (32001, 32081, 32003, 32400, …) are fixed in deploy/kind/kind-agentcert.yaml and are what the rendering script keys on.

B. Host-process / Docker Compose services

The rest of this section applies to the local-dev path (start-local-services.sh, docker compose), where services run on the host instead of inside kind. The defaults there differ: Langfuse 4000, certifier 8000, Ollama 11435.

litellm, langfuse, and certifier publish their ports the normal Docker way:

Service Default Change in .env Also update in .env
Langfuse UI 4000 LANGFUSE_PORT=4001 LANGFUSE_HOST=http://172.26.0.1:4001
LiteLLM 14000 LITELLM_PORT=14001 LITELLM_HOST=http://172.26.0.1:14001
Certifier API 8000 API_PORT=8001 CERTIFIER_BASE_URL / CERTIFICATE_PDF_BASE_URL → :8001

Then docker compose up -d and you’re done.

C. Control-Plane Services as host processes — Host Networking

auth, graphql, and web run on the host network — you change the port the process binds, plus the places that reference it.

Service Default Primary change Cross-references that MUST match
GraphQL REST 8081 .env → GQL_REST_PORT=18081 .env: PORTAL_ENDPOINT, SERVER_ADDR, SUBSCRIBER_CALLBACK_URL, GQL_PROXY_PORT → 18081; plus compose/web-nginx.conf → proxy_pass http://127.0.0.1:18081/
GraphQL gRPC 8082 .env → GQL_GRPC_PORT=18082 —
Auth REST 3000 .env → AUTH_REST_PORT=13000 .env: LITMUS_SVC_ENDPOINT, AUTH_PROXY_PORT → 13000; plus compose/web-nginx.conf → proxy_pass http://127.0.0.1:13000/
Auth gRPC 3030 .env → AUTH_GRPC_PORT=13030 .env: LITMUS_AUTH_GRPC_PORT=13030
Web UI 2001 compose/web-nginx.conf → listen 2001; (WEB_PORT in .env is informational only)

Worked Example — Port 8081 Is Busy, Move GraphQL to 18081

  1. .env — change every occurrence of the GraphQL REST port:
    GQL_REST_PORT=18081
    GQL_PROXY_PORT=18081
    PORTAL_ENDPOINT=http://172.26.0.1:18081
    SERVER_ADDR=http://172.26.0.1:18081/query
    SUBSCRIBER_CALLBACK_URL=http://172.26.0.1:18081
    
  2. compose/web-nginx.conf — repoint the UI’s API proxy:
    location /api/ {
        ...
        proxy_pass "http://127.0.0.1:18081/";   # was 8081
    }
    
  3. Recreate the affected services:
    docker compose up -d --force-recreate graphql web
    
Why so many places? SERVER_ADDR / SUBSCRIBER_CALLBACK_URL / PORTAL_ENDPOINT are baked into the manifests the GraphQL server installs into your cluster. The in-cluster subscriber pod uses them to call back to the control plane. If they don't match the real port, experiments connect but the subscriber can't report back.

The Classic One: Port 8080

A kind cluster publishes 8080→80 for its ingress, so ACE deliberately uses 8081 for GraphQL. ACE’s own ingress mapping defaults to host port 8088 — change it with KIND_HOSTPORT_INGRESS in .env and re-run ./scripts/setup.sh --restart, rather than hand-editing the kind template.

Check What’s Using a Port

ss -tlnp "( sport = :8081 )"          # your processes
sudo ss -tlnp "( sport = :8081 )"     # include root-owned listeners
docker ps --format '{{.Names}}\t{{.Ports}}' | grep 8081

The Kind Gateway IP

You’ll see a gateway address (typically 172.26.0.1 but not always) throughout .env in variables like LANGFUSE_HOST, SERVER_ADDR, and SUBSCRIBER_CALLBACK_URL. This is the gateway of the kind Docker network — the address that means “the host, as seen from inside a cluster pod”.

setup.sh auto-detects this for you The wizard runs docker network inspect kind to find the actual gateway for your machine. It also re-detects after docker compose up (on a fresh VM the kind network doesn't exist yet when you first run the wizard) and rewrites the callback URLs if the value changed, then recreates graphql automatically.
The gateway is assigned by Docker based on how many networks already exist on your machine — it is not always 172.26.0.1. It could be 172.18.0.1, 172.19.0.1, etc. Never hardcode it; always let setup.sh detect it, or find it yourself with docker network inspect kind | grep Gateway.
kind (routes 1 & 2)
Auto-detected by setup.sh. Find it yourself: docker network inspect kind | grep Gateway.
Other local clusters
Gateway may differ from kind's. Find it with docker network inspect <net> | grep Gateway and update the URL vars in .env.
Cloud (route 3)
No kind network — in-cluster pods use HOST_PUBLIC_IP instead. Set this in .env and the wizard wires it up.

If your host firewall (UFW) is active, in-cluster pods also need the port opened from the kind subnet — see running-an-experiment.md.

Offline or air-gapped client delivery

An experiment never pulls an image at run time when LITMUS_IMAGES_SOURCE=local: setup resolves every image from the three bundled application charts plus Litmus, fault-tool, and metrics images, then loads them into the Kind nodes before it reports success.

For a connected client, set real REGISTRY_USERNAME and REGISTRY_PASSWORD values in .env. With IMAGE_REGISTRY empty they are Docker Hub credentials used only by the setup-time preload; anonymous Docker Hub pulls are intentionally rejected before a partial install can hit a rate limit. With IMAGE_REGISTRY set, the preload pulls every image from that registry instead.

For a disconnected client, prepare a bundle once on a connected build host:

RUNTIME_IMAGES_EXPORT_PATH=/absolute/path/ace-runtime-images.tar

Run ./scripts/prepare-images.sh --deploy successfully (without --deploy it only builds the ACE images and writes no archive), deliver the resulting archive with the checkout, then set this on the client before ./scripts/setup.sh --restart:

RUNTIME_IMAGES_ARCHIVE=/absolute/path/ace-runtime-images.tar
RUNTIME_IMAGES_EXPORT_PATH=

The client setup imports the archive, verifies every required Docker Hub image is now local, and side-loads it into Kind. It fails before deployment with the missing image names if the archive is incomplete.


ACE — Agent Certification Engine · Released under the Apache License 2.0.