installation

Installation and operation

This guide is for the administrator responsible for installing and operating BlackBox Analytics. If your organisation receives BlackBox Analytics as a managed service, begin with Initial setup.

Requirements

Use a dedicated host and include it in your organisation's normal monitoring, backup, and operating-system update processes.

Install

  1. Copy the BlackBox Analytics release to the host and open its directory.

  2. Create the configuration file:

    cp .env.example .env
    scripts/gen-secret.sh
  3. Edit .env and provide these values:

    Setting Purpose
    BBA_SECRET_KEY Paste the value produced by scripts/gen-secret.sh. Keep it for the lifetime of the installation and include it in protected backups.
    BBA_DB_PASSWORD Choose a strong, unique password.
    BBA_DOMAIN Enter the hostname users will open, such as analytics.example.com.
    BBA_PUBLIC_URL Enter the complete address, such as https://analytics.example.com.
    BBA_TLS Enter an administrator email address for an internet-reachable installation, or internal when certificates are managed elsewhere.
    BBA_ADMIN_EMAIL Enter the first administrator's email address.
    BBA_ADMIN_PASSWORD Choose a temporary password for the first sign-in.
  4. If .env contains an empty BBA_EMBED_ALLOWED_ORIGINS= entry, remove it. Embedded sites can be added later under Admin → Settings → Embedding.

  5. Start BlackBox Analytics:

    docker compose up -d --build
    docker compose logs -f app
  6. When the log reports that startup is complete, open BBA_PUBLIC_URL and follow Initial setup.

Certificates

When BBA_TLS contains an email address, BlackBox Analytics obtains and renews a public certificate automatically. The configured domain must resolve to the host, and ports 80 and 443 must be reachable during validation.

Use BBA_TLS=internal when your organisation's load balancer or proxy provides the public certificate. Make sure BBA_PUBLIC_URL exactly matches the address users open.

If your organisation uses its own certificate authority for outbound connections, place the supplied .crt files in deploy/certs/ before the initial build, then rebuild:

docker compose build
docker compose up -d

Installation recovery value

BBA_SECRET_KEY is required when restoring an installation and when using saved Salesforce or AI-provider connections. Generate it once, do not replace it during routine operation, and store a protected copy alongside every backup. If it is lost, saved connections must be configured again.

Do not share .env in support tickets or place it in a shared document.

Upgrade

Read the release notes before upgrading. Then run:

scripts/backup.sh
git pull
docker compose build
docker compose up -d
docker compose logs -f app

Wait for startup to complete, then sign in and check Admin → Overview. Confirm that the system status is healthy and run a small analysis against a current dataset. If the upgrade cannot be completed, restore the pre-upgrade backup.

Back up and restore

Run a backup from the release directory:

scripts/backup.sh [backup-directory]

The backup includes application records, imported datasets, uploaded files, saved results, and other working data. Keep a protected copy of .env with the backup. Retain backups according to your organisation's policy and test the restore procedure regularly.

To restore a matched pair of backup files:

scripts/restore.sh <database-backup> <data-backup>

Restoring replaces the current installation data. Take a fresh backup first, confirm that you selected files from the same backup run, and perform the restore during an agreed maintenance window.

Routine operation

Use Admin → Overview as the main status page. It shows whether BlackBox Analytics can process work, available disk space, queued or failed jobs, dataset totals, and AI-provider status.

Useful operator commands are:

docker compose ps
docker compose logs -f app worker
docker compose restart app worker

Review failed jobs under Admin → Jobs before restarting services. Also monitor free disk space and verify that scheduled backups finish successfully.

Common configuration

Most day-to-day settings belong in the administration area:

Settings that affect host capacity or start-up remain in .env. Change only values documented in the release's .env.example, take a backup first, and restart BlackBox Analytics after the change.

Getting help

When contacting support, include the BlackBox Analytics version, the time the problem occurred, the affected job ID if shown, and the relevant error message. Do not include passwords, integration keys, provider keys, uploaded data, or the contents of .env.