AgentConnect
Docker Compose

Configuration

Configure the Compose stack's images, ports, public URLs, bootstrap secrets, and secret storage through compose.env.

The default Docker Compose stack needs no configuration and listens only on loopback. Use compose.env for deployment topology and bootstrap secrets, then use Setup Server for sign-in, provider apps, and deployment options.

Compose environment

Copy the template only when you need to override defaults:

cp compose.env.example compose.env

Pass it to every Compose command:

docker compose --env-file compose.env up -d

compose.env is gitignored. Keep it out of source control and unapproved backups.

Image versions

VariableDefault
AGENTCONNECT_VERSIONlatest
AGENTCONNECT_IMAGE_REGISTRYghcr.io/agentconnect-md
AGENTCONNECT_PRISMA_CLI_VERSION7.8.0-node24-r1
AGENTCONNECT_OPEN_CONNECTOR_VERSIONlatest

For reproducible deployments, pin a specific release tag:

AGENTCONNECT_VERSION=vX.Y.Z

Published application and migration images currently target linux/amd64.

Local ports

ServiceVariableDefault
WebAGENTCONNECT_WEB_PORT3000
Control PlaneAGENTCONNECT_CP_PORT8080
RelayAGENTCONNECT_RELAY_PORT8090
PostgreSQLAGENTCONNECT_POSTGRES_PORT5432
Connector gatewayAGENTCONNECT_OPEN_CONNECTOR_PORT3100
Setup ServerFixed, loopback only8091
Logto sign-inOptional overlay3001
Logto ConsoleOptional overlay3002

AGENTCONNECT_BIND_ADDRESS defaults to 127.0.0.1 for Web, Control Plane, and Relay. PostgreSQL, the connector gateway, Setup Server, and the local Logto overlay always bind to loopback in the supplied Compose files.

Network and public URLs

Containers reach each other internally by Docker service name. Browsers, daemons, provider callbacks, and links use these public origins:

VariableLocal default
AGENTCONNECT_PUBLIC_WEB_URLhttp://localhost:3000
AGENTCONNECT_PUBLIC_CP_URLhttp://localhost:8080
AGENTCONNECT_PUBLIC_RELAY_URLhttp://localhost:8090
AGENTCONNECT_RELAY_DAEMON_URLws://localhost:8090

Don't add a trailing slash.

For a remote daemon or network deployment, replace these defaults with reachable origins. Use HTTPS for browser and callback origins, and wss:// for the daemon-facing Relay URL. Your reverse proxy must preserve WebSocket upgrades for both Control Plane and Relay connections.

Set your final public URLs before creating GitHub or Slack Apps, because Setup generates their callback manifests from these values. If the URLs change later, recreate Setup Server with the same environment and Compose overrides before updating the provider Apps. For the base stack:

docker compose --env-file compose.env up -d --force-recreate setup-server

After updating the provider Apps, recreate the runtime services with the same environment and Compose overrides:

docker compose --env-file compose.env up -d --force-recreate control-plane relay web

Don't expose a no-auth stack or its default secrets on a network. Compose is a single-host setup and doesn't provide high availability.

Setup Server

Setup Server serves the browser-based AgentConnect Setup UI at http://localhost:8091. It's included in the base stack and always binds to loopback.

Use it to:

  • bootstrap Logto sign-in
  • create, adopt, check, or clear provider Apps
  • store provider credentials without exposing saved secret values
  • enable or disable the preset agentconnect agent

Services load saved changes when they start. Apply your changes with:

docker compose restart control-plane relay web

If Compose runs on another host, tunnel Setup Server over SSH instead of exposing it publicly:

ssh -L 8091:127.0.0.1:8091 operator@host.example

Then open http://localhost:8091 locally.

For the initial administrator and Logto Cloud or external Logto OSS setup, see Sign-in.

Preset agent

New organizations get a built-in agentconnect agent by default. To turn this off, open Options in Setup, clear Enable preset Agents, and save. This stops future provisioning and backfills without deleting agents that already exist.

