Deploy
How-to guide

Configure XTM One

Finish the setup of XTM One after the install, then set its secrets, public URL and proxy trust, language models, edition, platform links, mail, security headers and sizing.

XTM OneFor platform engineers

XTM One starts with the rest of the XTM stack, as Install with Docker Compose describes. This page first takes it from running to usable: the reverse proxy it trusts, the first sign-in, a language model and its edition. It then sets the configuration a deployment of XTM One decides on: its secrets, its public URL, the language models, its edition, its links to the other platforms, mail, the security headers of its pages, its sandbox and the package mirror of the sandbox, and the size of its processes. Every setting here is an environment variable of the xtm-one and xtm-one-worker containers, read when they start. Read the XTM One configuration reference for every variable.

WHAT YOU EDITXTM ONESTORED.envXTM_ONE_* values of xtm-dockerdocker-compose.override.ymlEvery other variableSettings screensAI Models, Security, Parametersxtm-oneReads its environment at startxtm-one-workerSame URL, secret and licensextm_one databaseProviders, options, encrypted keys
  1. .env → xtm-one: docker compose up -d
  2. docker-compose.override.yml → xtm-one: docker compose up -d
  3. .env → xtm-one-worker: same values
  4. Settings screens → xtm_one database: saved
  5. xtm_one database → xtm-one: unless a variable locks
XTM One reads its environment once at start, on the platform and on the worker; the Settings screens store the rest in its database

What XTM One runs on

USERS AND PLATFORMSXTM ONESHARED SERVICESMODELSBrowserhttps://xtm-one.example.comOpenCTI and OpenAEVregister on http://xtm-one:4000xtm-oneInterface, API, chat, port 4000xtm-one-workerAssignments, schedules, indexingPostgreSQLxtm_one database, pgvectorRedisJobs, live chat, locksS3 storagextm-one-files bucketLanguage modelsA provider or a local endpoint
  1. Browser → xtm-one: through the reverse proxy
  2. OpenCTI and OpenAEV → xtm-one: register every 5 minutes
  3. xtm-one → PostgreSQL: its data
  4. xtm-one-worker → Redis: background jobs
  5. xtm-one-worker → S3 storage: files
  6. xtm-one → Language models: prompts
  7. xtm-one-worker → Language models: prompts
XTM One runs as a platform and a worker on the shared services of the stack, behind the reverse proxy, and calls the language models you connect
ComponentWhat XTM One needsIn xtm-docker
Imagesxtmone/platform, the interface, the API and the chat on port 4000, and xtmone/worker, which runs the background work: assignments, schedules, knowledge base indexing. Both at the same version. They are published for linux/amd64 onlyThe xtm-one and xtm-one-worker services, always started
PostgreSQLPostgreSQL 17 with the vector extension (pgvector) in its database. The extension needs a superuser to create itThe shared pgsql service: the xtm-one-db-init job creates the xtm_one database, its role XTM_ONE_POSTGRES_USER and the extension at each start
RedisThe queue of background jobs, the live chat, locks, rate limits and quota counters. It holds working state, not your dataThe shared redis service
S3 storageA bucket for uploaded documents, chat attachments, generated files and large trace payloads. XTM One creates it when it does not existThe shared minio service, bucket XTM_ONE_S3_BUCKET (xtm-one-files)
A language modelAt least one provider XTM One reaches, such as OpenAI, Anthropic, Google Gemini, Mistral AI, Azure OpenAI or AWS Bedrock, or a model on your network through Ollama, LiteLLM or an OpenAI-compatible endpointNone: you add it after the first sign-in
An editionAI agents and the chat run with the Enterprise Edition only: a Filigran license in XTM One, or a registered OpenCTI or OpenAEV that has oneXTM_ONE_ENTERPRISE_LICENSE, empty in .env.sample

With the Community Edition, XTM One starts and its screens open, but the chat and the agents stay off. The MCP servers of the registered platforms work in both editions. See What each edition of XTM One brings.

Finish the setup after the install

