Installing from the archive
The install script and air-gapped installation, the archive and its contents, the deploy.sh steps and prompts, bundled Elasticsearch and Kibana, the user account table, manual installation, and post-install checks.
Install with the script
install.sh is attached to every release. It downloads the archive and its .sha256 file, verifies it, unpacks it into the install directory, and runs deploy.sh. The host needs Docker Engine 24 or later with Docker Compose v2, and you run the script as root from an interactive terminal.
curl -fsSL https://github.com/Reallysec/RST-AI-Copilot-for-Elastic/releases/latest/download/install.sh | sudo bashEvery edition uses the same archive. Without a license it runs as the Community Edition; activating a license on the License tab in Settings unlocks that edition's features in place, with no reinstall.
| Option | Default | Description |
|---|---|---|
--version | Latest | Install a specific version |
--dir | /opt/rst-ai-copilot-for-elastic | Install directory. An existing /opt/rst-elastic-ai-copilot (installed with 1.2.20 or earlier) is kept |
--download-only | Off | Download and verify the archive into the current directory without installing |
Running the script again unpacks into the same directory and keeps .env and state/, so the license fingerprint does not change.
Install on an air-gapped host
Steps
-
On a host with access to GitHub, run:
curl -fsSL https://github.com/Reallysec/RST-AI-Copilot-for-Elastic/releases/latest/download/install.sh | bash -s -- --download-only -
Copy
RST-AI-Copilot-for-Elastic-<version>.tar.gzfrom the current directory to the air-gapped host. -
Install it as in Run deploy.sh below.
With bundled Elasticsearch and Kibana, also copy RST-AI-Copilot-for-Elastic-elk-images-<version>.tar.gz from the release page into the unpacked directory; see Bundled Elasticsearch and Kibana.
Get the archive
The archive is published on GitHub Releases as RST-AI-Copilot-for-Elastic-<version>.tar.gz with the checksum file RST-AI-Copilot-for-Elastic-<version>.tar.gz.sha256. Every edition uses this one archive, and the activated license decides the feature set.
The archive unpacks to:
RST-AI-Copilot-for-Elastic-<version>/
├── RST-AI-Copilot-for-Elastic-images-<version>.tar # gateway and Caddy images, loaded by deploy.sh
├── deploy.sh # interactive installer
├── docker-compose.prod.yml # standard form: Caddy, gateway, userdb
├── docker-compose.sso.yml # SSO form
├── Caddyfile / Caddyfile.sso
├── .env.example # every configuration key, documented
├── deploy/rst-update.sh # online-update installer
├── scripts/backup.sh / restore.sh
└── docs/ # deployment and backup guides, release notesInstallation does not access any container registry. Verify the archive with sha256sum -c RST-AI-Copilot-for-Elastic-<version>.tar.gz.sha256 before unpacking.
Run deploy.sh
tar xzf RST-AI-Copilot-for-Elastic-<version>.tar.gz
cd RST-AI-Copilot-for-Elastic-<version>
sudo ./deploy.shThe script runs seven steps.
| Step | Action |
|---|---|
| 1 Preflight | Checks Docker, Compose, and the required files. Generates state/machine-id and state/server_guid, or reuses them if present |
| 2 Images | Loads the image archives in the directory with docker load, including the bundled images and RST-AI-Copilot-for-Elastic-elk-images-<version>.tar.gz, and records the gateway tag |
| 3 Existing install | With an existing .env, asks whether to keep it and start. Answer Y on upgrades |
| 4 Options | Authentication: 1 for built-in login, 2 for SSO (see SSO). Elasticsearch: 1 for an existing cluster, 2 for bundled Elasticsearch and Kibana (see below) |
| 5 Configuration | Prompts listed below |
| 6 Write .env | Generates RST_GATEWAY_SHARED_SECRET, RST_ADMIN_TOKEN, RST_USER_DB_PASSWORD, and RST_ADMIN_PASSWORD_HASH, and writes .env with mode 600 |
| 7 Start | Writes GATEWAY_IMAGE_TAG, runs docker compose -f docker-compose.prod.yml up -d, waits up to 90 seconds for all containers to become healthy, and prints the URL |
Prompts in step 5:
| Prompt | Value |
|---|---|
| LLM endpoint URL | Default Volcengine Ark https://ark.cn-beijing.volces.com/api/v3. The coding plan uses /api/coding/v3 |
| LLM model id | ark-code-latest on the Ark coding plan, ep-xxx for a custom endpoint |
| Timezone offset | Default +08:00. The model resolves "today" and "yesterday" against it |
| Elasticsearch URL | For example https://es.corp.local:9200. Not asked with bundled Elasticsearch |
| ES user | Leave empty when Elasticsearch security is disabled. Not asked with bundled Elasticsearch |
| Kibana URL | For example https://kibana.corp.local:5601. Not asked with bundled Elasticsearch |
| Caddy site address | The hostname analysts open as https://<hostname>/v2/; must be a hostname |
| Admin password | 8 characters or more |
state/machine-id and state/server_guid form the license hardware fingerprint and must never be regenerated.
Bundled Elasticsearch and Kibana
With Elasticsearch source 2 in step 4, deploy.sh writes ES_URL=http://elasticsearch:9200 and KIBANA_URL=http://kibana:5601 to .env and starts the elasticsearch and kibana services of docker-compose.prod.yml with --profile bundled-elk. This form is for a PoC or a host without ELK; production connects to an existing cluster.
| Item | Value |
|---|---|
| Images | elasticsearch:9.5.3 and kibana:9.5.3 from docker.elastic.co; the version comes from RST_ELK_VERSION in .env |
| Elasticsearch | Single node, security disabled, 1 GB heap (ES_JAVA_OPTS=-Xms1g -Xmx1g) |
| Data | es_data volume |
| Ports | Neither container publishes a port to the host; both are reachable only on the compose network |
The archive does not contain these images. If the host can reach docker.elastic.co, deploy.sh offers to pull the missing images. On an air-gapped host, put the optional release asset RST-AI-Copilot-for-Elastic-elk-images-<version>.tar.gz in the install directory next to deploy.sh, and step 2 loads it. Without the images and without pulling, the script stops.
deploy.sh decides the RST_ELK_VERSION it writes to .env in this order:
- If
.envalready has a value, it is kept. - If there is no value but the host already has a bundled Elasticsearch data volume (
es_dataorsso_es_data), it writes8.12.2. Installs from before 1.2.4 fall in this case. - Otherwise (a new install) it writes
9.5.3. The offlineelk-imagesasset also contains 9.5.3.
Elasticsearch 9.x cannot open 8.x data directly. On a host with bundled Elasticsearch data, do not change only RST_ELK_VERSION to 9.5.3, or Elasticsearch will not start.
User account table
Users and their three roles (admin, analyst, viewer) are stored in a Postgres owned by the gateway, never in Elasticsearch. deploy.sh starts the userdb container and sets RST_USER_DB_URL, so you can add accounts on the Users page right after installation.
For a manual installation, set in .env:
RST_USER_DB_PASSWORD=<32-character random string>
RST_USER_DB_URL=postgresql://rst:<same>@userdb:5432/rst_usersThen run docker compose -f docker-compose.prod.yml up -d userdb gateway caddy. On first start the gateway creates the table and seeds RST_ADMIN_USERNAME with RST_ADMIN_PASSWORD_HASH as the first administrator. To use your own Postgres, point RST_USER_DB_URL at it and do not start userdb.
With SSO enabled, the IdP owns the accounts and RST_USER_DB_URL is ignored.
Verify the installation
curl -k https://<hostname>/healthz # {"status":"ok"}
curl -k https://<hostname>/readyz # {"status":"ready","es":"ok","es_write":"ok","timezone":"+08:00",...}
docker compose -f docker-compose.prod.yml psreadyz field | Expected | Otherwise |
|---|---|---|
es | ok | Correct the Elasticsearch URL, account, or certificate; read docker compose logs gateway |
es_write | ok | denied means the account lacks create-index and write on .rst_copilot_*; see Elasticsearch permissions |
timezone | The deployment timezone | Set RST_TIMEZONE in .env |
sso | disabled without SSO |
Open https://<hostname>/v2/ and sign in as admin with the password you set. The certificate is self-signed; for production, edit Caddyfile to use your own.
Manual installation
Without deploy.sh:
docker load < RST-AI-Copilot-for-Elastic-images-*.tar
cp .env.example .env # fill LLM_*, ES_*, CADDY_SITE_ADDRESS, RST_GATEWAY_SHARED_SECRET, RST_ADMIN_TOKEN, RST_USER_DB_PASSWORD, GATEWAY_IMAGE_TAG
mkdir -p state
openssl rand -hex 16 > state/machine-id
cat /proc/sys/kernel/random/uuid > state/server_guid
chmod 644 state/* # the gateway runs as uid 10001 and cannot read mode 600
docker compose -f docker-compose.prod.yml up -dBoth state/machine-id and state/server_guid must exist. If either is missing, Docker bind-mounts a directory at that path, and the gateway fails to start or activation reports no hardware identifier available. This is not a license problem.
To create the administrator password hash, run docker exec rst-ai-copilot-for-elastic-gateway python -m backend.session_auth '<password>'. Put the output in .env as RST_ADMIN_PASSWORD_HASH, writing every $ as $$ so compose does not treat it as a variable.
Next step
- To use the paid engines, activate a license.
- Configure the index whitelist, masking mode, and audit in Settings.
- Configure the knowledge-base embedding model in AI settings.
- Back up
./state/, thegateway_statevolume, and theuserdb_datavolume; see Upgrade and backup.
Requirements and network
Host size, Docker version, Elasticsearch version, LLM endpoint, hostname, and the inbound and outbound ports to open.
Configuration reference
Every key in .env: required keys, login and accounts, Elasticsearch connection, model and reasoning, live alerts, scheduled reports and baseline, audit and retention, resource limits.