Prepare a Windows development environment
Set up Windows to run OpenCTI from source in WSL 2, and OpenAEV natively or in WSL 2, with the tool versions their code requires.
This page prepares a Windows workstation to run OpenCTI or OpenAEV from source. For OpenCTI, you work in Windows Subsystem for Linux (WSL) 2 with Ubuntu, because its development scripts expect a Linux shell. OpenAEV runs natively on Windows or in WSL 2. When the tools are in place, continue with Build and run from source.
- Browser → Front end: opens
- Front end → Back end: proxies API calls
- Worker → Back end: API calls
- Back end → Elasticsearch: indexes
- Back end → Redis: streams and cache
- Back end → RabbitMQ: queues bundles
- Worker → RabbitMQ: consumes
- Back end → Silo: stores files
Before you start
- Windows 10 version 2004 or later, or Windows 11, with administrator rights.
- At least 8 GB of memory for OpenCTI: its development Elasticsearch starts with a 2 GB Java heap.
- Docker Desktop is free for personal use, education and small businesses; larger organizations need a paid subscription. Check its license terms for your organization, or run Docker Engine inside WSL 2 instead.
Why OpenCTI needs WSL 2
The OpenCTI code assumes Linux in three places:
scripts/with_python_virtual_env.mjs, behind thedeps:venv,dev:venvandtest:venvscripts, runsshand sources<venv>/bin/activate. A Windows virtual environment hasScripts\activateinstead.- The native modules
re2andnode-calls-pythoncompile at install time. On Windows, they would need Visual Studio Build Tools with the Desktop development with C++ workload, and Python headers. - The release images and the CI build on Linux (
node:22-alpine3.23), so a Linux environment behaves like them.
The repository forces LF line endings (* text=auto eol=lf in .gitattributes), so a clone works the same on both sides.
Set up WSL 2 for OpenCTI
-
In PowerShell run as administrator, install WSL 2 with Ubuntu 24.04, then restart Windows:
wsl --install -d Ubuntu-24.04At the first start, Ubuntu asks for a user name and a password for your Linux account.
-
Raise the memory map limit that Elasticsearch needs. Create or edit
%USERPROFILE%\.wslconfigwith:[wsl2] kernelCommandLine = "sysctl.vm.max_map_count=262144"Then restart WSL from PowerShell with
wsl --shutdown. The setting applies to every WSL 2 distribution, Docker Desktop's included. -
Install a container engine. Pick one.
Docker DesktopInstall Docker Desktop for Windows with the WSL 2 backend. In Docker Desktop, open Settings > Resources > WSL integration and turn on Ubuntu-24.04. The
dockercommand then works inside Ubuntu.Docker Engine in WSL 2Install Docker Engine inside Ubuntu, as Prepare an Ubuntu development environment describes. Skip its
vm.max_map_countstep:.wslconfigsets it. -
Open the Ubuntu terminal and install the rest of the tools as Prepare an Ubuntu development environment describes: Git,
build-essential, Python 3.12 withpython3-venvandpython3-dev, nvm, Node.js 22 and Corepack. -
Clone the repository inside the Linux file system, in your Linux home folder, not under
/mnt/c. The file watchers of the front end and the back end are slow and can miss changes on the Windows file system.
In the Ubuntu terminal:
node --version
python3 --version
docker compose version
cat /proc/sys/vm/max_map_count
Node.js prints v22.18.0 or later, Python prints Python 3.12, Compose prints its version, and the last command prints 262144.
A browser on Windows reaches the servers you start in WSL 2 at http://localhost:<port>. Visual Studio Code with its WSL extension, or IntelliJ IDEA with its WSL support, opens a project stored in WSL 2.
Set up Windows for OpenAEV
OpenAEV builds with Maven and Node.js, which run natively on Windows. The repository gives Windows variants of its setup commands, such as setup-auto-db.ps1. You can also follow the Ubuntu page inside WSL 2.
-
Install Java 21, Maven 3.9 or later and Git:
winget install EclipseAdoptium.Temurin.21.JDK winget install Apache.Maven winget install Git.Git -
Install Docker Desktop for Windows with the WSL 2 backend. Elasticsearch needs the
.wslconfigsetting of Set up WSL 2 for OpenCTI. -
Install nvm-windows, then Node.js 24 and Corepack:
nvm install 24 nvm use 24 npm install -g corepack corepack enable -
Run the commands of Build and run from source in Git Bash, installed with Git for Windows: they use bash syntax.
java -version
mvn -version
node --version
docker compose version
Java and Maven report Java 21, Maven reports 3.9 or later, Node.js prints v24.11.0 or later, and Compose prints its version.
A developer at Example CERT works on a Windows 11 laptop with Docker Desktop. They want to write a connector that imports a hotel-sector feed and test it against OpenCTI built from source:
wsl --install -d Ubuntu-24.04
# after the restart, in %USERPROFILE%\.wslconfig:
# [wsl2]
# kernelCommandLine = "sysctl.vm.max_map_count=262144"
wsl --shutdown
They turn on Ubuntu-24.04 in Settings > Resources > WSL integration of Docker Desktop, install the OpenCTI tools in the Ubuntu terminal, and clone OpenCTI into ~/opencti. The platform they start there answers at http://localhost:3000 in their Windows browser.
What's next
- Build and run from source: clone, configure, start the services and the platform, run the tests.
- Prepare an Ubuntu development environment, the commands to run inside WSL 2.
- Develop XTM Composer, for the Rust component that runs integrations.