Once the stack runs, with XTM One published on 127.0.0.1:8090 and a reverse proxy that serves xtm-one.example.com over HTTPS, these steps take XTM One from running to usable. Run their commands from the folder of the stack. Keep at hand an API key of a language model provider, or the address of a model served on your network, and a Filigran license certificate unless a registered OpenCTI or OpenAEV has one. xtm-docker builds the whole configuration of XTM One from .env. Three values decide what you cannot change later without trouble:

Variable of .envWhat it is
XTM_ONE_SECRET_KEYSigns the sessions and the tokens XTM One sends to the other platforms, and encrypts the credentials it stores, such as the API keys of the language models. Never change it once XTM One has started: every credential it encrypted becomes unreadable
XTM_ONE_ADMIN_EMAILThe administrator account, created at the first start. It must be the admin email of OpenCTI and OpenAEV: XTM One finds a person in each platform by email
XTM_ONE_ADMIN_PASSWORDThe password of that account, 72 bytes at most. XTM One applies it again at every start: change it in .env, then restart, rather than in the interface, where a change lasts until the next restart
  1. Check that .env holds your own values, not those of .env.sample.

    grep -E '^(XTM_ONE_(HOST|PORT|EXTERNAL_SCHEME|ADMIN_EMAIL|SECRET_KEY)|PLATFORM_REGISTRATION_TOKEN)=' .env
    
    Check that it worked

    XTM_ONE_EXTERNAL_SCHEME=https, XTM_ONE_HOST=xtm-one.example.com, XTM_ONE_PORT=443, your administrator's email, and long random values for the secret and the token, not ChangeMeWithGeneratedRandomString.

  2. Let the reverse proxy keep long requests open and stream the chat. An agent's answer can take minutes, and Nginx closes a request after 60 seconds without data by default. Add these lines to the location / block of xtm-one.example.com in your proxy configuration, then reload it:

    proxy_read_timeout 300s;
    proxy_send_timeout 300s;
    

    Keep client_max_body_size at 50 MB or more: knowledge base uploads reach that size. The chat streams its answers as server-sent events, which need three things from the proxy:

    • HTTP/2 between the browsers and the proxy (http2 on; in the server block). Every open tab of XTM One holds its streams, and over HTTP/1.1 a few tabs use up the connections a browser opens to one host: XTM One then stops loading.
    • Response buffering off for /api/, or each answer shows only once it is complete. Nginx follows the X-Accel-Buffering: no header XTM One sends with its streams.
    • A read timeout above 15 seconds: a stream with nothing to send writes a keep-alive every 15 seconds. The 300 seconds above cover it.

    The server block of Publish the platforms over HTTPS already serves HTTP/2 and turns buffering off. It also forwards WebSockets, which the XTM One Desktop app, the runners and the relays use; the chat does not.

  3. Tell XTM One which address its reverse proxy reaches it from. Behind a proxy, every request comes from the proxy: until XTM One trusts it, the audit log records the proxy's address for every person, the sign-in rate limit counts everyone as one client, and the agent-to-agent endpoints refuse every request with 403 https required. A proxy on the Docker host reaches the container from the gateway of the stack's network:

    docker network inspect xtm_default --format '{{(index .IPAM.Config 0).Gateway}}'
    

    xtm is the COMPOSE_PROJECT_NAME of .env. Write that address as FORWARDED_ALLOW_IPS under the xtm-one service of docker-compose.override.yml, above the # Pinned versions line:

    services:
      xtm-one:
        environment:
          - FORWARDED_ALLOW_IPS=172.18.0.1
    

    FORWARDED_ALLOW_IPS takes an address, a network in CIDR form or a comma-separated list, and no host name. For a proxy elsewhere, name the address XTM One sees it from; behind several proxies, list each of them. See Public URL and reverse proxy.

  4. Apply the changes, then wait until XTM One is ready.

    docker compose up -d
    docker compose exec xtm-one curl -sS http://localhost:4000/api/health/ready
    
    Check that it worked

    It prints {"database":"ok","redis":"ok","s3":"ok","status":"ok"}. The first start creates the tables and the built-in agents: until it ends, the answer reads "status": "starting", with HTTP status 503. A dependency that does not answer turns its own field into an error, such as "s3":"error: bucket not found". The healthcheck of xtm-docker asks /api/health, which answers as soon as the server listens, so healthy in docker compose ps comes before ready.

  5. Open https://xtm-one.example.com and sign in once, then read the last request in the access log of XTM One.

    docker compose logs --tail 200 xtm-one | grep '"http_request"' | tail -n 1
    
    Check that it worked

    client_ip is the address of your workstation. The gateway address there means that FORWARDED_ALLOW_IPS does not name the proxy: correct it and restart xtm-one.

