❗ WARNING: CoPilot is not intended to be exposed directly to the public Internet. Deploy behind a VPN / private network or a properly secured reverse proxy.
Prereqs
- A Linux host (VM or bare metal recommended)
- Docker Engine
- Docker Compose
Install (Docker Compose)
1) Get docker-compose.yml
You have two common options:
Option A (recommended for most users): clone the repo
<VERSION> with a release tag (example: v0.1.5).
2) Create required data paths
3) Create your .env
Copy from the example and edit as needed:
SERVER_HOST is correct for your environment.
4) Start CoPilot
5) Retrieve the initial admin password
The admin password is only printed the first time CoPilot starts.6) Access the UI
CoPilot is available on:https://<your_instance_ip_or_hostname>(HTTPS / 443)
admin account is created.
Helpful Docker daemon settings (DNS / logging / MTU)
If you run into image pulls / name resolution issues, consider configuring Docker DNS and log rotation. Edit:TLS / SSL
By default, CoPilot uses a self-signed certificate valid for 365 days from install. To use your own certificate:- Generate/obtain a cert/key.
- Mount the certs into
copilot-frontendand setTLS_CERT_PATH/TLS_KEY_PATH.
Customer Portal (Optional)
CoPilot includes an optional customer-facing portal for end users to view cases, alerts, and agents.Enable the Customer Portal
Indocker-compose.yml, the service is commented out by default.
- Edit the file:
- Uncomment:
- Apply:
- Access it:
https://<your_instance_ip>:8443
Customer Portal TLS
Like the main frontend, it uses a self-signed cert by default. To use your own:Creating Customer Portal Users
Customer portal users are managed via the main CoPilot admin interface:- Log in as an admin
- Navigate to Users
- Create a user with the
customer_userrole - Assign the user to the correct customer organization
Upgrade
You’ll likely want to upgrade often as changes ship frequently.With the upgrade script (recommended)
upgrade.sh, at the top of the repository, upgrades the whole deployment in a safe order: it backs MySQL up, moves MySQL to a new version when a release does, pulls the new images, restarts CoPilot and waits for the backend to finish its database migrations. Nothing is stopped until every check has passed and you have confirmed.
Run it from your CoPilot directory, the one with docker-compose.yml and .env, as a user who can run docker (root, or a member of the docker group). It needs only bash and Docker Compose on the host:
If you cloned the repository:
docker-compose.yml: download the script of the release you are moving to (<VERSION> as in the install steps), then run it. It edits the copilot-mysql service of your docker-compose.yml (image and command), keeps a copy of the file, and changes nothing else in it.
- Checks Docker, the Compose file, MySQL’s version, MySQL Shell’s upgrade checker and the free disk space. If any check fails, it stops there, with CoPilot still running as before.
- Pulls the new images while CoPilot keeps running.
- Stops the services that use the database, dumps every database, and shuts MySQL down cleanly.
- When MySQL moves to a new version, archives MySQL’s data directory, then upgrades it. MySQL 5.7, which installs made before September 2024 may still run, goes through MySQL 8.0 first: 8.4 can’t upgrade 5.7 data directly.
- Starts everything and waits for the backend to answer, its database migrations done. First it removes the container of a service CoPilot no longer has, which
docker compose up -dwould leave running (copilot-mcp).
backups/upgrade-<time>/: the SQL dump of every database, the archive of MySQL’s data directory (when MySQL changed version), the docker-compose.yml from before, the upgrade checker’s report and a log. They hold CoPilot’s data and credentials: keep them safe, and delete them once you no longer need to go back. The script checks that there is room for them first.
Rollback. ./upgrade.sh --rollback stops CoPilot, puts back the data directory archived by the newest upgrade that changed MySQL’s version, and the MySQL version you had before, and starts CoPilot again. Everything written to CoPilot’s database since that upgrade is lost.
If MySQL’s root password was changed after MySQL was created, set
COPILOT_MYSQL_ROOT_PASSWORD when you run the script.
Without the script
From your CoPilot directory:docker-compose.yml’s copilot-mysql image). If you need a clean restart (rare):
Tip: make sure your persistent data/ directory is backed up before major upgrades.
The copilot-mcp service is gone
docker-compose.yml no longer has the copilot-mcp service. It served the AI Chatbot’s local sources (the Wazuh indexer, the Wazuh manager, CoPilot’s database and Velociraptor), which went with it; the chatbot keeps its SOCFortress cloud sources. Ask questions about your own data in Talon’s chat instead: see AI Analyst.
An install from before the change still runs the container until you remove it:
- With
upgrade.shand the newdocker-compose.yml(git pull, or the file downloaded again): the script stops the old container with the backend and removes it before CoPilot starts again../upgrade.sh --checklists it under Remove. - With a
docker-compose.ymlyou keep (you download only the script): the file still has the service, so the script stops it and starts it again like the backend. Delete thecopilot-mcp:service from the file, or download the new one, then run the script. - Without the script:
docker compose up -dleaves the old container running, and Compose warns about an orphan container.docker compose up -d --remove-orphansremoves it, with any other container of this project thatdocker-compose.ymlno longer has.
copilot-mcp used:
data/copilot-mcp/holds a copy of a Velociraptor API client config (api.config.yaml). Delete the directory. If that API client was made only forcopilot-mcp, remove it on the Velociraptor server too; if CoPilot’s own Velociraptor connection uses the same client, keep it..env: CoPilot reads none ofOPENAI_API_KEY,OPENAI_MODEL,LOG_LEVEL, theMCP_*variables,OPENSEARCH_*,MYSQL_ENABLED,MYSQL_HOST,MYSQL_PORT,MYSQL_DATABASE,WAZUH_PROD_*,VELOCIRAPTOR_API_KEY,VELOCIRAPTOR_SSL_VERIFYorVELOCIRAPTOR_TIMEOUTany more, and you can delete them. KeepMYSQL_USER,MYSQL_PASSWORD,MYSQL_ROOT_PASSWORD,MYSQL_URLand the otherVELOCIRAPTOR_*settings.
Upgrading to MySQL 8.4
docker-compose.yml runs MySQL 8.4 LTS (mysql:8.4.13); MySQL 8.0 reached end of life in April 2026. The version is pinned in the Compose file, so docker compose pull alone keeps your current MySQL: you move to 8.4 when you update docker-compose.yml. Its first start upgrades the data in the mysql-data volume in place. upgrade.sh does all of this for you; by hand:
-
The upgrade can’t be undone. MySQL 8.0 can’t read the data once 8.4 has upgraded it, so take a backup first, while the old MySQL is still running:
Or stop the stack (
docker compose down) and copy themysql-datavolume. -
Shut MySQL down cleanly before you change its image. Stop the backend (and remove
copilot-mcpfirst if it still runs), ask for a full shutdown, and give MySQL time to finish it (Docker kills a container after 10 seconds by default, and MySQL won’t upgrade data left by a server that didn’t shut down cleanly):Then updatedocker-compose.ymland rundocker compose up -d. -
MySQL 5.7 can’t be upgraded straight to 8.4. Installs made before September 2024 may still run
mysql:5.7: move them tomysql:8.0.46first (start it once, let it upgrade the data, shut it down cleanly as above), then to 8.4. - The first start takes longer while MySQL upgrades its data. The backend may restart a few times until MySQL accepts connections.
-
Keep the
command:flags ofcopilot-mysqlif you maintain your own Compose file.--restrict-fk-on-non-standard-key=OFFlets CoPilot’s schema keep its foreign keys to non-unique columns, which MySQL 8.4 otherwise refuses.--mysql-native-password=ONkeeps installs first created with the oldmysql:5.7image (before September 2024) working, since their database users still use that login method.
upgrade.sh leaves a MySQL server outside the Compose stack alone (it still pulls and restarts CoPilot). CoPilot works on MySQL 8.4. Its migrations switch restrict_fk_on_non_standard_key off for their own database session, so the server needs no setting for CoPilot; but users on mysql_native_password need the plugin enabled (mysql_native_password=ON) or a new password set with caching_sha2_password. Before upgrading the server itself, run MySQL Shell’s upgrade checker (util.checkForServerUpgrade()) and fix its errors first.