# Deploy the XTM platform

> Run OpenCTI, OpenAEV, OpenCRQ and XTM One side by side behind your reverse proxy, registered with each other around XTM One, sharing one license, and watched.

- URL: https://filigran.io/docs/lts/7.260309-lts/workflows/deploy-the-suite/
- Products: XTM One 1.261119.1, OpenCTI 7.260309.0-lts.8, OpenAEV 3.261118.0, OpenCRQ 0.261123.0
- OpenCTI line: 7.260309 LTS · 7.260309.0-lts.8
- For: platform engineers, administrators
- Type: Journey

At the end of this journey, OpenCTI, OpenAEV, OpenCRQ and XTM One run on one host with the official Docker deployment, [FiligranHQ/xtm-docker](https://github.com/FiligranHQ/xtm-docker), behind your reverse proxy over HTTPS. Each platform has registered with XTM One with the same secret, XTM One works with their data as the person who asks, one Filigran license gives the platform its Enterprise Edition, and you know which endpoints and logs tell you it is healthy. A platform engineer drives it; an administrator takes over each platform once it answers. The steps below are the pages to follow, in order.

**Diagram: The stack is planned, installed on one host with OpenCRQ, connected around XTM One, then watched and upgraded**

- Plan: Architecture and host (Modules, shared services)
- Install: Stack running (xtm-docker, one host), XTM One usable (Proxy, model, license), OpenCRQ signed in (Through XTM One)
- Connect: Platforms registered (One registration token)
- Operate: Stack watched (Health, metrics, audit), Stack upgraded (Backup, then new images)

Connections:

- Architecture and host → Stack running: modules and host
- Stack running → XTM One usable: public URL
- Stack running → OpenCRQ signed in: database and bucket
- XTM One usable → Platforms registered: registrations
- OpenCRQ signed in → Platforms registered: registration
- Platforms registered → Stack watched: one license
- Stack watched → Stack upgraded: maintenance window

## Who takes part {#who-takes-part}

- **Platform engineers** plan the stack, prepare the host, install the modules, connect them, set the configuration of XTM One, monitor it and upgrade the stack (steps 1 to 9).
- **Administrators** sign in first with the admin accounts of `.env`, add the language model and the license in XTM One (step 4), sign in to OpenCRQ through XTM One as its super administrator (step 5), then hand access to the teams.

## Why it spans several modules {#why-it-spans-several-modules}

The modules are built to run as one stack, with XTM One at its center:

- **Shared services.** OpenCTI, OpenAEV, XTM One and OpenCRQ keep their data in one set of backing services: Elasticsearch, RabbitMQ, Redis, S3 storage (RustFS) and PostgreSQL with pgvector. Each module keeps to its own index prefix, bucket and database, so one instance of each service is enough.
- **Registration.** OpenCTI, OpenAEV and OpenCRQ register with XTM One with one shared secret, `PLATFORM_REGISTRATION_TOKEN`, then register again every 5 minutes as a heartbeat. Once registered, XTM One agents work with their data, and their users get **Ask Ariane**, which OpenCRQ offers in its Enterprise Edition only.
- **Calls as a person.** XTM One calls each platform as the person who asks, and the platform applies that person's rights. The tokens of these calls name the public URL of their issuer, so the public URLs you set are also the identities of the modules.
- **People matched across modules.** XTM One finds a person in OpenCTI and OpenAEV by email: the administrator's email must be the same in XTM One, OpenCTI and OpenAEV. OpenCRQ finds the account tied to the person's XTM One account at their sign-in through XTM One, never by email.
- **One license.** A Filigran license installed in XTM One travels back, in the registration answer, to each platform it names as a sub-license. It decides the edition of OpenCRQ, which holds no license of its own. An OpenCTI or OpenAEV with an Enterprise Edition license of its own also gives XTM One its Enterprise Edition.

Installed apart, each module needs its own services, OpenCTI and OpenAEV need a license each, OpenCRQ does not start without XTM One, and no assistant reads across the modules. What each part is and which service it uses is in [The XTM stack: modules and shared services](https://filigran.io/docs/lts/7.260309-lts/deploy/plan/architecture/); how a request carries a person's identity is in [XTM One in OpenCTI](https://filigran.io/docs/xtm-one/use/in-opencti/).

## What you need {#what-you-need}

- A Linux host, `linux/amd64`, with Docker Engine 20.10 or later and Docker Compose 2.24.4 or later, 16 GB of RAM and 50 GB of free disk at least, 32 GB of RAM for production, and about 5 GB more for OpenCRQ. See [Requirements](https://filigran.io/docs/lts/7.260309-lts/deploy/plan/requirements/) and [Sizing](https://filigran.io/docs/lts/7.260309-lts/deploy/plan/sizing/).
- A host name per platform, and a reverse proxy that serves them over HTTPS: see [Publish the platforms over HTTPS](https://filigran.io/docs/lts/7.260309-lts/deploy/install/reverse-proxy/).
- A Filigran license certificate for the Enterprise Edition, and the API key of a language model provider or the address of a model on your network.
- A mail relay for OpenCTI, OpenAEV and XTM One.
- On the host, a shell account that runs `sudo` and Docker. In the modules, the admin accounts that `.env` creates are the first administrators: no role is needed before them.

## How it unfolds {#how-it-unfolds}

The story: Example CERT runs the XTM platform for the hotel chains it serves. Its platform engineer installs the stack on one host, behind Nginx on the same host, with OpenCTI at `https://opencti.example.com`, OpenAEV at `https://openaev.example.com`, XTM One at `https://xtm-one.example.com` and OpenCRQ at `https://opencrq.example.com`. The CERT's administrator, `admin@example.com`, takes over each platform.

### Plan the stack {#plan-the-stack}

xtm-docker starts the whole stack, and no module is optional ([step 1](https://filigran.io/docs/lts/7.260309-lts/deploy/plan/architecture/)). XTM One runs as `xtm-one`, the interface and its API, and `xtm-one-worker`, the background work. OpenCTI and OpenAEV run with their default integrations, and XTM Composer manages the integrations of both. Elasticsearch, RabbitMQ, Redis, S3 storage and PostgreSQL serve them all. OpenCRQ starts with them, with its own database in the same PostgreSQL and its own bucket in the same S3 storage.

### Prepare the host {#prepare-the-host}

The engineer checks the versions of Docker and Docker Compose, the processor and the memory, and raises `vm.max_map_count` for Elasticsearch ([step 2](https://filigran.io/docs/lts/7.260309-lts/deploy/plan/requirements/)). xtm-docker already sets what the shared services need, such as `max_connections=200` on PostgreSQL for OpenAEV, XTM One and OpenCRQ together.

### Install the stack on one host {#install-the-stack-on-one-host}

In a clone of xtm-docker, `.env` gets fresh secrets for every password, key and token, and a copy goes to the team's secret store ([step 3](https://filigran.io/docs/lts/7.260309-lts/deploy/install/docker-compose/)). `OPENCTI_ADMIN_EMAIL`, `OPENAEV_ADMIN_EMAIL` and `XTM_ONE_ADMIN_EMAIL` all read `admin@example.com`. Each platform's public URL is built from its `*_EXTERNAL_SCHEME`, `*_HOST` and `*_PORT`, here `https`, its host name and `443`. `docker-compose.override.yml` publishes OpenCTI on `127.0.0.1:8080`, OpenAEV on `127.0.0.1:8081`, XTM One on `127.0.0.1:8090` and OpenCRQ on `127.0.0.1:8082` for the proxy, keeps Elasticsearch and Redis on the host itself, and pins the versions: OpenCTI `7.261119.0`, OpenAEV `3.261118.0`, XTM One `1.261119.1`, OpenCRQ `0.261123.0`.

### Make XTM One usable {#make-xtm-one-usable}

Behind the proxy, XTM One must know which address the proxy reaches it from: `FORWARDED_ALLOW_IPS=172.18.0.1`, the gateway of the stack's network, under `xtm-one` in the override file ([step 3](https://filigran.io/docs/lts/7.260309-lts/deploy/configure/xtm-one/#finish-the-setup-after-the-install)). The proxy keeps requests open for 300 seconds, since an agent's answer can take minutes. `/api/health/ready` answers `"status":"ok"` once the start is complete. The administrator signs in, adds the language model in **Administration** > **Settings** > **AI and models** > **Models**, or the engineer sets it as `LLM_PROVIDER_ANTHROPIC_API_KEY`, and the license goes in **Administration** > **Settings** > **Platform**, with **Install License** on the **Enterprise License** card.

### Add OpenCRQ {#add-opencrq}

OpenCRQ starts with the stack, after two one-shot services ([its setup](https://filigran.io/docs/lts/7.260309-lts/deploy/configure/opencrq/#finish-the-setup-after-the-install)): `opencrq-db-init`, which creates the role of OpenCRQ, `OPENCRQ_POSTGRES_USER`, and the `opencrq` database it owns in the shared PostgreSQL, and `opencrq-bucket-init`, which creates its bucket in the S3 storage. `XTM_ONE__TOKEN` takes `PLATFORM_REGISTRATION_TOKEN`, and `OPENCRQ_API_URL=http://opencrq:3002` on `xtm-one` lets XTM One call it inside the stack. The log reads `Registered with XTM One`. At its first start, OpenCRQ creates its first tenant, `Default`, which the OpenCTI and OpenAEV connectors of xtm-docker feed. OpenCRQ has no account to create: once the proxy publishes it, the administrator clicks **Sign in with XTM One** as `admin@example.com`, XTM One's administrator, and becomes its super administrator.

### Connect the platforms around XTM One {#connect-the-platforms-around-xtm-one}

`PLATFORM_REGISTRATION_TOKEN` holds one random value, read by OpenCTI, OpenAEV, OpenCRQ and both XTM One containers ([step 6](https://filigran.io/docs/lts/7.260309-lts/deploy/configure/connect-modules/)). After `docker compose up -d`, the platforms register within minutes, and **My Profile** > **MCP Endpoint** in XTM One shows each platform as `Connected`. OpenAEV also registers in OpenCTI as the connector `OpenAEV Coverage - <tenant>`, which answers security coverage requests. The clocks stay synchronized with NTP: XTM One refuses a token from a clock more than 60 seconds ahead.

### Finish the configuration of XTM One {#finish-the-configuration-of-xtm-one}

Neither xtm-docker nor the module's Compose file passes XTM One a mail server: until `SMTP_HOSTNAME` is set on both containers, XTM One sends no invitation and writes the link of a password reset in its log ([step 7](https://filigran.io/docs/lts/7.260309-lts/deploy/configure/xtm-one/)). The same page sets the security headers of its pages and the size of its processes. `XTM_ONE_SECRET_KEY` never changes once XTM One has started: it encrypts the credentials XTM One stores.

### Watch it {#watch-it}

The engineer monitors `/api/health/ready` as well as `/api/health`: the healthcheck of xtm-docker asks `/api/health`, which answers as soon as the server listens ([step 8](https://filigran.io/docs/lts/7.260309-lts/deploy/operate/xtm-one/)). Prometheus metrics, one JSON line per request in the logs, and the **Security audit** section of **Administration** > **Settings** > **Access and security** complete the picture: the audit flags a published registration token or a proxy XTM One does not trust.

### Upgrade {#upgrade}

Each upgrade starts with a snapshot of Elasticsearch and a copy of the other volumes, then `git pull`, the new pinned versions, `docker compose pull` and `docker compose up -d` ([step 9](https://filigran.io/docs/lts/7.260309-lts/deploy/upgrade/)). OpenCTI and OpenAEV migrate their data as they start. The [breaking changes](https://filigran.io/docs/lts/7.260309-lts/deploy/upgrade/breaking-changes/) say what to do before and after, and the [compatibility matrix](https://filigran.io/docs/lts/7.260309-lts/deploy/upgrade/compatibility/) which versions work together.

## The steps {#the-steps}

Each step opens its page; the first one starts the journey, and every page of it then shows where you are.

**The steps of Deploy the XTM platform**

1. Plan the architecture ([The XTM stack: modules and shared services](https://filigran.io/docs/lts/7.260309-lts/deploy/plan/architecture/), 6 min): How the XTM stack is built around XTM One, which shared service each module uses, and how the modules connect to each other.
2. Check the requirements ([Requirements](https://filigran.io/docs/lts/7.260309-lts/deploy/plan/requirements/), 4 min): What the host and the shared services must provide to run OpenCTI, OpenAEV, OpenCRQ and XTM One, with the versions each module supports.
3. Install with Docker Compose ([Install with Docker Compose](https://filigran.io/docs/lts/7.260309-lts/deploy/install/docker-compose/), 12 min): Install the XTM stack for production on one host with the official Docker Compose deployment, with secrets, public URLs, persistent data and pinned versions.
4. Finish the setup of XTM One ([Configure XTM One](https://filigran.io/docs/lts/7.260309-lts/deploy/configure/xtm-one/), 23 min): 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.
5. Finish the setup of OpenCRQ ([Configure OpenCRQ](https://filigran.io/docs/lts/7.260309-lts/deploy/configure/opencrq/), 24 min): Finish the setup of OpenCRQ after the install and sign in to its first tenant, then set its database, storage, XTM One, connector, telemetry and HTTP settings.
6. Connect the modules ([Connect the modules to each other](https://filigran.io/docs/lts/7.260309-lts/deploy/configure/connect-modules/), 11 min): Register OpenCTI, OpenAEV and OpenCRQ with XTM One, link OpenCTI and OpenAEV, connect OpenCRQ to both, and give XTM Composer its tokens, with the public and internal URLs each link uses.
7. Monitor XTM One ([Monitor and troubleshoot XTM One](https://filigran.io/docs/lts/7.260309-lts/deploy/operate/xtm-one/), 9 min): Watch XTM One through its health endpoints, metrics, logs and security audit, and find the cause when it does not start, chat does not stream or agents do not answer.
8. Upgrade ([Upgrade](https://filigran.io/docs/lts/7.260309-lts/deploy/upgrade/), 9 min): Upgrade an XTM stack deployed with Docker Compose to new images, after a backup, and know what each platform migrates on its own.

## Where to go next {#where-to-go-next}

- [Sign in the first time and keep an emergency account](https://filigran.io/docs/lts/7.260309-lts/deploy/configure/first-access/), before you turn on single sign-on.
- [Configure OpenCRQ](https://filigran.io/docs/lts/7.260309-lts/deploy/configure/opencrq/), to connect another tenant to OpenCTI and OpenAEV.
- [Back up and restore](https://filigran.io/docs/lts/7.260309-lts/deploy/operate/backup/), to keep the volumes and `.env` together.
- [Deploy integrations across the platform with XTM Composer](https://filigran.io/docs/lts/7.260309-lts/workflows/composer-rollout/), to run the integrations of OpenCTI and OpenAEV from their interface.