Connect a language model

  1. Sign in at https://xtm-one.example.com with XTM_ONE_ADMIN_EMAIL and XTM_ONE_ADMIN_PASSWORD.
  2. Open Settings > AI and models > Models, click Add Provider, choose the provider, enter its API key and the models to offer. See Set up the platform in Settings.
  3. Add the license: Settings > Platform > Enterprise License, or the certificate in XTM_ONE_ENTERPRISE_LICENSE, which then locks the field. Skip this step when a registered OpenCTI or OpenAEV has the Enterprise Edition.

To keep the provider in the configuration of the deployment instead, set its key as a variable of the xtm-one service: LLM_PROVIDER_<NAME>_API_KEY, where <NAME> is OPENAI, ANTHROPIC, GEMINI, MISTRAL, AZURE_OPENAI, BEDROCK, OPENROUTER, OLLAMA, LITELLM or CUSTOM_OPENAI. XTM One applies it at each start, and Models shows the provider with an Env badge. Language models lists the variables that go with it.

XTM One 1.261119.1
Check that it worked

Open Chat and ask "What can you do?". The CTEM Assistant, the default agent of every person, answers in a few seconds. An error that names the provider or the model means the key or the model is wrong.

ExampleBring XTM One into service at Grand Meridian Hotels

Marc Dupuis, of IT operations at Grand Meridian Hotels, installed the stack on xtm-one.grand-meridian.example and its sister host names, behind Nginx on the Docker host. The stack's network gateway is 172.18.0.1. He keeps the Anthropic key in the team's secret store and adds it to .env as a named variable, XTM_ONE_ANTHROPIC_API_KEY, then writes docker-compose.override.yml:

services:
  xtm-one:
    environment:
      - FORWARDED_ALLOW_IPS=172.18.0.1
      - LLM_PROVIDER_ANTHROPIC_API_KEY=${XTM_ONE_ANTHROPIC_API_KEY}
      - LLM_PROVIDER_ANTHROPIC_MODELS=claude-sonnet-5,claude-haiku-4-5-20251001
      - DEFAULT_MODEL=claude-sonnet-5

After docker compose up -d, /api/health/ready answers "status":"ok", and Hélène Marchetti, the CISO, signs in with XTM_ONE_ADMIN_EMAIL, helene.marchetti@grand-meridian.example, the admin email of OpenCTI and OpenAEV too. Models shows Anthropic with its Env badge, and the license OpenCTI holds gives XTM One its Enterprise Edition once OpenCTI registers.

How XTM One reads its settings

  • Two containers. xtm-one serves the interface, the API and the chat; xtm-one-worker runs the background work. Both read the public URL, the secret, the database, the storage and the license, and must have the same values. A variable this page gives for one container only is read by that one.
  • Read at start. After a change, run docker compose up -d: Docker Compose recreates the containers whose configuration changed. A value XTM One refuses, such as a malformed list or a negative limit, stops it at start with a message that names the variable.
  • Variable or screen. Agents, language models, single sign-on and most security options are set in Settings and stored in the database. Where a screen field has a variable, the variable wins when it is set: the field shows it read-only, and a change from the screen is refused.

xtm-docker passes XTM One a fixed list of variables, built from .env:

