> ## Documentation Index
> Fetch the complete documentation index at: https://aivision.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Read the relevant procedure and prerequisites before suggesting commands. Cite the section and give an observable check. Treat sample data as illustrative. Report product actions and results only when verified in the user's environment.

# Choose a deployment method

> Choose All-in-One for personal trials or Docker CLI, Compose, or Kubernetes for shared deployments and external databases.

When self-hosting AI Vision, choose a deployment method first, then a database that it supports. If your team already provides a platform URL, [connect an Agent](https://aivision.mintlify.site/en/web-quickstart.md) without installing another platform.

**Use [All-in-One Personal Edition](https://aivision.mintlify.site/en/deployment/all-in-one.md) for a quick trial or personal deployment.** It runs AI Vision with embedded seekdb in one container on Linux x86-64 or ARM64. For a shared deployment or external database, choose Docker CLI, Compose, or Kubernetes below.

Compose uses the same Go CLI to invoke native `docker compose`, without an additional host Python control layer. Use `aiv` with `--target compose` for routine installation, retries, status, logs, rebuilding and stopping to retain storage identity, ownership, locks, isolated initialization and exit/OOM checks. Native `config`, `ps` and `logs` provide read-only diagnostics when needed.

For Docker CLI, Compose, and Kubernetes, run routine lifecycle operations through the installed `aiv`. Complete [CLI installation and new-terminal verification](https://aivision.mintlify.site/en/guides/install-cli.md), then retain the original target, namespace, workdir / blueprint or Compose file / env selectors.

## Choose a deployment entry point

| Entry point | When to choose it | Database support | Next step |
| - | - | - | - |
| All-in-One Personal Edition | Try AI Vision or run a personal deployment on Linux x86-64 or ARM64 | Embedded seekdb | [Install All-in-One](https://aivision.mintlify.site/en/deployment/all-in-one.md) |
| Docker CLI (default): `aiv cast` | Let the CLI save configuration, manage deployment and show logs | Managed or external OceanBase CE / seekdb | [Docker CLI deployment](https://aivision.mintlify.site/en/deployment/docker.md) |
| Product Docker Compose | Manage containers on one machine with Compose, using the Go CLI, with native Compose inspection | An explicit Compose file for each of four combinations | [Compose deployment](https://aivision.mintlify.site/en/deployment/compose.md) |
| Kubernetes: `aiv cast --target kubernetes` | Use an existing cluster with the current fixed, single-instance evaluation profile | OB Operator-managed OceanBase CE only | [Kubernetes deployment](https://aivision.mintlify.site/en/deployment/kubernetes.md) |

A Skill can guide these steps; manual operation does not require AI. Native Compose inspection does not replace guarded installation and stopping.

Helm is planned, but no installable product chart is available. `aiv generate --target kubernetes` is the older generic material converter. It lacks the fixed product installation's initialization and lifecycle management and is not an installation entry point.

## The same service responsibilities

Docker CLI, Compose, and Kubernetes deploy the same five application roles, with the database engine handled separately. Choosing seekdb does not remove platform applications. Reusing an external database only skips the managed database container.

| Product role | Implementation and responsibility | Compatible legacy identifiers |
| - | - | - |
| `frontend` | React / Nginx: Web pages and API proxy | `fe`, `aivision-fe` |
| `backend` | Django: users, spaces, onboarding and platform APIs | `be`, `aivision-be` |
| `diagnosis` | AgentLens: manage and execute diagnosis tasks | `agentlens` |
| `ingest-gateway` | AntCollector: verify reporting identity and forward telemetry | `gateway`, `antcollector-gw` |
| `data-backend` | SigNoz OceanBase distribution: write telemetry and provide queries | `signoz`, `signoz-ob` |
| `database` | OceanBase CE / seekdb: host the logical databases | `oceanbase`, `seekdb` |

`data-backend` is a service; `database` is the database engine. The logical databases `aivision`, `agentlens` and `signoz` can share one database instance. The data backend must also retain its SQLite metastore. See [Architecture overview](https://aivision.mintlify.site/en/architecture/overview.md) for query and diagnosis calls.

The new role names help select components without renaming existing containers, Kubernetes workloads and Services, DNS, namespaces, state directories or volumes. Legacy CLI selectors still work: `aiv logs be` and `aiv logs backend` select the same role.

## Initialization goes beyond starting containers

After the database becomes reachable, installation must create application databases, run migrations, configure internal integrations and obtain the organization identity. Each method implements this shared dependency order through its own tasks or Jobs:

```mermaid theme={null}
flowchart TB
  DB[Database and application databases ready] --> DATA[Data backend SQL ready]
  DB --> BE[Backend migrations and SQL ready]
  DATA --> BOOT[Backend integration bootstrap]
  BE --> BOOT
  BOOT --> ORG[Obtain organization ID]
  ORG --> DIAG[Start diagnosis service]
  BOOT --> WEB[Frontend available]
```

The organization ID is passed to diagnosis. The internal integration API key remains in backend-managed configuration and must not be copied into a shared organization file or public deployment material. Backend SQL readiness can succeed before integration bootstrap finishes, so a `Ready` status does not replace successful initialization tasks.

## Distinguish liveness, readiness and product acceptance

**Liveness** checks whether the local process can respond. **Readiness** checks the dependencies it needs to serve traffic now. A temporary database outage should make dependent services unready while allowing their processes to recover.

| Component | Liveness | Readiness |
| - | - | - |
| Backend | `/api/v1/health` | `/api/v1/ready`, executing `SELECT 1` with the application account |
| Diagnosis | `/internal/healthz` | `/internal/readyz`, checking control-database SQL |
| Data backend | `/api/v1/health` or native `healthcheck`; Kubernetes uses TCP 8080 | `/api/v1/ready`, telemetry-database `SELECT 1` with a one-second server deadline; database failure returns 503 |
| Ingest gateway | Native `/app/collector healthcheck`, checking the local listener | `healthcheck --ready`, checking the local service, rejection of unauthenticated reporting, and downstream SQL readiness |
| Frontend | Successful local `/` response | The same local static response; it does not prove backend availability |

Docker / Compose runs `/app/signoz healthcheck --ready` for the data backend without requiring a shell or curl inside its container. Kubernetes data-backend startup and readiness probes call the HTTP readiness endpoint.

```mermaid theme={null}
flowchart TB
  SQL[Database temporarily unavailable] --> R[Related SQL readiness checks fail]
  R --> C[Compose marks services unhealthy]
  R --> K[Kubernetes removes Ready service endpoints]
  SQL --> L[Local liveness can still succeed]
  REC[Database recovers] --> OK[Readiness recovers and services resume]
```

Compose's `unhealthy` status alone does not restart containers, and startup dependencies do not provide continuous orchestration. Kubernetes readiness failure alone does not restart a Pod; liveness failure enters the restart decision.

**Verify the product flow separately:** send a non-sensitive new Trace with valid reporting credentials, read it back with authentication, and check the Agent, Trace ID and time. Rejection of an unauthorized probe only checks the authentication boundary; it does not prove that a valid request was stored. After an update, also read a Trace retained from before the update. See [SDK integration](https://aivision.mintlify.site/en/integrations/langfuse.md).

## Use matching deployment material and images

The product repository's root [`deploy/`](https://github.com/ob-labs/ai-vision-ob/tree/main/deploy) owns blueprints, Compose, fixed Kubernetes templates, initialization scripts and the component mapping. CLI embedding directories are generated compatibility copies. Use complete material from one version rather than mixing old scripts with new templates.

Choose a published, versioned release from the [public product Releases](https://github.com/antgroup/ai-vision/releases). For distributed installation, use the CLI, `SHA256SUMS`, `release-manifest.json`, database-specific vars, and application image digests from that release. Check its deployment qualification notes for the targets and architectures you plan to use. Current source includes new SQL readiness, organization-file handoff and bounded shutdown. **A source merge does not mean an existing `dev` / `latest` image or downloaded CLI contains these changes.** The data-backend image must contain `/api/v1/ready`, `healthcheck --ready` and the shared metadata connection-pool shutdown fix. Older images without readiness fail instead of falling back to HTTP liveness.

Manual validation covers Linux/amd64 source-candidate builds: CLI with both managed database engines, all four Compose combinations, and the fixed CE path on K3s 1.34.11, including SQL outage recovery and persistence checks. This does not qualify every released image, ARM, cross-release upgrades, HA or production load. See [development images and version material](https://github.com/ob-labs/ai-vision-ob/blob/main/docs/deployment/en/dev-image-release.md) for source builds.

The new Go Compose controller and native/CLI round trips require separate runtime acceptance; the earlier controller matrix does not establish that the new path passed.

## Preserve deployment identity during updates

* Keep the original namespace, configuration, credentials, state directory, organization identity, data-backend metastore and volumes. Preserve Docker's fixed history start too.
* When old and role-based keys appear in the same CLI configuration layer, the role key wins. Across layers, defaults, saved values, vars file, environment and command line override in that order. Compose `.env` follows its own rules rather than CLI precedence.
* CLI and Compose do not automatically adopt each other's installations. Changing tools or database engines requires separate backup and migration arrangements; changing selectors, namespace or `OB_BACKEND` is insufficient.
* Single-instance updates have a maintenance window. Resolve shutdown timeouts, nonzero exits and OOM first. Deleting stop records or forcibly removing containers or volumes is not recovery.

For the difference between stopping with retained data and clearing data, see [Docker CLI](https://aivision.mintlify.site/en/deployment/docker.md#logs-and-stopping-services) and [Compose](https://aivision.mintlify.site/en/deployment/compose.md#stop-and-retain-data). Cluster administrators manage Kubernetes removal according to [PVC reclaim policies](https://aivision.mintlify.site/en/deployment/kubernetes.md#common-deployment-problems).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.