Database and bootstrap secrets

PostgreSQL 18 stores its data in the agentconnect_postgres-data volume. docker compose down keeps the volume, while docker compose down --volumes deletes it.

Replace these default secrets before exposing the stack on a network:

VariableRequirement
AGENTCONNECT_POSTGRES_PASSWORDURL-safe characters
AGENTCONNECT_API_KEY_PEPPERAt least 32 characters and stable
AGENTCONNECT_RELAY_TOKENAt least 32 characters

Generate a separate value for each secret:

openssl rand -hex 32

Rotating AGENTCONNECT_API_KEY_PEPPER invalidates existing daemon and personal API keys. Back up PostgreSQL before storing data you want to keep.

Secret storage

Secrets shown as write-only in AgentConnect or Setup still need encryption at rest. The default SECRET_CIPHER=none stores them as plaintext in PostgreSQL. For production or network-exposed deployments, use HashiCorp Vault Transit.

Create a Transit key and a policy that grants encrypt and decrypt permissions on it:

vault secrets enable transit
vault write -f transit/keys/agentconnect-cp
path "transit/encrypt/agentconnect-cp" {
  capabilities = ["update"]
}

path "transit/decrypt/agentconnect-cp" {
  capabilities = ["update"]
}

Pass the Vault settings to both Control Plane and Setup Server so they share the same cipher root:

# compose.vault.yaml
services:
  control-plane:
    environment: &vault
      SECRET_CIPHER: vault-transit
      VAULT_ADDR: ${VAULT_ADDR}
      VAULT_TRANSIT_KEY: ${VAULT_TRANSIT_KEY:-agentconnect-cp}
      VAULT_TRANSIT_MOUNT: ${VAULT_TRANSIT_MOUNT:-transit}
      VAULT_TOKEN: ${VAULT_TOKEN}
  setup-server:
    environment: *vault

Use a policy-scoped token instead of a Vault root token, then recreate both services:

docker compose --env-file compose.env -f compose.yaml -f compose.vault.yaml \
  up -d --force-recreate control-plane setup-server

After taking a database backup, encrypt any values previously stored as plaintext:

docker compose --env-file compose.env -f compose.yaml -f compose.vault.yaml \
  exec control-plane node dist/secrets/rewrap-cli.js

This command is resumable, and you can rerun it after rotating the Transit key. Vault workload identity is also supported via VAULT_JWT_ROLE, VAULT_JWT_PATH, and VAULT_AUTH_MOUNT instead of VAULT_TOKEN.

File transfer and the object store

Console file transfer requires an S3-compatible object store. With one configured, users can attach any file to a Playground message, and the console can download workspace files up to the store's size limit. File bytes transfer directly between the browser or daemon and the store using short-lived signed URLs. The Control Plane only signs those URLs and doesn't see file contents. Without an object store, only images can be attached, and workspace downloads pass through the Control Plane with an 8 MiB per-file limit.

Signed URLs must use https://. Because browsers and daemons connect to the store directly, the store needs an HTTPS origin they trust.

Bundled store (HTTPS overlay)

The compose.logto.https.yaml overlay puts the stack and Logto sign-in behind Caddy HTTPS and also runs a RustFS object store. Caddy serves it on its own HTTPS port, and a one-shot object-store-setup service creates the agentconnect bucket, its lifecycle rules, and a CORS rule for the console origin on every start. Add these variables to the overlay's .env:

AGENTCONNECT_OBJECT_STORE_HTTPS_PORT=1445
AGENTCONNECT_OBJECT_STORE_ACCESS_KEY=agentconnect-store
AGENTCONNECT_OBJECT_STORE_SECRET_KEY=<random-password>

The overlay won't start if any of the three is missing. Include all three Compose files in every command:

docker compose --env-file .env \
  -f compose.yaml -f compose.logto.yaml -f compose.logto.https.yaml \
  up -d

Check the store through Caddy:

curl -k https://<host>:1445/health