In .env of xtm-dockerXTM One variableContainers
XTM_ONE_EXTERNAL_SCHEME, XTM_ONE_HOST, XTM_ONE_PORTBASE_URL, FRONTEND_URLBoth
XTM_ONE_ADMIN_EMAIL, XTM_ONE_ADMIN_PASSWORDADMIN_EMAIL, ADMIN_PASSWORDBoth
XTM_ONE_SECRET_KEYSECRET_KEYBoth
XTM_ONE_POSTGRES_USER, XTM_ONE_POSTGRES_PASSWORDDATABASE_URL, on the xtm_one database of pgsqlBoth
MINIO_ROOT_USER, MINIO_ROOT_PASSWORD, XTM_ONE_S3_BUCKETS3_ACCESS_KEY, S3_SECRET_KEY, S3_BUCKETBoth
PLATFORM_REGISTRATION_TOKENPLATFORM_REGISTRATION_TOKENBoth
XTM_ONE_ENTERPRISE_LICENSEENTERPRISE_LICENSEBoth
XTM_ONE_LOG_LEVEL, XTM_ONE_LOG_FORMATLOG_LEVEL, LOG_FORMATBoth
FixedPLATFORM_MODE=xtm_one, REDIS_URL=redis://redis:6379, S3_ENDPOINT=minio:9000, S3_USE_SSL=falseBoth
FixedOPENCTI_API_URL=http://opencti:8080, OPENAEV_API_URL=http://openaev:8080, OPENCRQ_API_URL=http://opencrq:3002, XTM_AUTH_ACCEPTED_AUDIENCES=http://xtm-one:4000xtm-one
XTM_ONE_CUSTOM_TOOL_SANDBOX, OPENSANDBOX_API_KEY, XTM_ONE_OPENSANDBOX_IMAGES, XTM_ONE_OPENSANDBOX_NETWORK_ALLOWCUSTOM_TOOL_SANDBOX, OPENSANDBOX_API_KEY, OPENSANDBOX_IMAGES, OPENSANDBOX_NETWORK_ALLOW, with OPENSANDBOX_DOMAIN=opensandbox:8090: see Run code in OpenSandboxBoth

Any other variable goes in docker-compose.override.yml, under the environment of the service, above the # Pinned versions line: see Change the stack without editing docker-compose.yml.

Secrets and the administrator

VariableDefaultWhat to know
SECRET_KEYRequiredSigns the sessions and the tokens XTM One sends, and encrypts the credentials it stores: provider keys, integration secrets, OAuth tokens. Never change it once XTM One has started. Changed or lost, every stored credential becomes unreadable and every session ends, with no way back but the old value
ADMIN_EMAILadmin@filigran.io in the moduleThe administrator account. At every start, XTM One creates it or makes it an active administrator again
ADMIN_PASSWORDRequiredThe password of that account, applied again at every start. At most 72 bytes: a longer value stops the platform
ADMIN_TOKENNoneAn API key for that account, for automation: it starts with fcp- and has 32 characters or more

Because the administrator's password follows .env at every start, .env gives control of XTM One: keep it readable by its owner only (chmod 600 .env), out of version control, with a copy in your secret store. Change the password in .env, then restart.

Public URL and reverse proxy

VariableDefaultWhat to know
BASE_URLhttp://localhost:4000 in the moduleThe public URL people open. It builds the links of emails and of single sign-on, and it is the issuer of every token XTM One signs for OpenCTI, OpenAEV and OpenCRQ: set the same value on both containers, as xtm-docker does
FRONTEND_URLSame as BASE_URLWhere the browser comes back after a single sign-on. Mail clients load the images of XTM One's emails from it, under /email-assets/
FORWARDED_ALLOW_IPS127.0.0.1The proxies XTM One trusts, on xtm-one: an address, a CIDR network or a comma-separated list. It reads the client address from X-Forwarded-For and the scheme from X-Forwarded-Proto only on requests from them
TRUST_PROXY_HEADERSfalseTrusts the forwarded headers from any peer, and takes the leftmost X-Forwarded-For value, which a client can write. Leave it off and use FORWARDED_ALLOW_IPS
BASE_PATH, BASE_PATH_MODENone, autoServe XTM One under a path, such as /xtm-one. BASE_URL and FRONTEND_URL then end with the same path

