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.envPass it to every Compose command:
docker compose --env-file compose.env up -dcompose.env is gitignored. Keep it out of source control and unapproved backups.
Image versions
| Variable | Default |
|---|---|
AGENTCONNECT_VERSION | latest |
AGENTCONNECT_IMAGE_REGISTRY | ghcr.io/agentconnect-md |
AGENTCONNECT_PRISMA_CLI_VERSION | 7.8.0-node24-r1 |
AGENTCONNECT_OPEN_CONNECTOR_VERSION | latest |
For reproducible deployments, pin a specific release tag:
AGENTCONNECT_VERSION=vX.Y.ZPublished application and migration images currently target linux/amd64.
Local ports
| Service | Variable | Default |
|---|---|---|
| Web | AGENTCONNECT_WEB_PORT | 3000 |
| Control Plane | AGENTCONNECT_CP_PORT | 8080 |
| Relay | AGENTCONNECT_RELAY_PORT | 8090 |
| PostgreSQL | AGENTCONNECT_POSTGRES_PORT | 5432 |
| Connector gateway | AGENTCONNECT_OPEN_CONNECTOR_PORT | 3100 |
| Setup Server | Fixed, loopback only | 8091 |
| Logto sign-in | Optional overlay | 3001 |
| Logto Console | Optional overlay | 3002 |
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:
| Variable | Local default |
|---|---|
AGENTCONNECT_PUBLIC_WEB_URL | http://localhost:3000 |
AGENTCONNECT_PUBLIC_CP_URL | http://localhost:8080 |
AGENTCONNECT_PUBLIC_RELAY_URL | http://localhost:8090 |
AGENTCONNECT_RELAY_DAEMON_URL | ws://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-serverAfter 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 webDon'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
agentconnectagent
Services load saved changes when they start. Apply your changes with:
docker compose restart control-plane relay webIf 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.exampleThen 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:
| Variable | Requirement |
|---|---|
AGENTCONNECT_POSTGRES_PASSWORD | URL-safe characters |
AGENTCONNECT_API_KEY_PEPPER | At least 32 characters and stable |
AGENTCONNECT_RELAY_TOKEN | At least 32 characters |
Generate a separate value for each secret:
openssl rand -hex 32Rotating 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-cppath "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: *vaultUse 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-serverAfter 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.jsThis 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 -dCheck the store through Caddy:
curl -k https://<host>:1445/healthBrowsers 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"}}'| Field | Meaning |
|---|---|
endpoint | The store's https:// origin (defaults to the AWS regional endpoint when omitted) |
publicEndpoint | The origin browsers and daemons use, when it differs from the one the Control Plane reaches |
prefix | Optional key prefix inside the bucket |
forcePathStyle | Set to true for MinIO, RustFS, and most self-hosted stores |
credentials | Files containing the access key pair, read from dir |
limits.maxBytes | Maximum 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-keydocker compose --env-file compose.env -f compose.yaml -f compose.file-transfer.yaml \
up -d --force-recreate control-planeThe bucket also needs:
- A lifecycle rule: Expire objects tagged
ac-cache=pendingunder<prefix>/src/(orsrc/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
GETandPUT, along with thecontent-type,x-amz-checksum-sha256, andx-amz-taggingheaders. - Permissions: Grant the key pair
s3:PutObject,s3:PutObjectTagging, ands3:GetObjectunder<prefix>/src/*/transfer/, pluss3:GetLifecycleConfigurationon 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:
| Variable | Used by |
|---|---|
NODE_EXTRA_CA_CERTS | Control Plane and daemon (Node.js) |
SSL_CERT_FILE | Tools that read the OpenSSL default bundle |
SSL_CERT_DIR | Hashed-directory form of the OpenSSL bundle |
GIT_SSL_CAINFO | Git 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?