Browsers and daemons follow download links to that port, so they must trust the Caddy CA for both the store and the console. See the repository's Caddy HTTPS guide for the full overlay setup, including exporting and trusting the Caddy root certificate.

External bucket

To use your own bucket instead, set AC_FILE_TRANSFER in compose.env to a one-line JSON document:

AC_FILE_TRANSFER='{"version":1,"endpoint":"https://s3.example.com","region":"us-east-1","bucket":"agentconnect","forcePathStyle":true,"credentials":{"source":"static","dir":"/run/secrets","accessKeyIdKey":"file_transfer_access_key_id","secretAccessKeyKey":"file_transfer_secret_access_key"}}'
FieldMeaning
endpointThe store's https:// origin (defaults to the AWS regional endpoint when omitted)
publicEndpointThe origin browsers and daemons use, when it differs from the one the Control Plane reaches
prefixOptional key prefix inside the bucket
forcePathStyleSet to true for MinIO, RustFS, and most self-hosted stores
credentialsFiles containing the access key pair, read from dir
limits.maxBytesMaximum file size (default 512Mi, up to 5Gi)

Mount the key files into the Control Plane with an override file:

# compose.file-transfer.yaml
services:
  control-plane:
    secrets:
      - file_transfer_access_key_id
      - file_transfer_secret_access_key
secrets:
  file_transfer_access_key_id:
    file: ./secrets/file-transfer-access-key-id
  file_transfer_secret_access_key:
    file: ./secrets/file-transfer-secret-access-key
docker compose --env-file compose.env -f compose.yaml -f compose.file-transfer.yaml \
  up -d --force-recreate control-plane

The bucket also needs:

  • A lifecycle rule: Expire objects tagged ac-cache=pending under <prefix>/src/ (or src/ with no prefix) after 2 days. Until this rule exists, the Control Plane refuses transfers and logs the rule to add. See the chart README for the exact rule JSON and AWS/MinIO commands.
  • A CORS rule: Allow the console origin for GET and PUT, along with the content-type, x-amz-checksum-sha256, and x-amz-tagging headers.
  • Permissions: Grant the key pair s3:PutObject, s3:PutObjectTagging, and s3:GetObject under <prefix>/src/*/transfer/, plus s3:GetLifecycleConfiguration on the bucket.

Private certificate authorities

If a GitLab or Gitea instance uses a certificate signed by a private CA, the CA bundle must be readable at a file path that exists inside each process, including the agent sandbox. Point every runtime at it:

VariableUsed by
NODE_EXTRA_CA_CERTSControl Plane and daemon (Node.js)
SSL_CERT_FILETools that read the OpenSSL default bundle
SSL_CERT_DIRHashed-directory form of the OpenSSL bundle
GIT_SSL_CAINFOGit itself, for clone, fetch, and push

A host-only path isn't enough. Agents run inside sandboxes with their own filesystem view, so you must mount the bundle inside the sandbox and pass these variables into the sandbox environment. Configure them in the sandbox image and environment settings, not only on the host.

Git and code-host API requests from agent sessions pass through the daemon's credential proxy, which verifies the instance using these same CA settings. Because of that, the daemon process itself needs them even when sessions run elsewhere.

The Relay only receives webhook deliveries and doesn't make outbound connections to the instance, so it doesn't need the CA bundle or outbound access.

Production checklist

  • Pin release image versions.
  • Configure OIDC sign-in and an API Resource.
  • Replace every default secret and enable encrypted secret storage.
  • Set a connector encryption key if you use connectors, and back up its volume.
  • Put Web, Control Plane, Relay, and Logto behind HTTPS.
  • Configure an HTTPS object store with its lifecycle rule for file transfer, or leave file transfer disabled.
  • Preserve WebSocket upgrades on your reverse proxy.
  • Back up PostgreSQL and test restores.
  • Keep Setup Server, PostgreSQL, and the connector gateway off the public network.

How is this guide?

On this page

How is this guide?