Without FORWARDED_ALLOW_IPS naming the proxy, XTM One sees every request as plain HTTP from the proxy's address: the audit log records that address for every person, the per-address rate limits of the sign-in and password reset count everyone as one client, and the agent-to-agent endpoints refuse every request with 403 https required. XTM One reads FORWARDED_ALLOW_IPS when it starts: it is not a field of Settings > Access and security. It resolves no host name, and a network must have its host bits at zero (10.42.0.0/16, not 10.42.0.1/16); it logs any other entry at start, and that entry trusts nobody. Behind several proxies, such as a load balancer then an ingress, list each one. * trusts every peer: use it only when nothing but the proxy reaches the container.

Give XTM One its own host name, like the other platforms. Under BASE_PATH, the health endpoints and /metrics stay at the root of the container's port, and the prefix must not start with a path XTM One serves itself, such as /api, /mcp or /xtm: the platform refuses it at start. See the URLs of the reference.

Language models

An administrator can add providers in Settings > AI and models > Models. To keep them in the configuration of the deployment instead, set them on xtm-one: the platform applies them at each start, and the worker reads them from the database.

VariableDefaultWhat it sets
LLM_PROVIDER_<NAME>_API_KEYNoneThe key of a provider. <NAME> is OPENAI, ANTHROPIC, GEMINI, MISTRAL, AZURE_OPENAI, BEDROCK, OPENROUTER, OLLAMA, LITELLM, CUSTOM_OPENAI or FILIGRAN_GATEWAY. The provider shows an Env badge and cannot be deleted from the screen: remove the variable and restart to remove it
LLM_PROVIDER_<NAME>_MODELSNoneThe models offered, comma-separated. Unset, XTM One leaves the list stored for the provider as it is. A provider with no list chats on its built-in model only while no other provider lists one. FILIGRAN_GATEWAY is the exception: unset while no other provider offers a chat model, XTM One asks the gateway for its models at each start
LLM_PROVIDER_MODELS_EDITABLEfalsefalse: the list of the variable is the catalog, rewritten at each start. true: it is a baseline that administrators can curate in Models
MODELS_ENV_PROVIDING_ONLYfalsetrue refuses every change to providers from the screen and the API
DEFAULT_MODELThe first model configuredThe default model of the agents, applied again at each start while a provider offers it
BYOLLM_ACTIVATEDfalseHands the language models to the administrators: DEFAULT_* values apply once, to an install that has no configuration of its own yet

For CUSTOM_OPENAI, an endpoint that speaks the OpenAI API, the value is the key, two vertical bars, then the base URL of the endpoint. For FILIGRAN_GATEWAY, the Filigran AI Gateway, the URL comes first, optionally followed by || and the provider it targets, then || and a token; without a token, XTM One signs its calls with its own token.

When LLM_PROVIDER_FILIGRAN_GATEWAY_MODELS is unset and no other provider offers a chat model, XTM One asks the gateway for its chat models at start and uses them as its list. It refreshes that list at every start, even once another provider offers chat models, until an administrator edits it in Models, which LLM_PROVIDER_MODELS_EDITABLE=true or BYOLLM_ACTIVATED=true allows. With either of these, the first listing also needs the gateway to have no list yet. A model the gateway stops listing leaves the list, but the agents and people that chose it keep their choice. If the gateway does not answer within 5 seconds, XTM One keeps the stored list and logs could not list the filigran_gateway models.

When every provider that chats lists no model, Models says so: "The configured LLM providers offer no model. Agentic and LLM-powered platform features are unavailable until one does." For a provider set by its variable, whose models administrators cannot edit, an administrator also reads the variable to set, such as "Set LLM_PROVIDER_OPENAI_MODELS and restart, or set LLM_PROVIDER_MODELS_EDITABLE=true to select its models here."

On a host without internet access, use a model served on your network, through OLLAMA, LITELLM or CUSTOM_OPENAI. The rest of the AI settings, such as image and speech models, are in AI providers.

