How-to guide

Start the whole stack on an existing deployment

Bring a deployment that ran only some modules of the XTM stack to the whole stack, which xtm-docker now always starts, with what to check and what happens to the data.

All modulesFor platform engineers

The official Docker deployment, FiligranHQ/xtm-docker, has no optional module: docker compose up -d starts the whole XTM platform, 32 services. XTM One, OpenCTI, OpenAEV, OpenCRQ, XTM Composer, their default integrations and the shared services always run together. This page brings a deployment that ran only some of them, with a COMPOSE_PROFILES line in .env, to the whole stack: what to clean in .env, what to check on the host, and what happens to the data.

YOUDOCKER COMPOSETHE STACKDATAClean .envCOMPOSE_PROFILES and Composerswitches outdocker compose up -dAfter docker compose pullModules that ranRecreated when their configurationchangedNew modulesCreated: OpenCTI, OpenAEV, XTMComposer...Shared volumesesdata, pgsqlshareddata, s3data andothers
  1. Clean .env → docker compose up -d: after git pull
  2. docker compose up -d → Modules that ran: keeps or recreates
  3. docker compose up -d → New modules: starts
  4. Modules that ran → Shared volumes: data stays
  5. New modules → Shared volumes: creates its own
A deployment that ran only some modules drops the lines that chose them from .env, pulls and runs up, and the whole stack starts beside the data already in the shared volumes

Before you start

  • A stack installed from xtm-docker, as Install with Docker Compose describes. Run the commands of this page from its folder.
  • For OpenCRQ, the admin of XTM One, who signs in to it with XTM One and lands in its first tenant, Default, which OpenCRQ creates at its first start: see Sign in to OpenCRQ.
  • A host sized for the whole stack: 16 GB of RAM at least, 32 GB recommended for production, and 50 GB of free disk. Sizing says how much each module needs.
  • A backup of the volumes and of .env: see Back up and restore.

What the stack runs

docker-compose.yml includes one file per shared service, under infra/, and one file per module, under modules/. Every service they list starts.

FileServices
modules/xtm-one.ymlxtm-one, xtm-one-worker, xtm-one-db-init
modules/opencti.ymlopencti, worker, and the default connectors: connector-export-file-stix, connector-export-file-csv, connector-export-file-txt, connector-import-file-stix, connector-import-document, connector-import-file-yara, connector-analysis, connector-import-external-reference, connector-opencti, connector-mitre
modules/openaev.ymlopenaev, and the default collectors and injectors: collector-mitre-attack, collector-openaev, collector-atomic-red-team, collector-nvd-nist-cve, injector-nmap, injector-nuclei
modules/opencrq.ymlopencrq, opencrq-db-init, opencrq-bucket-init
modules/xtm-composer.ymlxtm-composer, rsa-key-generator
infra/*.ymlelasticsearch, rabbitmq, redis, pgsql (PostgreSQL with pgvector), minio (RustFS, the S3 storage)

XTM Composer always manages both OpenCTI and OpenAEV.

Move to the whole stack

  1. Get the current deployment.

    git pull
    
  2. Remove the lines that no longer do anything from .env: COMPOSE_PROFILES, which listed the modules to start, and XTM_COMPOSER_OPENCTI_ENABLE and XTM_COMPOSER_OPENAEV_ENABLE, which turned XTM Composer off for one platform.

    sed -i.bak -E '/^(COMPOSE_PROFILES|XTM_COMPOSER_OPENCTI_ENABLE|XTM_COMPOSER_OPENAEV_ENABLE)=/d' .env
    
  3. Check that the modules you did not run have your own secrets, not the values of .env.sample. OpenCTI does not start with the sample values.

    grep -E '^(OPENCTI|OPENAEV)_(ADMIN_(PASSWORD|TOKEN|ENCRYPTION_KEY|ENCRYPTION_SALT)|ENCRYPTION_KEY|HEALTHCHECK_(ACCESS_)?KEY)=' .env
    

    A value such as changeme, ChangeMe_UUIDv4, 00000000-0000-0000-0000-000000000000 or an empty one needs a fresh one: a UUID for the admin tokens and health check keys, a 32-byte base64 key for OPENCTI_ENCRYPTION_KEY (openssl rand -base64 32), and a long random string for the others (openssl rand -hex 24). Set the admin email and the public URL of each new platform too, as Configure the stack describes.

  4. Prepare the host for the services you did not run. If Elasticsearch did not run, raise vm.max_map_count to 262144, as Prepare the host does. If docker-compose.override.yml binds the published ports to the host itself, add the services that were not in it, such as openaev or elasticsearch.

  5. If you pinned the versions, run the commands of Pin the image versions again: they pinned only the images of the services that ran, and now pin those of the whole stack.

  6. Download the images, then start the stack.

    docker compose pull
    docker compose up -d
    

    Docker Compose creates the services that did not run, recreates those whose configuration changed, such as xtm-composer, and leaves the others alone. The first start of OpenCTI or OpenAEV creates its indices and databases: allow a few minutes.

    Check that it worked
    docker compose config --services | wc -l
    docker compose ps --format '{{.Service}} {{.Health}}' | grep -E '^(opencti|openaev|xtm-one|opencrq) '
    

    The first command prints 32. Each platform then says healthy.

Then register the new platforms with XTM One and check the links between the modules, as Connect the modules to each other describes.

What happens to the data

The data of the modules that already ran stays in their volumes, and a platform that starts for the first time creates its own beside it. The volumes are shared between modules:

VolumeShared by
esdataOpenCTI and OpenAEV
pgsqlshareddataOpenAEV, XTM One and OpenCRQ
s3dataOpenCTI, OpenAEV, XTM One and OpenCRQ
redisdataOpenCTI and XTM One
amqpdataOpenCTI and OpenAEV
rsakeysXTM Composer

Their names start with COMPOSE_PROJECT_NAME, xtm_ by default.

Stop the whole stack

docker compose down stops every container of the stack. The volumes stay. docker compose down -v deletes them, with the data of every module.

What's next

NextXTM Composer
Deploy
Install, configure, secure, scale and upgrade the platform.

Published

Overview
Run the XTM platform locally
OverviewDeploy with an AI agent