Skip to main content
CoPilot is shipped as Docker images and is intended to be deployed via Docker Compose.
❗ 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


Install (Docker Compose)

1) Get docker-compose.yml

You have two common options: Option A (recommended for most users): clone the repo
Option B: download just the Compose file for a specific release Replace <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:
At minimum, make sure 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)
By default, an 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:
Example:
If you need to set MTU:
Apply:

TLS / SSL

By default, CoPilot uses a self-signed certificate valid for 365 days from install. To use your own certificate:
  1. Generate/obtain a cert/key.
  1. Mount the certs into copilot-frontend and set TLS_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

In docker-compose.yml, the service is commented out by default.
  1. Edit the file:
  1. Uncomment:
  1. Apply:
  1. 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:
  1. Log in as an admin
  2. Navigate to Users
  3. Create a user with the customer_user role
  4. Assign the user to the correct customer organization

Upgrade

You’ll likely want to upgrade often as changes ship frequently. 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:
If you downloaded only 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.
What it does:
  1. 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.
  2. Pulls the new images while CoPilot keeps running.
  3. Stops the services that use the database, dumps every database, and shuts MySQL down cleanly.
  4. 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.
  5. 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 -d would leave running (copilot-mcp).
CoPilot is unavailable from the dump until the backend has started again: usually a few minutes, longer when MySQL upgrades a large database. Backups. Each run writes 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:
That is all a release needs when it doesn’t change MySQL’s version (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.sh and the new docker-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 --check lists it under Remove.
  • With a docker-compose.yml you 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 the copilot-mcp: service from the file, or download the new one, then run the script.
  • Without the script: docker compose up -d leaves the old container running, and Compose warns about an orphan container. docker compose up -d --remove-orphans removes it, with any other container of this project that docker-compose.yml no longer has.
Then clean up what only 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 for copilot-mcp, remove it on the Velociraptor server too; if CoPilot’s own Velociraptor connection uses the same client, keep it.
  • .env: CoPilot reads none of OPENAI_API_KEY, OPENAI_MODEL, LOG_LEVEL, the MCP_* variables, OPENSEARCH_*, MYSQL_ENABLED, MYSQL_HOST, MYSQL_PORT, MYSQL_DATABASE, WAZUH_PROD_*, VELOCIRAPTOR_API_KEY, VELOCIRAPTOR_SSL_VERIFY or VELOCIRAPTOR_TIMEOUT any more, and you can delete them. Keep MYSQL_USER, MYSQL_PASSWORD, MYSQL_ROOT_PASSWORD, MYSQL_URL and the other VELOCIRAPTOR_* 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 the mysql-data volume.
  • Shut MySQL down cleanly before you change its image. Stop the backend (and remove copilot-mcp first 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 update docker-compose.yml and run docker 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 to mysql:8.0.46 first (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 of copilot-mysql if you maintain your own Compose file. --restrict-fk-on-non-standard-key=OFF lets CoPilot’s schema keep its foreign keys to non-unique columns, which MySQL 8.4 otherwise refuses. --mysql-native-password=ON keeps installs first created with the old mysql:5.7 image (before September 2024) working, since their database users still use that login method.
Running CoPilot on your own MySQL server? 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.