Edition and AI

VariableDefaultWhat it sets
ENTERPRISE_LICENSENoneThe Filigran license certificate, in PEM form, on both containers. It can also be pasted in Settings > Platform > Enterprise License; the variable then locks the field
PLATFORM_MODExtm_oneai_disabled starts XTM One with AI switched off: its screens and data stay available, and no agent runs. See Run XTM One with AI switched off

XTM One is in the Enterprise Edition with its own license, or when a registered OpenCTI or OpenAEV has one. A license certificate spans several lines: pasting it in Enterprise License is simpler than a variable.

Connect the modules to each other registers OpenCTI and OpenAEV with XTM One and explains the public and internal URLs. On the side of XTM One:

VariableDefaultWhat it sets
PLATFORM_REGISTRATION_TOKENNoneThe secret every platform registers with. Unset, XTM One refuses every registration. The published default of the module's Compose file, xtm-default-registration-token, keeps registered platforms connected but registers no new one, and XTM One then sends the platforms no license certificate. After 10 failed attempts in a minute, a client is refused with HTTP 429 until the minute ends
OPENCTI_API_URL, OPENAEV_API_URL, OPENCRQ_API_URLThe URL each platform registers withWhere XTM One calls each platform, fetches its signing keys and, for OpenAEV, sends its callbacks. Every link people get stays on the registered public URL. A change applies at the platform's next registration, within 5 minutes
XTM_AUTH_ACCEPTED_AUDIENCESNoneThe URLs the platforms reach XTM One on when they differ from BASE_URL, comma-separated. A platform version that addresses its tokens to that URL is refused unless it is listed

OPENGRC_API_URL, the former name of OPENCRQ_API_URL, is read until 31 December 2026, with a warning in the logs.

Mail

XTM One sends invitations, password resets and announcements of model changes by email. Neither xtm-docker nor the module's Compose file passes it a mail server: until you set SMTP_HOSTNAME, XTM One sends nothing, and writes the link of a password reset in its log instead.

VariableDefaultWhat it sets
SMTP_HOSTNAME, SMTP_PORTNone, 587The mail relay
SMTP_USERNAME, SMTP_PASSWORDNoneThe account, when the relay asks for one
SMTP_FROMSMTP_USERNAMEThe sender address
SMTP_STARTTLStrueUpgrades the connection with STARTTLS, as port 587 expects. For a relay with TLS from the start, on port 465, set SMTP_USE_TLS=true

Set them on both containers, and set SMTP_FROM_NAME, the name people see as the sender, to the name of your platform. The example at the end of this page reuses the mail settings of the stack.

Security headers

XTM One sends a Content Security Policy on every page it serves, which tells the browser which scripts, styles and connections the page may use. Set these on xtm-one:

VariableDefaultWhat it sets
CONTENT_SECURITY_POLICY_MODEreport-onlyreport-only blocks nothing: browsers report what the policy would block. enforce blocks it. off sends no policy. Any other value stops the platform
CONTENT_SECURITY_POLICY_FRAME_ANCESTORSNoneThe other sites allowed to show XTM One in a frame once the policy is enforced, such as an intranet portal: https://portal.example.com, comma-separated

XTM One never sends X-Frame-Options, and your proxy must not add it: it would break the Microsoft Teams tab, the Office add-in and the sites you allow to frame XTM One. Until the policy is enforced, any site can frame XTM One. Once it is, XTM One itself, the sites you list and the registered platforms may frame it; the registered platforms only while PLATFORM_REGISTRATION_TOKEN is a value of your own, and at most 20 of them.

To move to enforce:

  1. Run in report-only for a few days of normal use: the chat, reports and decks, settings, and every site that embeds XTM One.
  2. Read Settings > Access and security > Security audit: it lists the violations browsers reported in the last 7 days, by directive. The log of xtm-one names each new one once, in a line that starts with CSP violation first seen. Violations that browser extensions cause are counted apart.
  3. Set CONTENT_SECURITY_POLICY_MODE=enforce and run docker compose up -d.
XTM One 1.261119.1
Check that it worked
curl -sI https://xtm-one.example.com/ | grep -i '^content-security-policy'

The header reads content-security-policy:, without -report-only. To go back, set report-only again: nothing else is stored.

Run code in OpenSandbox

Custom tools, the code interpreter and the checks and services an agent starts in a repository workspace run their code in a sandbox. They are off until an administrator turns them on in Settings > Access and security. CUSTOM_TOOL_SANDBOX on both containers decides where the code runs:

ValueWhere the code runs
autoxtm-docker's default, XTM_ONE_CUSTOM_TOOL_SANDBOX=auto. A hardened Docker container when the platform can start one, otherwise a restricted process of the XTM One containers. The checks and services of a repository workspace need OpenSandbox: see Run the repository's checks
opensandboxOne container per run, started by an OpenSandbox server. Also used by the code interpreter

xtm-docker ships OpenSandbox as the opensandbox profile of modules/xtm-one.yml, off by default. Its server mounts the socket of the container engine to start those containers, which gives it control of every container of the host. To run it, set in .env:

COMPOSE_PROFILES=opensandbox
XTM_ONE_CUSTOM_TOOL_SANDBOX=opensandbox

Then run docker compose up -d: the opensandbox service starts, and xtm-one and xtm-one-worker are recreated with the new value.

In .env of xtm-dockerXTM One variableWhat it sets
OPENSANDBOX_API_KEYOPENSANDBOX_API_KEYThe key XTM One sends to the server, and the server's own key. init-env.sh draws it; the server does not start without one
XTM_ONE_OPENSANDBOX_IMAGESOPENSANDBOX_IMAGESThe image of each language. xtm-docker runs the published xtmone/sandbox-python and xtmone/sandbox-nodejs, at the tags of the XTM One release. They are published for linux/amd64 only
XTM_ONE_OPENSANDBOX_NETWORK_ALLOWOPENSANDBOX_NETWORK_ALLOWThe domains the sandboxes may reach. Empty, they reach nothing
CONTAINER_ENGINE_SOCKETNoneThe socket the server mounts, /var/run/docker.sock by default. Under rootless Podman, $XDG_RUNTIME_DIR/podman/podman.sock

xtm-docker points XTM One to the server at opensandbox:8090. The containers the server starts publish their ports on the host, which XTM One reaches as host.docker.internal. See OpenSandbox in the reference for the other settings.

Install packages in the sandbox through a mirror

When XTM One runs its sandbox on OpenSandbox, the checks and services an agent runs in a workspace (sandbox_run_command, sandbox_start_service) run in containers of their own. By default, npm, Yarn, pip and uv install there only the packages their images hold. To let them install others without opening the internet to those containers, run a read-only mirror of npm and PyPI and name it on both containers:

VariableDefaultWhat it sets
SANDBOX_REGISTRY_MIRROR_URLNoneThe mirror, such as http://registry-mirror:8080. Its host joins the egress of the command and service containers, on top of OPENSANDBOX_NETWORK_ALLOW, and npm, Yarn, corepack, pip and uv install from its /npm/ and /pypi/simple/ paths. The code interpreter and custom tools never use it. An address that is not http or https, or that holds a user, a password, a query or a fragment, stops XTM One at start

The module ships a mirror, backend/sandbox/registry-mirror/nginx.conf, for an unprivileged nginx (nginxinc/nginx-unprivileged) with the file mounted as /etc/nginx/nginx.conf, on port 8080. It answers only GET and HEAD on the packages of npm and PyPI and refuses every other path with 403, so no one can publish or sign in through it. It drops the Authorization and Cookie headers, holds no credential, and rewrites the download links of the registries to itself. Its container needs DNS and egress to registry.npmjs.org, pypi.org and files.pythonhosted.org. It resolves them through the Kubernetes DNS, kube-dns.kube-system.svc.cluster.local: elsewhere, change its resolver line to the resolver of your network.

Keep the three registries out of OPENSANDBOX_NETWORK_ALLOW, so that the mirror stays the only way to them. With xtm-docker, add the variable to docker-compose.override.yml:

services:
  xtm-one:
    environment:
      - SANDBOX_REGISTRY_MIRROR_URL=http://registry-mirror:8080
  xtm-one-worker:
    environment:
      - SANDBOX_REGISTRY_MIRROR_URL=http://registry-mirror:8080

Size the platform and the worker

VariableDefaultWhat it sets
WEB_WORKERS2The processes of xtm-one that serve the interface, the API and the chat. Raise it when many people chat at the same time: about twice the CPU cores plus one
WORKER_CONCURRENCY20The background jobs each worker container runs at once. Add worker replicas when jobs queue
MAX_CONCURRENT_RUNS10The assignment runs in parallel
DB_POOL_SIZE, DB_MAX_OVERFLOW15, 10The PostgreSQL connections of each process

Every process opens its own pools: DB_POOL_SIZE plus DB_MAX_OVERFLOW connections, and up to 10 more for the traces of agent runs, so 35 with the defaults. Count every web process and every worker replica against max_connections of PostgreSQL, which xtm-docker sets to 200 for XTM One, OpenAEV and OpenCRQ together, OpenAEV taking up to 20 and OpenCRQ about 50 at peak. With the defaults, XTM One takes up to 105: 35 for each of its 2 web processes and its worker.

To add worker replicas, set deploy.replicas on xtm-one-worker in docker-compose.override.yml, and count each one in the connections.

ExampleSend mail and serve the Grand Meridian intranet portal

Grand Meridian Hotels shows XTM One in its intranet portal, https://portal.grand-meridian.example, and wants invitations to reach new members of the SOC. Marc Dupuis, of IT operations, reuses the mail relay that .env already gives OpenAEV, gives the four-core host one more web process per core, and adds to docker-compose.override.yml:

services:
  xtm-one:
    environment:
      - SMTP_HOSTNAME=${SMTP_HOST}
      - SMTP_PORT=${SMTP_PORT}
      - SMTP_USERNAME=${SMTP_USERNAME}
      - SMTP_PASSWORD=${SMTP_PASSWORD}
      - SMTP_FROM=xtm-one@grand-meridian.example
      - SMTP_FROM_NAME=XTM One
      - CONTENT_SECURITY_POLICY_MODE=enforce
      - CONTENT_SECURITY_POLICY_FRAME_ANCESTORS=https://portal.grand-meridian.example
      - WEB_WORKERS=4
  xtm-one-worker:
    environment:
      - SMTP_HOSTNAME=${SMTP_HOST}
      - SMTP_PORT=${SMTP_PORT}
      - SMTP_USERNAME=${SMTP_USERNAME}
      - SMTP_PASSWORD=${SMTP_PASSWORD}
      - SMTP_FROM=xtm-one@grand-meridian.example
      - SMTP_FROM_NAME=XTM One

With 4 web processes and one worker, XTM One takes up to 175 connections, and OpenAEV 20: 195, under the 200 of pgsql. After docker compose up -d, Hélène Marchetti invites Paul Garnier from Administration > Users and groups, and his invitation arrives from XTM One <xtm-one@grand-meridian.example>.

Where the data is

DataWhere, in xtm-docker
Agents, conversations, knowledge base chunks and their vectors, assignments, traces, settings, and the encrypted credentialsThe xtm_one database of pgsql, in the pgsqlshareddata volume
Uploaded documents, chat attachments, generated reports and decks, large trace payloadsThe xtm-one-files bucket of minio, in the s3data volume
Queued jobs, the state of running chats, rate limitsRedis, in the redisdata volume. Working state: XTM One rebuilds it

Back them up with the rest of the stack, together with .env: without the same XTM_ONE_SECRET_KEY, a restored XTM One cannot read the credentials it stores. See Back up and restore.

What's next

NextConfigure the shared services
Deploy
Install, configure, secure, scale and upgrade the platform.

Published

Overview
Run the XTM platform locally
OverviewDeploy with an AI agent